github-repos
github-mcp-server
stdio 経由で GitHub リポジトリを Claude Code(または MCP 互換クライアント)に公開する、最小限の読み取り専用 MCP サーバーです。
公開するツール
list_repos(owner?, include_forks?, limit?)- 自分のリポジトリ(または他のオーナーの公開リポジトリ)を一覧表示しますget_repo_info(owner, repo)- 1 つのリポジトリのメタデータlist_directory(owner, repo, path?, ref?)- リポジトリのファイルツリーを閲覧しますread_file(owner, repo, path, ref?, max_bytes?)- テキストファイルの内容を読み取りますget_readme(owner, repo, ref?)- リポジトリの README を取得しますsearch_code(query, owner?, repo?, limit?)- コードを検索します(必要に応じて自分のリポジトリに限定)list_commits(owner, repo, path?, limit?)- 最近のコミット履歴
すべて読み取り専用です。書き込み、作成、削除のエンドポイントは公開されていません。
Related MCP server: GitHub MCP Server
セットアップ
GitHub パーソナルアクセストークンを作成(ファイングレイン、推奨): GitHub -> Settings -> Developer settings -> Personal access tokens -> Fine-grained tokens -> Generate new token.
リポジトリアクセス: Claude に読み取らせたいリポジトリを選択(または「All repositories」)
権限: Contents: Read-only、Metadata: Read-only(
search_codeを機能させたい場合は Code search: Read-only を追加)
依存関係をインストール:
cd github-mcp-server python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txtトークンを設定(スクリプトにハードコードしたり、どこにもコミットしないでください):
export GITHUB_TOKEN=github_pat_xxxxxxxxxxxx永続化するには、その行を
~/.zshrc/~/.bashrcに追加するか、direnvなどのツールで.envファイルを使用してください。ただし、gitignore されていることを確認してください。サーバーを Claude Code CLI に登録:
claude mcp add github-repos -- python3 /absolute/path/to/github-mcp-server/server.py(venv を使用した場合は、venv の python を指定してください:
/absolute/path/to/github-mcp-server/.venv/bin/python3)サーバーは環境から
GITHUB_TOKENを読み取るため、claudeを実行するシェルでエクスポートするか、明示的に渡してください:claude mcp add github-repos --env GITHUB_TOKEN=github_pat_xxxxxxxxxxxx -- python3 /absolute/path/to/github-mcp-server/server.py接続を確認:
claude mcp listgithub-reposが接続済みとして表示されるはずです。その後、Claude Code セッションで「list my repos」や「read the README of my flight-delay-prediction repo」などと質問すると、Claude がこれらのツールを呼び出します。ローカルスモークテスト(クライアントなし)
python3 -c " import os os.environ['GITHUB_TOKEN'] = 'github_pat_xxx' from server import list_repos print(list_repos()) "
注意事項 / 次のステップ
レート制限: 認証済みリクエストは GitHub の REST API から 1 時間あたり 5,000 回取得できます。インタラクティブな使用には十分です。
後で書き込みアクセス(issue の作成、PR へのコメント)が必要になった場合は、
requests.post/patchを使用して新しい@mcp.tool()関数を追加してください。GitHub の状態を変更するツールが明確になるよう、分離して明確な名前を付けてください。これを claude.ai/Cowork から利用可能にしたい場合(Claude Code CLI/VS Code だけでなく)、stdio トランスポートから OAuth を使用したホスト型 HTTP サーバーに移行する必要があります。これは大幅に大きなステップであり、そのリーチが必要な場合にのみ価値があります。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceRead-only GitHub MCP server that lets assistants search and read repositories, issues, pull requests, commits, and file contents, scoped to the user's personal access token.MIT
- AlicenseNot gradedqualityDmaintenanceEnables GitHub API integration via MCP, allowing search, repository details, file contents, and issue management.452ISC
- FlicenseNot gradedqualityDmaintenanceEnables managing GitHub repositories, files, and user information through MCP, with support for creating, updating, and deleting repository contents, as well as fetching user profiles.1
- FlicenseNot gradedqualityCmaintenanceEnables natural language interaction with GitHub through an MCP server. Supports reading repos, issues, and PRs, as well as creating and editing issues with user confirmation.
Related MCP Connectors
GitHub Private MCP Pack — access private repos, org data via OAuth.
An MCP server that gives your AI access to the source code and docs of all public github repos
Turn a GitHub repo or docs site into agent-ready context: pack it or search it, over MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/VishalBasker/github-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server