loading…
Search for a command to run...
loading…
Unofficial GitHub MCP server that provides access to GitHub's GraphQL API, enabling more powerful and flexible queries for repository data, issues, pull request
Unofficial GitHub MCP server that provides access to GitHub's GraphQL API, enabling more powerful and flexible queries for repository data, issues, pull requests, and other GitHub resources.
QuentinCody/github-graphql-mcp-server context
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
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"quentincody-github-graphql-mcp-server": {
"command": "npx",
"args": []
}
}
}