What is GitHub Repository MCP Server?
This Model Context Protocol (MCP) server allows AI models to access GitHub repository contents as context. It provides tools to fetch file contents, repository structure, and entire repositories for use in AI interactions.
How to use GitHub Repository MCP Server?
Clone the repository, install dependencies with npm install, and build with npm run build. Set the GITHUB_TOKEN environment variable to increase API rate limits. Use with Cursor by adding a new MCP server pointing to a script that exports the token. The server communicates via stdin/stdout following the MCP protocol.
Key features of GitHub Repository MCP Server
- Fetch entire repository contents as context
- Get specific file contents from a repository
- Get repository structure (file listing)
- Filter files by extension
- Exclude specific paths
- Limit the number of files returned
Use cases of GitHub Repository MCP Server
- Retrieve the file structure of a public GitHub repository (e.g., tensorflow/tensorflow)
- Fetch all files from a repository to use as context for AI interactions
- Get the content of a specific file in a repository
Comments