Skip to content

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>]

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.

Terminal window
archidocs mcp --workspace archidocs

Check the server that command starts: print what it serves and how many tools it has, then exit.

Terminal window
archidocs mcp --workspace archidocs --check

Serve a published Bundle, here the Big Bank demo’s, with the read tools only.

Terminal window
archidocs mcp --bundle https://big-bank.archidocs.dev/workspace.bundle.json

Serve your own published Bundle, with links to its viewer in the tool results.

Terminal window
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.

Terminal window
archidocs mcp --http --port 3737 --workspace archidocs

Serve over HTTP with the write tools on.

Terminal window
archidocs mcp --http --allow-writes --workspace archidocs

--workspace <dir> · Default: the Workspace found from the current folder.

Serve this Workspace checkout; its write tools edit the YAML in place.

--bundle <url|path>

Serve a published Bundle, read-only, instead of a checkout.

--viewer-url <url>

The published viewer’s base URL; tool results then link to it.

--http · Off by default.

Serve Streamable HTTP at /mcp instead of stdio.

--host <loopback> · Default: 127.0.0.1.

With --http: the loopback address to listen on, 127.0.0.1, localhost or ::1.

--port <n> · Default: 3737.

With --http: the port to serve on.

--allow-writes · Off by default.

With --http: allow the write tools, which are off over HTTP by default.

--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.

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.

Documents the beta branch at cd98671, ahead of the latest release, v1.4.0.