Skip to content

MCP Server

Planning Game includes an MCP (Model Context Protocol) server that exposes 45+ tools for AI agent integration.

MCP is a protocol that allows AI agents (Claude, Codex, etc.) to interact with external tools. Planning Game’s MCP server lets agents create tasks, update statuses, manage sprints, and more — all programmatically.

Terminal window
claude mcp add planning-game \
-e GOOGLE_APPLICATION_CREDENTIALS=/path/to/serviceAccountKey.json \
-- node /path/to/planning-game-xp/mcp/index.js

You can connect multiple Planning Game instances (different Firebase projects):

Terminal window
# Production instance
claude mcp add planning-game-pro \
-e MCP_INSTANCE_DIR=/path/to/instances/geniova \
-- node /path/to/planning-game-xp/mcp/index.js
# Personal instance
claude mcp add planning-game-personal \
-e MCP_INSTANCE_DIR=/path/to/instances/personal \
-- node /path/to/planning-game-xp/mcp/index.js

Before using MCP tools, configure your identity:

setup_mcp_user({ email: "your@email.com" })

This creates a .mcp-user.json file that links your identity to a developer ID.

CategoryToolsDescription
Projectslist_projects, get_project, update_project, create_project, discover_projectProject management
Cardslist_cards, get_card, create_card, update_card, relate_cardsTask/bug/epic CRUD
Sprintslist_sprints, get_sprint, create_sprint, update_sprintSprint management
ADRslist_adrs, get_adr, create_adr, update_adr, delete_adrArchitecture decisions
Planslist_plans, get_plan, create_plan, update_plan, delete_planDevelopment plans
Configlist_global_config, get_global_config, create_global_config, update_global_config, delete_global_configShared configurations & guidelines
Guidelinessync_guidelines, get_guideline_history, restore_guideline_versionGuidelines sync & versioning
Teamlist_developers, list_stakeholdersTeam members
Usersprovision_user, delete_userUser provisioning & management
Diagnosticspg_doctor, pg_configServer health checks and configuration viewer

The MCP server supports fuzzy project ID resolution. You can use:

  • Exact key: "PlanningGame"
  • Case-insensitive: "planninggame"
  • Project name: "Planning Game"
  • Abbreviation: "PLN"
  • Repository URL: "https://github.com/manufosela/planning-game-xp"

If no match is found, the server returns a list of available projects.

The MCP server enforces the same rules as the UI:

  • Required fields for status transitions
  • WIP limits (one task “In Progress” per developer)
  • Validators cannot be bypassed
  • Pipeline tracking (commits, PR info) required for “To Validate”
  • Sprint date immutability when tasks are In Progress or To Validate
  • Work cycle tracking (start/end times, accumulated duration)

Run the interactive setup wizard to configure a new MCP instance:

Terminal window
node mcp/cli.js init

The wizard guides you through:

  1. Prerequisites check (Node.js 18+, Git)
  2. Instance name & description
  3. Firebase credentials (serviceAccountKey.json)
  4. Database URL & connectivity test
  5. User identity (developer ID)
  6. Configuration file generation (pg.config.yml)
  7. Guidelines sync from Firebase

The MCP server supports centralized guidelines stored in Firebase:

  • Auto-versioning: Each content update increments the version and saves history
  • Sync to local files: sync_guidelines downloads guidelines as local files
  • Version history: View and restore previous versions
  • Auto-check on startup: Warns if local guidelines are outdated
  • Admin UI: Manage guidelines from the project administration page
  • Migration script: Import existing CLAUDE.md files into Firebase guidelines

Every MCP response includes _instance metadata with the Firebase project ID and instance name. This helps identify which instance is responding when multiple instances are connected.