MCP.so
登录

GitHub GraphQL API MCP

@wanzunz

关于 GitHub GraphQL API MCP

A Model Control Protocol (MCP) server for exploring the GitHub GraphQL schema and executing optimized queries. Provides AI assistants with efficient GitHub data retrieval capabilities through GraphQL.

基本信息

分类

版本控制

运行时

python

传输方式

stdio

发布者

wanzunz

配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "github_graphql_api_mcp": {
      "command": "python",
      "args": [
        "-m",
        "venv",
        ".venv"
      ]
    }
  }
}

工具

未检测到工具

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is GitHub GraphQL API MCP?

An MCP (Model Control Protocol) server that enables querying and using the GitHub GraphQL API. It allows users to explore the GraphQL schema, view type documentation, and execute custom GraphQL queries through MCP clients like Claude AI.

How to use GitHub GraphQL API MCP?

Clone the repository, install dependencies with Poetry (poetry install), activate the virtual environment, create a .env file with a GITHUB_TOKEN, and run python github_graphql_api_mcp_server.py. For one-click startup, configure the server in the Claude desktop app by providing the Python interpreter path, project directory, and script name.

Key features of GitHub GraphQL API MCP

  • Query GitHub GraphQL schema root types (Query/Mutation)
  • Get detailed documentation for specific types and fields
  • Execute GitHub GraphQL API queries directly
  • Precisely retrieve needed data, reducing token consumption
  • Bilingual support (English and Chinese)

Use cases of GitHub GraphQL API MCP

  • Query repository basic information (name, description, star count, branches)
  • Retrieve issue lists, details, and comments for a repository
  • Access user profiles and contribution statistics
  • View pull request status, comments, and merge info
  • Analyze repository contribution trends and dependency health

FAQ from GitHub GraphQL API MCP

What are the prerequisites?

Python 3.10 or higher, a GitHub personal access token, and Poetry (recommended) for dependency management.

How do I set up authentication?

Create a .env file in the project root with GITHUB_TOKEN="your_github_token_here". Do not commit this file to version control.

What tools does the server provide?

It provides four tools: print_type_field (query fields of root types), graphql_schema_root_type (documentation for Query/Mutation), graphql_schema_type (documentation for specific types), and call_github_graphql (execute custom GraphQL queries).

How can I start the server for use with Claude Desktop?

Configure mcpServers in Claude desktop settings with the Python interpreter path, the --directory argument pointing to the project folder, and run github_graphql_api_mcp_server.py. Example configurations are provided in the README.

What are the advantages of using GraphQL over REST for the GitHub API?

GraphQL allows precise data retrieval (only needed fields), reduces token consumption, enables single-request access to multiple related resources, is self-documenting, and has a strong type system to reduce errors.

评论

版本控制 分类下的更多 MCP 服务器