tld mcp
View Markdowntld mcptld mcp starts an MCP server on stdio. Any MCP-compatible agent can connect and use these tools:
| Tool | What the agent can do |
|---|---|
tld_add | Create or update an element |
tld_connect | Create a connector between elements |
tld_remove_element | Remove an element |
tld_remove_connector | Remove a connector |
tld_rename | Rename an element |
tld_update_element | Change an element’s field |
tld_update_connector | Change a connector’s field |
tld_view_create | Create the view owned by an element |
tld_view_rename | Rename an owned view |
tld_view_set_level | Set an owned view’s level label |
tld_view_delete | Delete an owned view |
tld_list_elements | List elements |
tld_list_connectors | List connectors |
tld_list_views | List views |
tld_inspect | Inspect an element, view, or connector |
tld_render | Render a view as Mermaid |
tld_validate | Validate the workspace |
tld_pull | Refresh local YAML from the target |
That’s the full CRUD and view surface plus validation, querying, rendering, and sync.
Setting it up
Section titled “Setting it up”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.
How it works
Section titled “How it works”When tld mcp starts:
- It checks if a
tld serveinstance is already running - If not, it launches one in the background automatically
- It registers all tools
- 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.Server flags
Section titled “Server flags”# Custom host/port for the underlying serve processtld mcp --port 9090
# Custom data directorytld mcp --data-dir /custom/pathThese flags control the background tld serve process that gets auto-started. Most of the time you don’t need them.