MCP server
You shouldn't have to paste the methodology into a chat, and the agent shouldn't have to shell out to a CLI to check itself. The MCP server makes Specline tools the agent calls natively — so a planning agent pulls the canon and checks its own work mid-session, in the flow. Same engine, same output contract. Only the transport changes.
Register it once, at user scope
With Claude Code, register it at user scope so it's there in every repo you open:
claude mcp add --scope user specline -- \ node /abs/path/to/specline/cli/src/mcp/index.ts
Use your actual absolute path to cli/src/mcp/index.ts. Verify with claude mcp get specline — it should report ✔ Connected. Run npm ci in cli/ first, as in the install guide. The server uses stdio JSON-RPC.
The three tools
| Tool | Does | Arguments |
|---|---|---|
| specline_check | Validate a repo; returns the JSON report. Specline runs in one mode — every finding is reported, and the run exits nonzero on any error. | path (req), changed[], modified[], now |
| specline_spec | Return the pinned canon — inject to make the agent aware of Specline. Sliced at Part 3 unless the repo at path sets unattended: true. | path (optional) |
| specline_rules | Return the rule catalog the agent will be checked against. Part-3 rules listed only when the repo at path sets unattended: true. | path (optional) |
Prompts
shape guides collaborative spec writing — the only prompt the server currently registers. Building is attended by default: the brief in CLAUDE.md covers it. Unattended builds (experimental) use the explicit envelope and runner contract in the canon.
How an agent uses it
- On opening a Specline repo, the agent calls
specline_specto load the methodology andspecline_rulesto learn what it'll be graded on. - While shaping a spec with you, it calls
specline_check, naming the files it touched — and self-corrects from each finding'srule_id+fix_hint. Indocs/drafts/only parse-level integrity runs, so an incomplete draft is expected. - Before handoff — moving the spec to
docs/specs/— one morespecline_checkconfirms zero errors.
It's the same canon, reached two ways. /spec.md serves it over HTTP for you; specline_spec hands it to the agent inside the repo.
You don't need MCP for this
An agent with shell access — Claude Code, say — can already run the CLI straight: specline check --format json, then parse the result. MCP earns its keep by making Specline a first-class tool the agent discovers on its own, in any client. That's the whole difference.