DocsWorking with AIMCP Server
Back
Working with AI

MCP Server

Exponential ships an MCP (Model Context Protocol) server so AI agents can manage issues with structured tool calls instead of shelling out to the CLI.

Setup

Create a .mcp.json at your repo root. This is checked into git, so every contributor gets the same tools:

{
  "mcpServers": {
    "xpo": {
      "command": "xpo",
      "args": ["mcp"]
    }
  }
}

User-level

Add it globally so it applies to every project:

claude mcp add xpo xpo mcp

Or manually add the snippet to ~/.claude/settings.json under mcpServers.

After any method, restart Claude Code (or run /mcp in-session).

Available tools

ToolDescription
listList issues with filters (status, label, assignee, parent, text match)
showFetch one issue with description, dependencies, and comments. include_spec, include_walkthrough, and include_events inline more
historyEvent audit trail for an issue
addCreate an issue with status, labels, parent, story points, links. before/after place it next to another issue
updatePatch any subset of fields. links replaces the full relationship set, null clears assignee, cycle_id, priority, story_points and parent, and before/after reorder
commentAdd a markdown comment
linkAdd a relationship between two issues (bidirectional; one link per pair, overwrite replaces it; only blocked_by gates start)
unlinkRemove one relationship, whichever issue stores it
startStart work: set to DOING, assign to the agent's principal, create a worktree. Returns the worktree path. Safe to call again from inside the worktree
mergeMerge a committed worktree into the default branch (squash by default), close the issue, and clean up the worktree
specRead, write, or delete an issue's design spec
walkthroughRead, write, or delete an issue's implementation walkthrough
artifactAttach, read, list, or delete other files on an issue
rationaleSearch specs and walkthroughs for prior design decisions

Git tools

Read-only tools for what an issue changed and why code looks the way it does:

ToolDescription
git_statusAn issue branch's state: ahead/behind the default branch, and staged, unstaged and untracked files in its worktree
git_diffWhat an issue changed, from its merge base to its worktree, including uncommitted changes. stat for the file list only
git_logCommits on an issue's branch, or on the default branch, optionally only those touching a path
git_showOne commit's metadata, message and patch
code_historyThe commits and issues that touched a file or a line range. Pair it with rationale or spec to explain why code is the way it is

xpo builds every git command itself: the caller gives only an issue ID, a path, a SHA, a line range and a limit. External diff, textconv, fsmonitor and hooks never run, and the tools take no index locks. Output is capped at 64 KiB and marked truncated: true.

Reduce permission prompts

Allow-list the xpo tools in .claude/settings.json:

{
  "permissions": {
    "allow": [
      "mcp__xpo__*"
    ]
  }
}

All xpo changes are git-tracked, so any mistake is recoverable with git.