Docs/The MCP server

The MCP server: connect an agent, build from specs.

Everything an AI coding agent needs to work over MCP: OAuth or an API key, prompts, the agent workflow and every tool.

MCP endpoint
https://app.specdeck.ai/mcp

Running a coding agent on your own machine? Connect with browser sign-in, then install the workflow. No API key is needed.

OAuth or an API key

Agents connect to this URL in one of two ways, and each connection works in one workspace.

For
Agents you run on your own machine
Set up by
An owner or contributor
Acts as
You, with your role
Publishes spec changes
Allowed by default; an owner can turn it off under Publishing in Workspace settings
Expires
After 30 days, or when you change or reset your password
For
CI and other agents that run without a person
Set up by
A workspace owner
Acts as
Its own agent user
Publishes spec changes
Off by default; an owner can turn it on under Publishing in Workspace settings
Expires
Never; rotate or delete it in Workspace settings

When publishing is off, agents submit spec changes as proposals for a person to review and publish.

You need a workspace before you connect. See Create a trial workspace.

Connect with OAuth

Pick your agent. Each setup signs in through the browser: on the SpecDeck approval screen, pick the workspace and click Approve. Viewers can't connect agents, so the approval screen lists only workspaces where you're an owner or a contributor.

Run this in the repository folder:

Terminal
claude mcp add --scope project --transport http specdeck https://app.specdeck.ai/mcp

--scope project writes the server to .mcp.json, so everyone who clones the repository gets it; each person signs in and picks a workspace. Leave the flag out to add the server for you only, in this folder, or use --scope user to give all your projects one workspace.

Start claude in the folder and approve specdeck when it asks about the servers in .mcp.json. Then run /mcp, select specdeck, choose Authenticate and approve in the browser. Do it again after 30 days or a password change or reset. To switch workspaces, choose Re-authenticate. To use a second workspace alongside the first, add the server again under another name, such as specdeck-billing.

Check the connection

Before installing the workflow, ask your agent:

Claude Code
Use the SpecDeck MCP tools to list the specifications in my connected workspace. Do not change anything.

Check that the agent calls list_specifications and gets a reply without an authentication or connection error. An empty list is valid for a new workspace. If you expected existing specs, compare the reply with the workspace in the web app. To pick another workspace, use the sign-out or re-authentication steps in your agent's setup above, then repeat this check.

Next, install the workflow in the repository, then onboard the codebase if it has no specs yet.

Connect with an API key

For CI and other agents that run without a person. A workspace owner creates the key under Workspace settings, AI agents, New agent, and sees it once. The agent sends it as the Authorization: Bearer sd_agent_... header.

Claude Code, with the key in the SPECDECK_API_KEY environment variable:

Terminal
claude mcp add --transport http specdeck https://app.specdeck.ai/mcp \
  --header "Authorization: Bearer $SPECDECK_API_KEY"

Run the same connection check before using the agent. An API key is bound to the workspace where it was created; to switch workspaces, use a key created in the other workspace.

Prompts

SpecDeck serves three MCP prompts, in the order you run them on a new repository: install_agents_md, onboard_codebase and plan_build. Each is also a tool of the same name that returns the same steps, so an agent calls it when you ask in plain words, with or without prompt support.

Run /mcp__specdeck__<prompt>, or pick specdeck:<prompt> (MCP) from the / menu, with your server name in place of specdeck. Arguments go by position.

Install the workflow in AGENTS.md

Run install_agents_md once per repository. It adds a Working with SpecDeck section with the agent workflow to AGENTS.md, which most coding agents read at session start. It shows the change, waits for your yes and does not commit.

Claude Code
/mcp__specdeck__install_agents_md CLAUDE.md

Claude Code reads AGENTS.md only when the repository has no CLAUDE.md, .claude/CLAUDE.md or CLAUDE.local.md. The command above writes the section to CLAUDE.md instead of the default AGENTS.md.

Onboard an existing codebase

Run onboard_codebase once, from the repository root, to write specs for a codebase that has none. It covers the folder the agent runs in, every subfolder included. The agent reads the code, creates areas, and writes, as proposals by default, the foundational documents (Technical Context, System Architecture, Glossary, and a Decision Log when the code shows real decisions), a Platform spec for standing the system up from an empty repository, and a feature spec for each user-facing feature. It runs in your coding agent; the in-app Assistant does not read code.

Claude Code
/mcp__specdeck__onboard_codebase [mode] [output]
  1. 1
    Run it in a connected agent and approve the plan it posts, or change it first. It then writes every document without stopping.
  2. 2
    Review each proposal against the existing implementation. Correct or remove criteria that misdescribe it, then publish the proposal from its spec page. Leave an intended future requirement unverified.
  3. 3
    On every published feature spec, the Platform spec included, open Verification. Verify the criteria you have confirmed already work; use Verify all when that is true of the whole group. Unverified criteria remain Ready to build and plan_build creates goals for them.

Arguments

  • mode: plan (default) stops once for plan approval. autonomous never stops.
  • output: propose (default), or publish to publish each spec directly and verify its criteria with verify_existing_criteria, which replaces steps 2 and 3. The run stops at its first publish when Publishing in Workspace settings is off for the agent running it.

The prompt takes any other value as the default; the tool refuses it. To approve the plan and then publish each spec directly:

Claude Code
/mcp__specdeck__onboard_codebase plan publish

Plan and build what is ready

A feature spec is Ready to build when it is published, has at least one acceptance criterion not yet verified, and has no goal in progress or in review. list_specifications returns it as phase: ready.

Nothing creates a goal on its own. Run plan_build in a connected agent. It records what each ready spec builds on with set_spec_dependencies (features that run on the Platform spec, for example), then creates the goals in that order and claims nothing. Run it again after you publish more specs. No arguments.

Claude Code
/mcp__specdeck__plan_build

Then ask the agent to get the next goal and build it. A goal cannot be claimed until the specs it builds on are built. Independent goals can be claimed by separate agent sessions that you start; planning does not launch those sessions. A goal assigned to someone else is left to them. The Board view of Build shows the order. Each submitted goal waits in review until a person verifies it and clicks Mark done. See Verify and finish a goal.

!
After onboarding with proposals
If you onboarded with the default output, propose, click Verify all on every onboarded feature spec first, or plan_build opens goals for code that already works. With publish, the agent verified them as it published. See Onboard an existing codebase.

The agent workflow

A goal is one round of work on one published feature spec. It covers the criteria of the spec that are not yet verified and has none of its own. The server instructions, the prompts and the AGENTS.md section teach the agent this loop:

  1. 1
    Claim. Use get_next_goal to take the next claimable goal, or pass specification_id for one spec's goal. plan_build creates goals first; for a spec a person named, use create_goal if none exists. A spec holds one unfinished goal at a time, idle included.
  2. 2
    Read. Start with read_goal and its briefing, then read the spec in full. Use search_specifications for the conventions and other specs the work touches.
  3. 3
    Build. Implement the scoped criteria and collect tests or other evidence for each. Record the git branch and the pull request URL with add_artifact. With a git host integration, SpecDeck shows when the work lands; merging does not finish the goal.
  4. 4
    Submit. Call submit_goal with one claim per scoped criterion not yet verified and any new or reworded criterion. A met claim needs tests or evidence; an unmet claim needs evidence and a deployment artifact so a person can check it. Submitting also proposes the goal's draft, if it has one.
  5. 5
    Review. A person checks the claims, spec changes and decisions, then clicks Mark done or sends the goal back. See Verify and finish a goal.

Questions, decisions and handoffs

  • Change the spec. Open each section with create_draft and the goal_id, then update_draft. All sections land in the goal's draft. Criteria are - [ ] ... items. The agent never calls create_proposal on this draft: submit_goal proposes it.
  • Record a decision. When a choice the spec left open or got wrong would change the spec, write it into the goal's draft, then call record_decision and keep working. Submission is refused while the goal has open decisions and no spec change of its own.
  • Ask a question. Use ask_question when work cannot continue without a person. The goal pauses and stays assigned to the agent. If the question concerns a spec change, write it into the goal's draft first.
  • Record a prerequisite. Use set_spec_dependencies when another spec must be built first. The goal cannot be claimed until its prerequisites are built.
  • Hand work back. Use release_goal with what is done, what is left and what stopped the agent. The goal becomes idle and unassigned for someone else to take.

Verify and finish a goal

A met claim means the agent verified the criterion. An unmet claim means it could not verify it and a person must check it; it can mean verification is missing or the behavior is known to fail. Read the evidence to tell which, and send known failures back for correction. See verified, done and built for how criteria, goals and prerequisites relate.

submit_goal moves the goal to In review. A met claim counts as verified by the agent unless a person fails it. A person verifies the rest, reviews the spec changes and decisions, and clicks Mark done or sends the goal back to the agent that submitted it, with the proposal as the goal's draft again. read_goal shows the reason, or the note on a failed criterion. The web app guide covers the review steps.

SpecDeck never notifies the agent. After you answer its question, mark a criterion failed, reject its decision or send the goal back, tell it to continue: get_next_goal resumes the goal.

Tool reference

The tool reference lists every tool the server offers and its parameters.

Continue reading
Write and review specs
The web app
Organizations, workspaces, specs, the Assistant and verification.
→