Sponsored by Deepsite.site

GitHub Explorer MCP

Created By
x51xxx9 months ago
A TypeScript implementation of an MCP server that provides GitHub repository information including file content, directory structure, and other metadata for MCP clients.
Content

GitHub Explorer MCP

The MCP server that provides GitHub repository information including file content, directory structure, and other metadata for MCP clients like Claude Desktop, Cursor, and others.

Features

  • Repository Summaries: Get comprehensive information about GitHub repositories
  • Directory Structure: View the complete file structure of any repository with a nice ASCII tree visualization
  • File Content: Access the content of specific files
  • Metadata Enhancement: Get stars, forks, description, and last updated information
  • Local Repository Cloning: Clone repositories locally for faster processing and more complete data
  • Caching System: Efficiently cache repository data to reduce API calls
  • Progress Notifications: Updates on long-running operations
  • Format Options: Get data in text or structured JSON format
  • Auto-Completion: Suggestions for repository owners and names
  • Web Interface: Basic status page and info when running in HTTP mode

Installation

Using NPM

# Install from npm
npm install @trishchuk/github-explorer-mcp -g

# Run the server (stdio mode for MCP clients)
github-explorer-mcp

# Or run in HTTP/SSE mode
github-explorer-mcp-sse

Using Docker

# Build Docker image
docker build -t github-explorer-mcp .

# Run container
docker run -p 3000:3000 github-explorer-mcp

Usage with MCP Clients

Claude Desktop

Add to your Claude Desktop configuration:

{
  "mcpServers": {
    "github-explorer": {
      "command": "npx",
      "args": ["-y", "@trishchuk/github-explorer-mcp"]
    }
  }
}

Cursor

Add to your Cursor configuration:

{
  "mcpServers": {
    "github-explorer": {
      "command": "npx",
      "args": ["-y", "@trishchuk/github-explorer-mcp"]
    }
  }
}

API Reference

The MCP server provides the following tools:

github_repository_summary

Get a summary of a GitHub repository.

{
  owner: string;    // GitHub organization or username
  repo: string;     // Repository name
  branch?: string;  // Optional branch name
  includeMetadata?: boolean; // Include stars, forks, etc.
}

github_directory_structure

Get the tree structure of a GitHub repository.

{
  owner: string;    // GitHub organization or username
  repo: string;     // Repository name
  branch?: string;  // Optional branch name
}

github_read_important_files

Get the content of specific files from a GitHub repository.

{
  owner: string;     // GitHub organization or username
  repo: string;      // Repository name
  filePaths: string[]; // List of paths to files
  branch?: string;   // Optional branch name
  format?: 'text' | 'json'; // Output format
}

git_search (Coming Soon)

Search for content within a GitHub repository.

{
  owner: string;     // GitHub organization or username
  repo: string;      // Repository name
  query: string;     // Search query
  branch?: string;   // Optional branch name
  maxResults?: number; // Maximum results to return
}

git_diff (Coming Soon)

Get a diff between two branches or commits.

{
  owner: string;     // GitHub organization or username
  repo: string;      // Repository name
  base: string;      // Base branch/commit
  head: string;      // Head branch/commit
}

Development

# Clone the repository
git clone https://github.com/x51xxx/github-explorer-mcp.git
cd github-explorer-mcp

# Install dependencies
npm install

# IMPORTANT: This project requires Node.js 18 or later
# If using nvm, run:
nvm use

# Build the project
npm run build

# Run the built server
npm start
# or
npm run start:sse

Troubleshooting

Node.js Version Issues

This project requires Node.js 18 or newer because it uses modern Web APIs like ReadableStream. If you encounter errors like:

ReferenceError: ReadableStream is not defined

You should:

  1. Update Node.js to version 18 or later
  2. If using nvm, run nvm use in the project directory
  3. Make sure to use the modified scripts that include necessary polyfills

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Serper MCP ServerA Serper MCP Server
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
DeepChatYour AI Partner on Desktop
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Playwright McpPlaywright MCP server
WindsurfThe new purpose-built IDE to harness magic
ChatWiseThe second fastest AI chatbot™
CursorThe AI Code Editor
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Amap Maps高德地图官方 MCP Server
Tavily Mcp
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.