GitHub GraphQL API MCP logo

GitHub GraphQL API MCP

by wanzunz

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).

View on GitHub

Last updated: N/A

What is GitHub GraphQL API MCP?

GitHub GraphQL API MCP is a server that leverages the Model Control Protocol (MCP) to provide an interface for querying and interacting with the GitHub GraphQL API. It allows users to explore the GitHub GraphQL schema, execute queries, and retrieve data efficiently, especially when used with AI assistants like Claude.

How to use GitHub GraphQL API MCP?

  1. Clone the repository. 2. Install dependencies using Poetry or pip. 3. Configure a GitHub personal access token in a .env file. 4. Start the server using python github_graphql_api_mcp_server.py. 5. Configure the server in your MCP client (e.g., Claude AI) and use the available tools to query the schema and execute GraphQL queries.

Key features of GitHub GraphQL API MCP

  • 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)

Use cases of GitHub GraphQL API MCP

  • Repository Basic Information Query

  • Issue Data Retrieval

  • User Profile Access

  • Pull Request Status View

  • Project Dependency Query

  • Repository Contribution Trend Analysis

  • Issue Management and Classification

  • Code Review Pattern Analysis

  • Contributor Network Visualization

  • Dependency Health Assessment

FAQ from GitHub GraphQL API MCP

What is the GitHub GraphQL API MCP?

It's a server that allows you to query the GitHub GraphQL API using the Model Control Protocol (MCP), enabling efficient data retrieval for AI assistants and other applications.

Why use GitHub GraphQL API over REST?

GraphQL offers precise data retrieval, reduced token consumption, single requests for related data, self-documentation, and a strong type system.

What are the prerequisites for using this server?

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

How do I configure the server in Claude AI?

Go to Claude's settings, find the MCP server configuration section, and add a configuration pointing to the github_graphql_api_mcp_server.py script with the correct Python interpreter path and project directory.

What are some available tools provided by the server?

The server provides tools like print_type_field, graphql_schema_root_type, graphql_schema_type, and call_github_graphql for querying the schema and executing GraphQL queries.