AI Tools
LikeC4 provides two complementary tools for AI-powered development: Agent Skills for teaching AI assistants the DSL syntax, and an MCP Server for querying your architecture model.
Agent Skills
Section titled “Agent Skills”Agent skills are DSL references that AI coding assistants load automatically when editing .c4/.likec4 files.
They teach agents correct LikeC4 syntax, patterns, and validation workflows — so they can write DSL code without hallucinating.
Install into any project
Section titled “Install into any project”npx skills add https://likec4.dev/This uses the Agent Skills Discovery protocol. Available skills:
| Skill | Description |
|---|---|
likec4-dsl | Complete DSL reference — specification, model, views, deployment, predicates, examples |
Works with Claude Code, Cursor, Windsurf, and other agents that support the protocol.
MCP Server
Section titled “MCP Server”LikeC4 MCP Server provides knowledge of your LikeC4 model to LLMs. This enables you to query your model in natural language:
“Lookup LikeC4 model and list all incoming relationships of the backend api”
“What nested elements of the ‘Backend’ have relations with the legacy api”
“List all elements tagged legacy from team1 project”
“What technologies are used for ui (consider all elements with browser shape)”
“Export to CSV all relationships between Backend and Amazon SQS”
Three options are available:
- Use extension’s built-in MCP Server
- Use
likec4 mcpCLI - Use
@likec4/mcppackage
Using extension
Section titled “Using extension”When LikeC4 extension is installed in VSCode, the MCP Server is registered automatically via VSCode’s native MCP support (stdio transport). No additional configuration is needed — the server appears in your MCP server list once the extension is active.
For other editors, start the MCP server via CLI and configure it manually:
Create .cursor/mcp.json:
{ "mcpServers": { "likec4": { "url": "http://localhost:33335/mcp" } }}Then start the server: likec4 mcp --http
See Windsurf documentation for details:
{ "mcpServers": { "likec4": { "serverUrl": "http://localhost:33335/mcp" } }}Then start the server: likec4 mcp --http
Add the MCP server to Claude Code:
claude mcp add likec4 -- npx -y @likec4/mcpOr add to .mcp.json:
{ "mcpServers": { "likec4": { "command": "npx", "args": ["-y", "@likec4/mcp"], "env": { "LIKEC4_WORKSPACE": "${workspaceFolder}" } } }}Using CLI
Section titled “Using CLI”If you have installed likec4 CLI, you can start MCP server with stdio transport:
likec4 mcp# orlikec4 mcp --stdioStart MCP server with http transport on port 33335 (default) at ./src folder:
likec4 mcp --http ./srcStart MCP server with http transport on port 1234:
likec4 mcp -p 1234Using @likec4/mcp package
Section titled “Using @likec4/mcp package”Example configuration:
{ "mcpServers": { "likec4": { "command": "npx", "args": [ "-y", "@likec4/mcp" ], "env": { "LIKEC4_WORKSPACE": "${workspaceFolder}" } } }}This package starts MCP server using stdio transport.
If LIKEC4_WORKSPACE environment variable is not set, the current directory will be used as workspace.
Available tools
Section titled “Available tools”| Tool | Description |
|---|---|
list-projects | List all LikeC4 projects in the workspace |
read-project-summary | Project specification, configuration, all elements, deployment nodes and views |
search-element | Search elements and deployment nodes by id/title/kind/shape/tags/metadata |
read-element | Full element details including relationships, views, deployments, metadata |
read-deployment | Details of a deployment node or deployed instance |
read-view | Full view details (nodes/edges) and source location |
find-relationships | Direct and indirect relationships between two elements |
query-graph | Query element hierarchy (ancestors, descendants, siblings, children, parent) and single-hop relationships (incomers, outgoers) |
query-incomers-graph | Recursive BFS graph of all upstream dependencies/producers |
query-outgoers-graph | Recursive BFS graph of all downstream consumers/dependents |
query-by-metadata | Search elements by metadata key-value pairs (exact/contains/exists) |
query-by-tags | Tag filtering with boolean logic (allOf, anyOf, noneOf) |
query-by-tag-pattern | Search elements by tag patterns using prefix, contains, or suffix matching |
find-relationship-paths | Discover all multi-hop relationship chains between two elements via BFS |
batch-read-elements | Read full details for multiple elements in a single request |
subgraph-summary | Summarize descendants of an element with depth, metadata, and relationship counts |
element-diff | Compare two elements and show differences in properties, tags, metadata, and relationships |
open-view | Opens the LikeC4 view panel (editor only) |
Check out README for more details.