Skip to main content

What is MCP?

The Model Context Protocol is an open standard that lets AI agents call structured tools. Enagrams ships an MCP server bundled with the enagrams npm package. Every tool below is callable from any MCP-compatible client (Cursor, Claude Code, Codex, Windsurf, custom).

Install

npx enagrams init writes the MCP config for every supported IDE automatically. If you’re setting up by hand:
{
  "mcpServers": {
    "enagrams": {
      "command": "npx",
      "args": ["-y", "enagrams", "--mcp"],
      "env": {
        "ENAGRAMS_API_KEY": "...",
        "ENAGRAMS_WORKSPACE": "your-workspace-slug"
      }
    }
  }
}
The server speaks stdio to your IDE and HTTP to the Enagrams API.

Tools by Category

Coordination and Context

Core tools every agent calls several times a session.
ToolPurpose
syncReport what you’re working on; get teammate activity, decisions, conflicts, and learnings back in one round-trip.
decideRecord an architectural choice (with rationale) so every other agent sees it.
searchSemantic search over past decisions.
learnShare a gotcha, workaround, or pattern you just discovered.
askAsk a question against the workspace knowledge base.

Contracts

Interface contracts let one agent publish a shape — API response, type definition, function signature — and other agents query it.
ToolPurpose
publishRegister or update a shared contract.
Contract changes surface in everyone’s next sync. Use ask (free-form) or search to discover existing contracts.

Workstreams

Workstreams map 1:1 to shared git branches ena/<slug> and enable symbol-level coordination with other participants.
ToolPurpose
workstream_startCreate a workstream and its branch.
workstream_joinJoin an existing workstream.
workstream_leaveLeave without ending it for others.
workstream_endAbandon a workstream for the whole team.
workstream_completeWrap up — returns a squash-merge plan, then finalizes with pr_url.
workstream_listList active or completed workstreams.

The Test Gate

Gate changes before they land on a workstream. Two-phase: first call returns affected tests, second call submits results.
ToolPurpose
confirm_readyTier-A/B gate. On pass writes a sync_log receipt.
sync_commitRecord that you pushed a commit. Prefer passing sync_log_id from confirm_ready.
sync_retractRetract a previously synced commit so watchers revert locally.

Negotiation

When two agents want the same symbol, negotiate_* runs a bounded-turn state machine with auto-resolution.
ToolPurpose
negotiate_openOpen a negotiation over contested symbols.
negotiate_respondRespond: yield / hold / defer / counter / split.
negotiate_listSee whether anyone is waiting on you.

Tasks

Delegate follow-up work inside a workstream with dependency-based auto-unblocking.
ToolPurpose
delegate_taskCreate (and optionally assign) a task.
task_claimClaim a queued task.
task_updateUpdate status (triggers unblock cascade on done).
task_listList tasks by workstream, assignee, or status.

Conventions and Decision Staleness

Living conventions layer on top of decisions. must-tier conventions are hard gates on PreToolUse. Stale decisions get surfaced for review when their linked code drifts.
ToolPurpose
convention_proposeRecord a must/should/may convention.
convention_listList conventions, optionally filtered by tier or files.
decisions_staleList decisions whose linked code has drifted.
decision_reaffirmMark stale decisions fresh again.

How Agents Use Them

A typical session looks like:
sessionStart (hook)        → briefing injected
sync                       → get team state
workstream_start/join      → claim branch
decide / publish           → record new choices / contracts
[edit files]               → hook calls file_lock on PreToolUse
convention_list (on block) → understand why an edit was denied
delegate_task              → hand off follow-up to another agent
confirm_ready (no results) → get affected tests
[run tests locally]
confirm_ready (results)    → gate pass → sync_log receipt
sync_commit                → notify watchers of the new commit
sessionEnd (hook)          → release reservations
Most tools accept an optional session_id; the MCP server also automatically scopes each call to your workspace.