Skip to content

Connect an agent over MCP

archidocs mcp is an MCP server that agent harnesses start themselves, over stdio. Register it once and the agent can answer architecture questions and edit the Model. See Agents and MCP for what it offers.

Serve the checkout, so the agent gets the read tools and the write tools. From the repo root:

Terminal window
archidocs mcp --workspace archidocs

archidocs init prints this command for your repo. Register it the way your harness takes MCP servers. Most read a JSON file such as .mcp.json at the repo root:

.mcp.json
{
"mcpServers": {
"archidocs": {
"command": "archidocs",
"args": ["mcp", "--workspace", "archidocs"]
}
}
}

Paths are relative to where the harness starts the server, usually the repo root. If the CLI isn’t installed globally, use "command": "npx" and put "archidocs" first in args.

An agent working on a Service’s code can keep the Model in step from there. Clone the Workspace repo beside the code repo and point the server at that checkout:

Terminal window
archidocs mcp --workspace ../architecture/archidocs

archidocs init --skill --workspace ../architecture/archidocs installs the skill in the code repo and prints the same command. See Install the agent skill.

To answer questions without a checkout, serve the Bundle a published viewer site holds:

Terminal window
archidocs mcp --bundle https://architecture.example.com/workspace.bundle.json --viewer-url https://architecture.example.com/

Only the read tools are offered. The server re-reads the site’s Revision index at most once a minute, so it follows new deploys. With --viewer-url, results link to the same View in the published viewer.

For a harness that connects to a URL instead of starting a process:

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

It listens on a loopback address only, at /mcp, and leaves the write tools off unless you add --allow-writes.

Ask the agent something the Model knows, such as “what breaks if the Orders DB goes down?”. It should call get_impact and answer from the Model, with the Elements’ Owners. Then ask it to load the authoring guide before an edit: it calls get_authoring_guide.