The agentic task substrate for AI coding agents. An MCP server that turns GitHub Projects v2 into a fully autonomous project management platform — AI agents self-assign work, track progress, review each other, and ship code, all backed by GitHub-native storage.
: You have AI agents (Claude Code, Codex, Cursor, Windsurf, Roo). They need a task backbone. This is it.
This MCP server implements the Model Context Protocol to provide a complete agentic project management layer over GitHub Projects v2. AI agents register, self-assign tasks, coordinate via heartbeats, submit work products for review, and operate within token budgets — all through 20 compound tools exposing 169 actions. Human project managers get AI-powered PRD generation, sprint planning, issue triage, and roadmap creation. Everything is backed by GitHub-native storage (issues, project fields, comments) — no external infrastructure required.
Why This Exists
AI coding agents are powerful but stateless — they don't know what to work on next, can't coordinate with other agents, and have no persistent task memory. This MCP server solves that by turning GitHub Projects into an agentic operating layer:
Problem
Solution
Agents don't know what to work on
Task checkout with priority/skills/deadline strategies
Multiple agents step on each other
Atomic claims with TOCTOU guards + review workflow
No visibility into agent work
Heartbeat monitoring + activity dashboard + work product tracking
Agents burn unlimited tokens
Per-agent token budgets with warning thresholds and hard stops
Ideas don't become tasks
PRD→Tasks→Issues pipeline with AI-powered breakdown
Sprint planning is manual
AI sprint planning with capacity analysis and risk assessment
Issues pile up untriaged
AI-powered triage with auto-labeling and priority assignment
Need external databases
Zero infra — all state in GitHub issues, projects, and comments
Works With
Agent / Client
Integration
Claude Desktop
Native MCP client — add to claude_desktop_config.json
Claude Code
MCP server via stdio transport
Codex
MCP-compatible — register as tool provider
Cursor
MCP server integration
Windsurf
MCP server integration
Roo Code
MCP server integration
VS Code + Copilot
Via MCP extension
Custom harnesses
Any MCP-compatible client — see examples/basic/agent-loop.ts
Oh My Pi / OpenCode
Native MCP harness with stdio transport
MCP v2 Protocol Support
Beyond tools, this server implements the full MCP v2 capability surface:
# Install the package globally
npm install -g mcp-github-project-manager
# Set up your environment variables
export GITHUB_TOKEN="your_github_token"
export GITHUB_OWNER="your_github_username_or_organization"
export GITHUB_REPO="your_repository_name"
# Run the MCP server
mcp-github-project-manager
Using Docker
# Build the Docker image
docker build -t mcp-github-project-manager .
# Run with environment variables
docker run -it \
-e GITHUB_TOKEN=your_github_token \
-e GITHUB_OWNER=your_github_username_or_organization \
-e GITHUB_REPO=your_repository_name \
mcp-github-project-manager
Intelligent Task Breakdown (parse_prd): AI-powered parsing of PRDs into actionable development tasks
Smart Feature Addition (add_feature): Add new features with automatic impact analysis and task generation
Task Complexity Analysis (analyze_task_complexity): Detailed AI analysis of task complexity, effort estimation, and risk assessment
Next Task Recommendations (get_next_task): AI-powered recommendations for optimal task prioritization
Task Expansion (expand_task): Break down complex tasks into manageable subtasks automatically
PRD Enhancement (enhance_prd): Improve existing PRDs with AI-powered gap analysis and improvements
Task Materialization (materialize_tasks): Convert generated tasks into real GitHub issues grouped into milestones and sprints with dependency-driven phase ordering
🎯 Enhanced Task Context Generation
Traceability-Based Context (Default): Rich context from requirements traceability without AI dependency
AI-Enhanced Context (Optional): Comprehensive business, technical, and implementation context using AI
Configurable Context Levels: Choose between minimal, standard, and full context depth
Business Context: Extract business objectives, user impact, and success metrics
Technical Context: Analyze technical constraints, architecture decisions, and integration points
Project Convergence: Auto-approve/reject/decompose in one call (converge_project)
Registry Cleanup: Remove stale agents automatically
Task Materialization: Bridge from PRD tasks to GitHub issues with milestones, sprints, and project assignment
Installation
Option 1: Install from npm (recommended)
# Install the package globally
npm install -g mcp-github-project-manager
# Or install in your project
npm install mcp-github-project-manager
Option 2: Install from source
# Clone the repository
git clone https://github.com/kunwarVivek/mcp-github-project-manager.git
cd mcp-github-project-manager
# Install dependencies (npm or pnpm - use whichever you have)
pnpm install
# Build the project
pnpm run build
Set up environment variables
# Copy the example environment file
cp .env.example .env
# Edit .env with your GitHub token and details
AI keys are optional — without them, non-AI tools (project management, issues, sprints, agents) work fine. AI-powered features (ai_generate, ai_analyze, ai_plan) need at least one key.
# Global AI provider keys (set the ones you have)
ANTHROPIC_API_KEY=your_anthropic_api_key_here
OPENAI_API_KEY=your_openai_api_key_here
GOOGLE_API_KEY=your_google_api_key_here
PERPLEXITY_API_KEY=your_perplexity_api_key_here
# AI Model Configuration (no defaults — configure what you want to use)
AI_MAIN_MODEL=claude-sonnet-4-20250514 # general tasks
AI_PRD_MODEL=claude-opus-5 # PRD generation
AI_RESEARCH_MODEL=sonar-pro # research
AI_FALLBACK_MODEL=gpt-4o-mini # fallback
Per-Role Provider Configuration (optional)
Each model role can independently use a different provider, API key, and endpoint.
Use openai-compatible for OpenRouter, Together, Groq, Ollama, or any OpenAI-protocol endpoint:
# OpenRouter for cheap daily tasks
AI_MAIN_PROVIDER=openai-compatible
AI_MAIN_BASE_URL=https://openrouter.ai/api/v1
AI_MAIN_API_KEY=sk-or-v1-your-key
AI_MAIN_MODEL=deepseek/deepseek-chat
# Direct Anthropic for PRD generation
AI_PRD_PROVIDER=anthropic
AI_PRD_API_KEY=sk-ant-your-key
AI_PRD_MODEL=claude-opus-5
# Local Ollama as fallback
AI_FALLBACK_PROVIDER=openai-compatible
AI_FALLBACK_BASE_URL=http://localhost:11434/v1
AI_FALLBACK_API_KEY=ollama
AI_FALLBACK_MODEL=llama3.1
# Start the MCP server using stdio transport
mcp-github-project-manager
# Start with environment variables
GITHUB_TOKEN=your_token mcp-github-project-manager
# Start with command line arguments
mcp-github-project-manager --token=your_token --owner=your_username --repo=your_repo
# Use a specific .env file
mcp-github-project-manager --env-file=.env.production
# Show verbose output
mcp-github-project-manager --verbose
# Display help information
mcp-github-project-manager --help
Running from source with TypeScript
If you're developing or running from source:
# Use the npm dev script (watches for changes) — recommended
pnpm run dev
# Run directly with tsx
pnpm exec tsx src/index.ts
# Run with command line arguments
pnpm exec tsx src/index.ts --token=your_token --owner=your_username --repo=your_repo
# Display help information
pnpm exec tsx src/index.ts --help
Command Line Options
Option
Short
Description
--token <token>
-t
GitHub personal access token
--owner <owner>
-o
GitHub repository owner (username or organization)
--repo <repo>
-r
GitHub repository name
--env-file <path>
-e
Path to .env file (default: .env in project root)
--verbose
-v
Enable verbose logging
--help
-h
Display help information
--version
Display version information
Command line arguments take precedence over environment variables.
As a Node.js module
import { Server } from "mcp-github-project-manager";
// Create and start an MCP server instance
const server = new Server({
transport: "stdio", // or "http" for HTTP server
config: {
githubToken: process.env.GITHUB_TOKEN,
githubOwner: process.env.GITHUB_OWNER,
githubRepo: process.env.GITHUB_REPO
}
});
server.start();
Integration with MCP clients
// Example using an MCP client library
import { McpClient } from "@modelcontextprotocol/client";
import { spawn } from "child_process";
// Create a child process running the MCP server
const serverProcess = spawn("mcp-github-project-manager", [], {
env: { ...process.env, GITHUB_TOKEN: "your_token" }
});
// Connect the MCP client to the server
const client = new McpClient({
transport: {
type: "process",
process: serverProcess
}
});
// Call MCP tools (compound API)
const result = await client.callTool("manage_project", {
action: "create",
title: "My Project",
owner: "myorg"
});
The MCP server exposes 20 compound tools (169 actions). Each tool accepts an action parameter that routes to the underlying operation. Use discover_tools to explore capabilities at runtime.
Quick Start Workflow
// 1. Create a project
{"tool": "manage_project", "arguments": {"action": "create", "title": "My Project", "owner": "myorg"}}
// 2. Create an issue
{"tool": "manage_issues", "arguments": {"action": "create", "title": "First Issue", "body": "Description here"}}
// 3. Register an AI agent
{"tool": "agent_work", "arguments": {"action": "register", "name": "claude-eng-1", "role": "engineer"}}
// 4. Agent checks out a task
{"tool": "agent_work", "arguments": {"action": "checkout_task", "agentId": "agent-abc123", "strategy": "highest_priority"}}
// 5. Discover available tools at runtime
{"tool": "discover_tools", "arguments": {}}
{"tool": "discover_tools", "arguments": {"group": "manage_issues", "action": "create", "includeSchemas": true}}
// Add new feature with complete lifecycle
{"tool": "ai_generate", "arguments": {"action": "add_feature", "featureIdea": "Advanced Analytics Dashboard", "description": "Real-time analytics with AI insights", "expandToTasks": true}}
// Automatically creates: business requirements, use cases, tasks with traceability, lifecycle tracking
// Create traceability matrix
{"tool": "ai_generate", "arguments": {"action": "create_traceability_matrix", "projectId": "task-ai-pro", "validateCompleteness": true}}
Tool Discovery
// List all compound tools
{"tool": "discover_tools", "arguments": {}}
// Explore a specific tool's actions
{"tool": "discover_tools", "arguments": {"group": "ai_generate"}}
// Get full schema for a specific action
{"tool": "discover_tools", "arguments": {"group": "ai_generate", "action": "generate_prd", "includeSchemas": true}}
MCP_TOOL_GROUPS Configuration
Control which compound tools are exposed to MCP clients:
# Default: all tools exposed
MCP_TOOL_GROUPS=all
# Expose only project management tools
MCP_TOOL_GROUPS=core
# Add AI tools
MCP_TOOL_GROUPS=core,ai
discover_tools is always available regardless of this setting.
Context Generation Levels:
Minimal: Basic traceability context only (fastest)
Standard: Traceability + basic business context (default)
Full: Complete AI-enhanced context with implementation guidance
🧪 Testing Enhanced Context Generation
The enhanced context generation functionality includes comprehensive test coverage:
Test Files Created:
src/__tests__/TaskContextGenerationService.test.ts - Core context generation service tests
AI-enhanced context generation (when AI is available)
Graceful fallback when AI services are unavailable
Configuration validation and environment variable handling
Error handling and resilience testing
Integration testing with existing task generation pipeline
Running Context Generation Tests:
# Run all AI-related tests (includes context generation)
pnpm run test:ai
# Run specific context generation tests
pnpm test TaskContextGeneration
pnpm test enhanced
# Run all tests
pnpm test
🧪 Comprehensive E2E Testing Suite
The MCP GitHub Project Manager includes a comprehensive end-to-end testing suite that tests all MCP tools through the actual MCP interface with both mocked and real API calls.
Test Coverage:
✅ 20 Compound Tools (169 actions) - Complete CRUD operations for projects, milestones, issues, sprints, labels, and more
✅ Real API Testing - Optional testing with actual GitHub and AI APIs
✅ Schema Validation - Comprehensive argument validation for all tools
✅ Error Handling - Graceful error handling and recovery testing
Quick Start:
# Run comprehensive E2E tests (mocked APIs)
pnpm run test:e2e:tools
# Run with real APIs (requires credentials)
pnpm run test:e2e:tools:real
# Use the interactive test runner
pnpm run test:e2e:runner
# Run specific test categories
pnpm run test:e2e:tools:github # GitHub tools only
pnpm run test:e2e:tools:ai # AI tools only
pnpm run test:e2e:tools:workflows # Integration workflows
# At least one AI API key required
ANTHROPIC_API_KEY=sk-ant-your-anthropic-key
OPENAI_API_KEY=sk-your-openai-key
GOOGLE_API_KEY=your-google-ai-key
PERPLEXITY_API_KEY=pplx-your-perplexity-key
Enable Real API Testing:
E2E_REAL_API=true pnpm run test:e2e:tools:real
Test Features:
Tool Registration Validation - Verify all tools are properly registered with correct schemas
MCP Protocol Compliance - Ensure all tools follow MCP specification
Response Format Validation - Validate tool responses match expected formats
Workflow Integration Testing - Test complex multi-tool workflows
Credential Management - Graceful handling of missing credentials
The E2E test suite ensures that all MCP tools work correctly both individually and in complex workflows, providing confidence in the reliability and integration of the entire system.
Test Scenarios Covered:
✅ Default traceability-based context (no AI required)
If you encounter permission issues, make sure your GitHub token has the required permissions listed in the Configuration section.
Agent Orchestration
The agent orchestration layer enables autonomous AI agents (Claude Code, Codex, Cursor, etc.) to self-assign tasks, report progress, submit work products, and operate within token budgets — all backed by GitHub-native storage.
How It Works
Agents interact with the orchestration layer through two compound tools — agent_work (task lifecycle) and agent_manage (administration):
See .planning/STATUS.md for detailed implementation status.
| Resource Management | ✅ Complete | With optimistic locking and relationship tracking |
| Response Handling | ✅ Complete | Rich content formatting with multiple content types |
| Error Handling | ✅ Complete | Comprehensive error mapping to MCP error codes |
| State Management | ✅ Complete | With conflict resolution and rate limiting |
Recent Improvements
Dependency & SDK modernization (2026-07-15):
Migrated to Vercel AI SDK v7 and Zod v4 (coupled upgrade; MCP SDK 1.29 accepts Zod 4)
Aligned Octokit type packages with @octokit/rest 22
Cleared the critical Handlebars vulnerability and all high-severity advisories
Architecture & reliability (2026-07-15):
Decomposed the ProjectManagementService facade (extracted IssueService, RoadmapService; automation delegates to ProjectAutomationService)
Broke a circular dependency; health check now performs a real GitHub rate-limit probe
Fail-closed webhook signature validation; file-mounted secrets (SECRETS_DIR) with rotation
Size-bounded cache eviction (MAX_CACHE_ENTRIES) and a namespace-index cleanup fix
Enhanced Resource System:
Added Zod schema validation for all resource types
Implemented resource relationship tracking
Created a centralized ResourceFactory for consistent resource access
Improved GitHub API Integration:
Added intelligent rate limiting with automatic throttling
Implemented pagination support for REST and GraphQL APIs
Enhanced error handling with specific error types
Advanced Tool System:
Created tool definition registry with Zod validation
Implemented standardized tool response formatting
Added example-based documentation for all tools
Rich Response Formatting:
Added support for multiple content types (JSON, Markdown, HTML, Text)
Implemented progress updates for long-running operations
Added pagination support for large result sets
Identified Functional Gaps
Remaining gaps prioritized for future development (updated 2026-07-15). The live,
code-verified status is in docs/remediation/GAP-TRACKER.md.
Distributed Caching:
ResourceCache now has persistence (CachePersistence) and size-bounded
oldest-first eviction (MAX_CACHE_ENTRIES). Still single-instance only —
no distributed/shared cache for multi-instance deployments.
Performance Optimization:
No query batching for related resources
Missing background refresh for frequently accessed resources
Incomplete prefetching for related resources
Data Visualization and Reporting (roadmap phase 11, not yet built):
No built-in visualization generators for metrics
Missing report generation capabilities
Limited time-series data analysis
Resolved since earlier snapshots: real-time webhook integration + SSE streaming,
automation-rule management, cache persistence + eviction, and a fail-closed
webhook signature check.
For an interactive exploration of the API, open the API Explorer in your browser.
Development
Testing
# Unit tests
pnpm test
# AI service/tool tests
pnpm run test:ai
# End-to-end tests
pnpm run test:e2e
# E2E MCP tool suite (mocked GitHub/AI)
pnpm run test:e2e:tools
Code Quality
# Lint code
pnpm run lint
# Type check
pnpm exec tsc --noEmit
# Format code
pnpm run format
Contributing
We welcome contributions to the GitHub Project Manager MCP Server! Please see our Contributing Guide for details on: