Custom GitHub Issues MCP Server
Provides tools to authenticate with GitHub, list issues in repositories while filtering out pull requests, scan open issues across all accessible repositories, and create, update, and close issues with labels, assignees, comments, and state reasons.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Custom GitHub Issues MCP Server (Python / stdio)
A modular Model Context Protocol (MCP) server built from scratch in Python using the official mcp 2.x SDK (MCPServer), httpx, pydantic, and python-dotenv. It runs locally over stdio (no Docker required) and authenticates with your GitHub Personal Access Token (PAT) to inspect and manage issues across both public and private repositories.
Architecture
MCP Host / AI Client (Claude Desktop, Cursor, VS Code, Antigravity)
│
│ JSON-RPC over stdin / stdout (no Docker, no HTTP port)
▼
server.py (MCPServer tool definitions & stderr-only logging)
│
│ Pydantic v2 validation + async calls
▼
github_client.py (httpx.AsyncClient + PAT auth + pagination + error handling)
│
│ HTTPS (Authorization: Bearer <GITHUB_TOKEN>)
▼
GitHub REST API (https://api.github.com)Related MCP server: github-commits-mcp
Key Engineering Decisions
Pure
stdioTransport Discipline: Logs and diagnostics write strictly tostderrsostdoutcarries only valid MCP JSON-RPC frames.Pull Request Filtering & Accurate Pagination: GitHub's
/repos/{owner}/{repo}/issuesendpoint returns Pull Requests alongside Issues.list_repo_issuesfilters out items containing"pull_request"and paginates until the requested number of actual issues is collected.Concurrent Cross-Repo Scanning:
get_all_open_issues_across_reposqueries/user/repos?visibility=all, skips repos with issues disabled or zero open items, and scans remaining repos concurrently withasyncio.Semaphore(5)to stay fast without triggering secondary rate limits.Agent-Friendly Error Translation: Missing/placeholder tokens, invalid
owner/repoformats,401auth failures,403/429rate limits (with UTC reset timestamps),404missing resources, and422validation errors are converted into structured, readable JSON error messages.Testability Without Live Credentials:
GitHubClientsupports an injectablehttpx.AsyncBaseTransportso the entirepytestsuite runs offline againsthttpx.MockTransport.
Project Structure
server.py—MCPServer(mcp2.x) exposing@mcp.tool()endpoints overstdiogithub_client.py— Async GitHub REST API wrapper, Pydantic input validators, pagination, and error handlingtests/— Offlinepytestunit tests for validation, pagination, PR filtering, error mapping, and MCP tool outputsverify_github.py— Standalone live check for PAT authentication (/user), repo access, and cross-repo scanningtest_mcp_stdio.py— End-to-end live MCPstdioclient test harness.github/workflows/ci.yml— GitHub Actions CI runningruff check .andpytest -von Python 3.11 & 3.12pyproject.toml— Project metadata,pytest, andruffconfigurationrequirements.txt&requirements-dev.txt— Runtime and dev/test dependencies.env.example&.gitignore— Environment template and ignore rules for.envand.venv/LICENSE— MIT License
Implemented MCP Tools
Tool | Purpose |
| Confirms PAT authentication via |
| Lists |
| Scans all accessible public & private repos and groups open issues by repo |
| Creates a new issue with |
| Updates |
| Closes an issue with an optional closing |
Quick Start
1. Create a Virtual Environment & Install Dependencies (Python 3.11+)
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt2. Configure Your GitHub Personal Access Token
Copy
.env.exampleto.env:Copy-Item .env.example .envGenerate a GitHub Personal Access Token:
Fine-grained PAT (recommended): GitHub → Settings → Developer settings → Personal access tokens → Fine-grained tokens → select target repositories (or All repositories) → Repository permissions → Issues: Read and write and Metadata: Read-only.
Classic PAT: GitHub → Settings → Developer settings → Personal access tokens → Tokens (classic) → select the
reposcope (needed for private repositories).
Paste the token into
.env:GITHUB_TOKEN=your_real_token_here
3. Run Offline Unit Tests & Linter (CI Suite)
pip install -r requirements-dev.txt
ruff check .
pytest -v4. Verify Live GitHub & MCP stdio Integration
# Verify PAT authentication and repo scan
python verify_github.py
# Run end-to-end stdio MCP client check (read-only)
python test_mcp_stdio.py --repo your-username/your-test-repo
# Optional: full create -> update -> close lifecycle test on a scratch repo
python test_mcp_stdio.py --repo your-username/your-test-repo --write-testLaunch the interactive MCP Inspector directly with your .venv Python (requires Node.js + npx, no uv needed):
npx @modelcontextprotocol/inspector .\.venv\Scripts\python.exe server.py5. Connect to an MCP Client
Point your MCP client configuration to .venv\Scripts\python.exe and server.py:
{
"mcpServers": {
"github-issues": {
"command": "E:\\Projects mysekf\\MCP server\\.venv\\Scripts\\python.exe",
"args": ["E:\\Projects mysekf\\MCP server\\server.py"]
}
}
}Example natural-language prompts once connected:
"Verify my GitHub MCP authentication."
"Which issues are still open across all my repos?"
"Create an issue in
owner/repotitled 'Fix pagination edge case' with label 'bug'.""Close issue #12 in
owner/repowith a comment explaining it was resolved in v0.1.0."
Security Notes
GITHUB_TOKENis loaded from.env(gitignored) and never hardcoded.server.pylogs strictly tostderrsostdoutremains clean for MCP JSON-RPC frames.Error handlers translate
401,403/429rate-limit resets,404, and422responses into human-readable messages without leaking credentials.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Task management for people and AI agents, with scoped OAuth access to issues, projects, and docs.
Task management for people and AI agents, with scoped OAuth access to issues, projects, and docs.
Manage repositories, users, releases, and automate GitHub workflows
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables LLMs to list, create, and comment on GitHub issues using your own GitHub identity via stdio transport.3MIT
- FlicenseNot gradedqualityDmaintenanceEnables querying today's GitHub commits, performing local git operations (status, diff, add, commit, push), and creating GitHub issues through natural language.-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to list, search, and inspect issues on any public GitHub repository via natural language.MIT
- FlicenseNot gradedqualityDmaintenanceExposes GitHub issue operations as tools for LLM agents, enabling listing, creating, commenting on, closing, and searching issues via natural language.-