A Model Context Protocol (MCP) server that provides access to GitHub's GraphQL API. This server exposes a single tool that allows executing arbitrary GraphQL queries and mutations against GitHub's API. - Execute any GraphQL query against GitHub's API - Comprehensive error handling and reporting - Detailed documentation with example queries - Support for variables in GraphQL operations - Python 3.1
Add this skill
npx mdskills install QuentinCody/github-graphql-mcp-serverProvides flexible access to GitHub's GraphQL API with clear setup instructions and practical examples
A Model Context Protocol (MCP) server that provides access to GitHub's GraphQL API. This server exposes a single tool that allows executing arbitrary GraphQL queries and mutations against GitHub's API.
# On macOS/Linux
python3 -m venv .venv
source .venv/bin/activate
# On Windows
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
# If using a virtual environment, make sure it's activated
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Run the server with your GitHub token
GITHUB_TOKEN=your_github_token_here python github_graphql_mcp_server.py
Add the following to your Claude Desktop configuration file:
{
"github-graphql": {
"command": "/absolute/path/to/your/.venv/bin/python",
"args": [
"/absolute/path/to/github_graphql_mcp_server.py"
],
"options": {
"cwd": "/absolute/path/to/repository"
},
"env": {
"GITHUB_TOKEN": "your_github_token_here"
}
}
}
Replace /absolute/path/to/ with the actual path to your server file and add your GitHub token.
query GetRepo($owner: String!, $name: String!) {
repository(owner: $owner, name: $name) {
name
description
stargazerCount
url
createdAt
owner {
login
avatarUrl
}
}
}
Variables:
{
"owner": "octocat",
"name": "Hello-World"
}
query SearchRepos($query: String!, $first: Int!) {
search(query: $query, type: REPOSITORY, first: $first) {
repositoryCount
edges {
node {
... on Repository {
name
owner { login }
description
stargazerCount
url
}
}
}
}
}
Variables:
{
"query": "language:python stars:1000",
"first": 5
}
query GetUserInfo($login: String!) {
user(login: $login) {
name
login
bio
avatarUrl
followers {
totalCount
}
repositories(first: 5, orderBy: {field: STARGAZERS, direction: DESC}) {
nodes {
name
description
stargazerCount
}
}
}
}
Variables:
{
"login": "octocat"
}
Be aware of GitHub's API rate limits:
If you encounter issues:
spawn python ENOENT
/path/to/your/.venv/bin/python)ModuleNotFoundError: No module named 'httpx' (or other packages)
pip install -r requirements.txtError: GitHub token not found in environment variables
The server couldn't find your GitHub token
Solution: Make sure you've set the GITHUB_TOKEN environment variable
Install via CLI
npx mdskills install QuentinCody/github-graphql-mcp-serverGitHub GraphQL MCP Server is a free, open-source AI agent skill. A Model Context Protocol (MCP) server that provides access to GitHub's GraphQL API. This server exposes a single tool that allows executing arbitrary GraphQL queries and mutations against GitHub's API. - Execute any GraphQL query against GitHub's API - Comprehensive error handling and reporting - Detailed documentation with example queries - Support for variables in GraphQL operations - Python 3.1
Install GitHub GraphQL MCP Server with a single command:
npx mdskills install QuentinCody/github-graphql-mcp-serverThis downloads the skill files into your project and your AI agent picks them up automatically.
GitHub GraphQL MCP Server works with Claude Code, Claude Desktop, Cursor, Vscode Copilot, Windsurf, Continue Dev, Gemini Cli, Amp, Roo Code, Goose. Skills use the open SKILL.md format which is compatible with any AI coding agent that reads markdown instructions.