GitHub MCP Server
GitHub MCP Server
TypeScript で書かれたカスタム MCP(Model Context Protocol)サーバーで、Claude を GitHub の REST API に接続します。
できること
Claude が呼び出せる 6 つのツールを公開しています。
Tool | 説明 |
| 認証済みユーザーのリポジトリを一覧表示 |
| 特定のリポジトリの詳細を取得 |
| リポジトリの issue を一覧表示 |
| 新しい issue を作成 |
| リポジトリ内のファイルの内容を読み取る |
| GitHub でコードを検索する |
Related MCP server: remote-mcp-oauth-github
1. GitHub Personal Access Token を生成する
GitHub → Settings → Developer settings → Personal access tokens → Fine-grained tokens にアクセスします
必要な最小限の権限でトークンを作成します:
Contents: Read(get_file_content用)Issues: Read and write(list_issues/create_issue用)Metadata: Read(常に必須)
生成されたトークンをコピーします(
github_pat_...で始まります)
セキュリティのヒント: トークンをリポジトリにコミットしないでください。環境変数を使用してください。
2. インストールとビルド
npm install
npm run buildこれにより、サーバーの実行ファイルである build/index.js が生成されます(MCP の標準プロトコルである stdio 経由で通信します)。
3. ローカルでテストする(オプション、Claude なし)
export GITHUB_PERSONAL_ACCESS_TOKEN="seu_token_aqui"
npm startstderr に GitHub MCP server rodando via stdio. と表示されれば、正常に動作しています。ツールを対話的にテストするには、MCP Inspector を使用してください:
npx @modelcontextprotocol/inspector node build/index.js4. Claude Desktop に接続する
Claude Desktop の設定ファイルを編集します:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
以下を追加します:
{
"mcpServers": {
"github": {
"command": "node",
"args": ["/caminho/absoluto/para/github-mcp-server/build/index.js"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "seu_token_aqui"
}
}
}
}Claude Desktop を再起動します。GitHub のツールが、会話のツールアイコン(🔨)に表示されるはずです。
5. 次のステップ(ポートフォリオを拡張・強化するアイデア)
書き込み用ツールを追加する:
create_pull_request、merge_pull_request、create_branchper_pageだけではなく、実際のページネーション(カーソルベース)を追加するレート制限とキャッシュ(GitHub は認証済みで 5000 req/h に制限しています)
Vitest/Jest による自動テスト
push のたびに lint + テスト + ビルドを実行する GitHub Actions の CI
npm パッケージとして公開する(
npx github-mcp-server)サーバーを Docker 化する(他の DevOps プロジェクトとつなげる良いきっかけになります)
プロジェクトの構造
github-mcp-server/
├── src/
│ └── index.ts # lógica do servidor e definição das tools
├── build/ # gerado pelo `npm run build`
├── package.json
├── tsconfig.json
└── README.mdMaintenance
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 gradedqualityNot gradedmaintenanceConnects Claude Desktop to GitHub repositories, enabling users to perform git operations and GitHub API interactions through natural conversation.452
- AlicenseNot gradedqualityDmaintenanceEnables Claude to authenticate with GitHub OAuth and access tools for user information, calculations, and GitHub repositories.5MIT
- FlicenseAqualityBmaintenanceConnects Claude to GitHub, enabling listing repositories, browsing open pull requests, and inspecting PR diffs for code review.4
- FlicenseNot gradedqualityCmaintenanceEnables to interact with GitHub repositories directly from Claude, supporting actions like viewing repos, checking status, committing and pushing changes, and managing pull requests.
Related MCP Connectors
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analy…
Connect Claude to Fathom meeting recordings, transcripts, and summaries
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/luizHramoss/github-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server