archidocs mcp
Serve the Model to AI agents over MCP, from a Workspace checkout or a published Bundle, on stdio or local HTTP.
archidocs mcp [--workspace <dir> | --bundle <url|path>] [--viewer-url <url>] [--check]archidocs mcp --http [--host <loopback>] [--port <n>] [--allow-writes] [--workspace <dir> | --bundle <url|path>] [--viewer-url <url>]Examples
Section titled “Examples”Serve a Workspace checkout over stdio, with the read and write tools. This is the command to register with a coding agent, which starts it from the repo root.
archidocs mcp --workspace archidocsCheck the server that command starts: print what it serves and how many tools it has, then exit.
archidocs mcp --workspace archidocs --checkServe a published Bundle, here the Big Bank demo’s, with the read tools only.
archidocs mcp --bundle https://big-bank.archidocs.dev/workspace.bundle.jsonServe your own published Bundle, with links to its viewer in the tool results.
archidocs mcp --bundle https://architecture.example.com/workspace.bundle.json --viewer-url https://architecture.example.com/Serve Streamable HTTP at /mcp on a loopback address, with the write tools off.
archidocs mcp --http --port 3737 --workspace archidocsServe over HTTP with the write tools on.
archidocs mcp --http --allow-writes --workspace archidocs--workspace
Section titled “--workspace”--workspace <dir> · Default: the Workspace found from the current folder.
Serve this Workspace checkout; its write tools edit the YAML in place.
--bundle
Section titled “--bundle”--bundle <url|path>
Serve a published Bundle, read-only, instead of a checkout.
--viewer-url
Section titled “--viewer-url”--viewer-url <url>
The published viewer’s base URL; tool results then link to it.
--http
Section titled “--http”--http · Off by default.
Serve Streamable HTTP at /mcp instead of stdio.
--host
Section titled “--host”--host <loopback> · Default: 127.0.0.1.
With --http: the loopback address to listen on, 127.0.0.1, localhost or ::1.
--port
Section titled “--port”--port <n> · Default: 3737.
With --http: the port to serve on.
--allow-writes
Section titled “--allow-writes”--allow-writes · Off by default.
With --http: allow the write tools, which are off over HTTP by default.
--check
Section titled “--check”--check · Off by default.
Check the server instead of serving: run it behind an in-process client, print what it serves, and exit 0, or 2 with the reason.
Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
0 |
Over stdio, the client closed the connection. With --check, the server started and answered. |
2 |
It could not start: an unknown flag, a flag missing its value, flags that don’t go together, a --viewer-url that is not a URL, a --port that is not a port or is in use, a --host that is not a loopback address, no Workspace found when --bundle is not given, or, with --check, a server that could not read its source. |
With --http, mcp runs until you stop it with Ctrl+C. The interrupt ends the process, so the exit status is the shell’s for an interrupted command (130 in most shells), not a code of its own. A Bundle that can’t be read does not stop the server: each tool call answers source_unavailable, and the next call tries again.
Exit 2 prints the reason to stderr as archidocs: <message>, and after most mistakes in the command line, the usage summary.
See also
Section titled “See also”- Connect an agent over MCP: registers it with Claude Code, Cursor, VS Code / Copilot or Codex, from a checkout, a published site or over HTTP.
- Agents and MCP: what the server offers an agent.
- How the Workspace is found: where it looks for
workspace.yaml.
Documents the beta branch at cd98671, ahead of the latest release, v1.4.0.