Skip to content
Terminal window
tld mcp

tld mcp starts an MCP server on stdio. Any MCP-compatible agent can connect and use these tools:

ToolWhat the agent can do
tld_addCreate or update an element
tld_connectCreate a connector between elements
tld_remove_elementRemove an element
tld_remove_connectorRemove a connector
tld_renameRename an element
tld_update_elementChange an element’s field
tld_update_connectorChange a connector’s field
tld_view_createCreate the view owned by an element
tld_view_renameRename an owned view
tld_view_set_levelSet an owned view’s level label
tld_view_deleteDelete an owned view
tld_list_elementsList elements
tld_list_connectorsList connectors
tld_list_viewsList views
tld_inspectInspect an element, view, or connector
tld_renderRender a view as Mermaid
tld_validateValidate the workspace
tld_pullRefresh local YAML from the target

That’s the full CRUD and view surface plus validation, querying, rendering, and sync.

Add the tld server to your agent’s MCP settings:

{
"mcpServers": {
"tld": {
"command": "tld",
"args": ["mcp"],
"cwd": "/path/to/your/project"
}
}
}

That’s it. The agent now has architecture tools.

When tld mcp starts:

  1. It checks if a tld serve instance is already running
  2. If not, it launches one in the background automatically
  3. It registers all tools
  4. It starts listening on stdio for MCP requests

The MCP server uses your current workspace , the .tld/ directory in the working directory (or whatever you set with -w).

Example: asking your agent to build a diagram

Section titled “Example: asking your agent to build a diagram”
You: Create a diagram of this project's backend services
Agent: [calls tld_add for api-gateway]
Agent: [calls tld_add for auth-svc]
Agent: [calls tld_add for user-db]
Agent: [calls tld_connect between them]
Agent: [calls tld_validate to check]
Agent: I've created a diagram with 5 elements and 4 connectors.
Terminal window
# Custom host/port for the underlying serve process
tld mcp --port 9090
# Custom data directory
tld mcp --data-dir /custom/path

These flags control the background tld serve process that gets auto-started. Most of the time you don’t need them.