Skip to content

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 elements from the inside of the ‘Backend’ have relations with the legacy database”

“List all elements tagged ‘legacy’ from team1 project”

“What technologies are used for ui (consider all elements with browser shape)“

Two options are available:

  • Use extension’s built-in MCP Server (recommended)
  • Use @likec4/mcp package

When LikeC4 extension is installed, MCP Server can be enabled from the extension settings.

To configure MCP Server:

Create .vscode/mcp.json:

{
"servers": {
"likec4": {
"type": "sse",
"url": "http://localhost:33335/sse"
}
}
}

You can change port in the settings.

Example configuration:

{
"mcpServers": {
"likec4": {
"command": "npx",
"args": [
"-y",
"@likec4/mcp"
],
"env": {
"LIKEC4_WORKSPACE": "${workspaceFolder}"
}
}
}
}