Skip to main content
Glama

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

セットアップ

  1. GitHub パーソナルアクセストークンを作成(ファイングレイン、推奨): GitHub -> Settings -> Developer settings -> Personal access tokens -> Fine-grained tokens -> Generate new token.

    • リポジトリアクセス: Claude に読み取らせたいリポジトリを選択(または「All repositories」)

    • 権限: Contents: Read-onlyMetadata: Read-onlysearch_code を機能させたい場合は Code search: Read-only を追加)

  2. 依存関係をインストール:

    cd github-mcp-server
    python3 -m venv .venv
    source .venv/bin/activate
    pip install -r requirements.txt
  3. トークンを設定(スクリプトにハードコードしたり、どこにもコミットしないでください):

    export GITHUB_TOKEN=github_pat_xxxxxxxxxxxx

    永続化するには、その行を ~/.zshrc / ~/.bashrc に追加するか、direnv などのツールで .env ファイルを使用してください。ただし、gitignore されていることを確認してください。

  4. サーバーを 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
  5. 接続を確認:

    claude mcp list

    github-repos が接続済みとして表示されるはずです。その後、Claude Code セッションで「list my repos」や「read the README of my flight-delay-prediction repo」などと質問すると、Claude がこれらのツールを呼び出します。

  6. ローカルスモークテスト(クライアントなし)

    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 サーバーに移行する必要があります。これは大幅に大きなステップであり、そのリーチが必要な場合にのみ価値があります。

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    Not graded
    quality
    D
    maintenance
    Read-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
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables 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
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables 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.

View all related MCP servers

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.

View all MCP Connectors

Latest Blog Posts

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