MCP.so
ログイン

GitHub Repository MCP Server

@shanksxz

GitHub Repository MCP Server について

GitHub context server for AI models. Fetch files, structure, filter, and more.

基本情報

カテゴリ

バージョン管理

ライセンス

MIT

ランタイム

node

トランスポート

stdio

公開者

shanksxz

設定

標準の設定はありません

このサーバーの README には解析可能な MCP 設定ブロックが含まれていません。インストール手順はリポジトリをご確認ください。

リポジトリ

ツール

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.

コメント

「バージョン管理」の他のコンテンツ