mcp-server-uithub
v0.1.0
Published
MCP server for interacting with UIThub API
Readme
UIThub MCP Server
Model Context Protocol (MCP) server for interacting with the UIThub API, which provides a convenient way to fetch GitHub repository contents.
This MCP server allows Claude to retrieve and analyze code from GitHub repositories, making it a powerful tool for understanding and discussing code.
Features
- Retrieve repository contents with smart filtering options
- Specify file extensions to include or exclude
- Limit response size by token count or file size
- Choose output format (JSON, YAML, Markdown, HTML)
- Integrate with Claude Desktop for natural language exploration of repositories
Installation
Clone the repository
git clone https://github.com/yourusername/mcp-server-uithub.git cd mcp-server-uithubInstall dependencies
npm install # or pnpm installBuild the project
npm run build # or pnpm buildInitialize the server with Claude Desktop
node dist/index.js init
Usage with Claude Desktop
After initializing the server, restart Claude Desktop. You should see a 🔨 icon that shows the UIThub tool available for use.
You can then ask Claude to fetch and analyze code from GitHub repositories, for example:
- "Can you fetch the React components from facebook/react repository and explain how they work?"
- "Get the README file from microsoft/TypeScript repository and summarize it for me."
- "Show me only Python files from tensorflow/tensorflow repository."
Tool Reference
getRepositoryContents
Fetches contents from a GitHub repository via the UIThub API.
Parameters:
owner(required): GitHub repository ownerrepo(required): GitHub repository namebranch: Branch name (defaults to main)path: File or directory path within the repositoryext: Comma-separated list of file extensions to include (e.g., "js,ts,jsx")dir: Comma-separated list of directories to includeexcludeExt: Comma-separated list of file extensions to excludeexcludeDir: Comma-separated list of directories to excludemaxFileSize: Maximum file size to include (in bytes)maxTokens: Limit response to a maximum number of tokens (useful for LLMs)omitFiles: If true, response will not include file contentsomitTree: If true, response will not include the directory treeformat: Response format, one of: "json", "yaml", "markdown", "html"
Environment Variables
You can configure the server by creating a .env file with the following variables:
# Your GitHub API token for accessing private repositories and higher rate limits
GITHUB_API_KEY=your_github_token
# Set to "true" to enable debug logging
DEBUG=falseDevelopment
For development, you can use the watch mode:
npm run build:watch
# or
pnpm build:watchLicense
MIT
