GitHub MCP Server
GitHub MCP(模型上下文协议)服务器
嗨!这是我的第一个GitHub MCP 服务器,它允许像Claude这样的MCP 兼容LLM 与我的 MCP 服务器交互,从而与 GitHub API 交互。
要求
TypeScript(编程语言)
Octokit(用于向 GitHub 发出 API 请求)
模型上下文协议 SDK
在本地设置项目
克隆存储库
运行
npm install添加
.env文件,查看.env.example文件中提供的示例要将 TypeScript 文件构建为 Javascript,请运行
npx tsc要最终运行项目,请运行
node build/index.js
Related MCP server: GitHub MCP Server
测试方法
您可以通过两种方式测试您的 MCP 服务器:
MCP检查员
克劳德桌面
使用 MCP 检查器进行测试
只需在终端中运行
npx @modelcontextprotocol/inspector node build/index.js您现在可以看到MCP 检查器并进行测试。
使用 Claude Desktop 进行测试
从这里下载并安装 Claude Desktop
转到文件>设置...>开发人员>编辑配置
它应该打开 claude_desktop_config.json 文件的位置。
在代码编辑器中打开该文件并添加以下内容:
{ "mcpServers": { "gh": { "command": "node", "args": ["absolute\\path\\to\\your\\index.js\\file"], "env": { "GITHUB_TOKEN": "your-github-personal-access-token" } } } }退出并重新打开 Claude 桌面
功能
MCP主要支持两个功能:
工具(4)
create-issue:在 GitHub 存储库中创建新问题get-repo-info:获取有关特定 GitHub 存储库的信息list-issues:列出 GitHub 存储库中的问题search-repos:搜索 GitHub 存储库
提示(5)
create-issue-description:为 GitHub 问题生成描述create-pull-request-description:为 GitHub 拉取请求生成描述search-repos-prompt:生成用于搜索 GitHub 存储库的查询create-issue-prompt:生成用于创建 GitHub 问题的参数enhance-github-response:格式化并增强原始 GitHub API 响应数据
您可以编写自己的提示,也可以从 Claude 桌面版 MCP 的“选择集成”选项下拉菜单中选择合适的提示
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
- FlicenseBqualityDmaintenanceAn MCP server that enables Claude and other compatible LLMs to interact with the GitHub API, supporting features like creating issues, retrieving repository information, listing issues, and searching repositories.4
- AlicenseAqualityCmaintenancePython MCP server for GitHub operations, providing native tool integration with Claude Code and other MCP clients. It enables managing issues, pull requests, CI status, milestones, and batch operations via natural language.15MIT
- Alicense-qualityDmaintenanceA Model Context Protocol (MCP) server that enables AI assistants like Claude to interact with the GitHub API directly.168MIT
- Flicense-qualityDmaintenanceA working MCP server that connects to the real GitHub API, enabling users to manage repositories, issues, pull requests, and more through natural language in Claude Desktop.
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
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/alsonwangkhem/github-mcp-2'
If you have feedback or need assistance with the MCP directory API, please join our Discord server