gh-mcp
MCP 服务配置
复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用
{
"mcpServers": {
"gh": {
"args": [
"gh-mcp"
],
"command": "uvx"
}
}
}
服务介绍
Refined MCP server for GitHub
[!TIP]
If you haven't read the article The second wave of MCP: Building for LLMs, not developers by Vercel, I highly recommend checking it out to understand why we're building this project.
GitHub's official MCP Server exposes dozens of low-level tools that bloat token usage and are mostly impractical for LLMs. gh-mcp achieves the best of both worlds by providing powerful interfaces: GitHub GraphQL and Code Search, wrapped with smart abstractions.
This project does 3 things differently:
- Powerful interfaces exposes GraphQL and Code Search instead of atomized endpoints. LLMs already understand these APIs.
- YAML output makes nested data and file content readable without escaping.
- Clean abstractions
ghhandles authentication and low-level details. And LLMs know how to use its--jqoption to filter.
Swapping in gh-mcp delivers better performance at lower cost for any GitHub interactions.
Installation
with uv:
uvx mcp-hmr
MCP config:
{
"mcpServers": {
"gh": {
"command": "uvx",
"args": ["gh-mcp"]
}
}
}
If you prefer serving it via streamable-http:
uvx gh-mcp --http
[!NOTE]
This project requiresghCLI to be installed and authenticated. Please follow the instructions at cli.github.com to set it up. And then you can login viagh auth login. Check thatgh auth statusworks before using this MCP server.