GitHub Repository MCP Server
@shanksxz
GitHub Repository MCP Server について
GitHub context server for AI models. Fetch files, structure, filter, and more.
基本情報
設定
ツール
3`owner`: GitHub repository owner/organization name
`owner`: GitHub repository owner/organization name
`owner`: GitHub repository owner/organization name
概要
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
FAQ from GitHub Repository MCP Server
Do I need a GitHub token to use the server?
It can work with public repositories without authentication, but GitHub API has strict rate limits (60 requests/hour). To increase the limit to 5000 requests/hour, set the GITHUB_TOKEN environment variable.
How do I set up authentication?
Create a file called gh.sh with the line export GITHUB_TOKEN=your_github_personal_access_token, make it executable with chmod +x gh.sh, then run it with ./gh.sh.
What are the API rate limits?
Unauthenticated requests are limited to 60 requests per hour. Using a GitHub personal access token raises the limit to 5000 requests per hour.
Can I filter files when fetching repository context?
Yes, you can specify file extensions to include, paths to exclude (defaults: node_modules, dist, build), and set a maximum number of files (default 50).
How do I use the server with Cursor?
Open Cursor Settings, search for “MCP”, click “Add a new MCP Server”, enter a name, set type to “Command”, and provide the path to your gh.sh script.
「バージョン管理」の他のコンテンツ
Git MCP Server
cyanheadsA Git MCP server for AI agents. STDIO & Streamable HTTP.
Bitbucket Server MCP
garc33🚀 GitLab MR MCP
kopfrechnerInteract seamlessly with GitLab repositories to manage merge requests and issues. Fetch details, add comments, and streamline your code review process with ease.
GitMCP
idosalPut an end to code hallucinations! GitMCP is a free, open-source, remote MCP server for any GitHub project
GitLab MCP Server
yoda-digitalProduction-grade GitLab MCP server with 86 tools — full GitLab control from any AI agent (Claude, Cursor, Zed).
コメント