GitHub GraphQL API MCP
About
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.
Details
- Author
- wanzunz
- Downloads
- 365
- Categories
- Developer Tools, API
Jump to
- 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)
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
GitHub GraphQL API MCPCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
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.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"github graphql api mcp": {
"github_graphql_api_mcp": {
"command": "python",
"args": [
"-m",
"venv",
".venv"
]
}
}
}
}
McpServers
{
"github_graphql_api_mcp": {
"command": "python",
"args": [
"-m",
"venv",
".venv"
]
}
}
GitHub GraphQL API MCP
English | 中文 | 日本語 | Español | Français
A tool based on MCP (Model Control Protocol) for querying and using the GitHub GraphQL API. This project provides a server that allows you to explore the GitHub GraphQL schema and execute GraphQL queries through MCP client tools (such as Claude AI).
Why Use GitHub GraphQL API
GitHub GraphQL API offers significant advantages over traditional REST APIs:
- Precise Data Retrieval: GraphQL allows clients to specify exactly which fields they need, avoiding excess data
- Reduced Token Consumption: By requesting only necessary fields, API response size is significantly reduced, lowering AI model token consumption
- Single Request for Related Data: One query can retrieve multiple related resources, reducing the number of requests
- Self-Documenting: Through its built-in documentation system, you can directly query and understand the API schema without external documentation
- Strong Type System: Provides type checking, reducing errors
This project leverages these advantages to provide tools that help you effectively explore the GitHub GraphQL API schema and execute optimized queries, providing AI assistants with efficient GitHub data retrieval capabilities.
Application Scenarios
Basic Functions
This tool easily implements the following common operations:
1. Repository Basic Information Query: Get repository name, description, star count, branch list, and other basic information
2. Issue Data Retrieval: Query issue lists, details, or comment content for specific repositories
3. User Profile Access: Retrieve users' personal profiles, contribution statistics, and other public information
4. Pull Request Status View: Get PR basic status, comment content, and merge information
5. Project Dependency Query: Retrieve project dependency package lists and version information
Exploratory Advanced Functions
With GraphQL's flexible query capabilities, you can also try to implement the following advanced analysis functions:
1. Repository Contribution Trend Analysis: Analyze code update frequency and contributor participation by aggregating commit data, evaluating project activity
2. Issue Management and Classification: Organize issue data according to custom conditions, discover problems that need priority handling, and improve project management efficiency
3. Code Review Pattern Analysis: Analyze PR comments and review processes, identify common problem patterns, and optimize code review workflow
4. Contributor Network Visualization: Build collaboration relationships between project contributors, discover key contributors and areas of expertise
5. Dependency Health Assessment: Evaluate the update frequency and potential security issues of project dependencies, providing dependency management suggestions
Features
- Query GitHub GraphQL schema root types (Query/Mutation)
- Get detailed documentation for specific types
- Query documentation and parameters for specific fields
- Execute GitHub GraphQL API queries directly, precisely retrieving needed data, reducing token consumption
- Bilingual support (English/Chinese)
Prerequisites
- Python 3.10 or higher
- GitHub personal access token (for accessing the GitHub API)
- Poetry (recommended dependency management tool)
Installation
1. Clone the repository:
git clone https://github.com/wanzunz/github_graphql_api_mcp.git
cd github_graphql_api_mcp
2. Install dependencies using Poetry:
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





