mcpField
L
LikeC4

LikeC4

Local
github.com/likec4Developer Tools6.0kUpdated 1d ago

About LikeC4

LikeC4 is an MCP server that gives LLM clients access to resolved architecture models in a workspace. Its tools support model search, graph queries, relationship analysis, and view rendering.

Key features

  1. 01List LikeC4 projects
  2. 02Search and inspect model elements
  3. 03Query graphs and relationships
  4. 04Render and preview architecture views
  5. 05Compare elements and assess removal impact

Use cases

  1. 01Look up components in an architecture model
  2. 02Trace upstream or downstream dependencies
  3. 03Review or preview a LikeC4 view
  4. 04Check the impact of removing a model element

MCP support

Exposes tools for reading LikeC4 projects, elements, deployments, views, and relationships to MCP clients. It uses stdio transport and defaults to the current directory as its workspace.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"likec4": {
"command": "npx",
"args": [
"-y",
"@likec4/mcp"
],
"env": {
"LIKEC4_WORKSPACE": "<LIKEC4_WORKSPACE>"
}
}
}
}
Run commandnpx -y @likec4/mcp
Environment variables to set
LIKEC4_WORKSPACE

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@likec4/mcp

Tools

18

Saved tool list · updated 3w ago

This tool takes no parameters.

Details

From the project README

@likec4/mcp

Documentation

Usage

{
  "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.

Usage as CLI

Install it globally (or use npx):

npm install -g @likec4/mcp
likec4-mcp -h
USAGE `likec4-mcp [OPTIONS] [WORKSPACE]`

ARGUMENTS

  `WORKSPACE="."`    change workspace, defaults to current directory, can be set by LIKEC4_WORKSPACE env    <directory>

OPTIONS

          `--stdio`    use stdio transport (this is default)
           `--http`    use streamable http transport
  `--port=<number>`    change http port (default: 33335)
       `--no-watch`    disable watch for changes (consume less resources if you have static workspace)

Available tools

  • list-projects: List all LikeC4 projects in the workspace.
  • read-project-summary: Project specification, configuration, all elements, deployment nodes and views.
  • search-element: Fuzzy search of elements and deployment nodes across all projects by id/title/description/link, ranked by relevance; combinable exact filters by kind/shape/tags/metadata.
  • read-element: Full element details including relationships, includedInViews, deployedInstances, metadata and sourceLocation.
  • read-deployment: Details of a deployment node or deployed instance.
  • read-view: Full view details (nodes/edges) and sourceLocation.
  • render-view: Renders a view as an interactive diagram (pan/zoom/fit) inline in chat, for hosts that support MCP Apps.
  • preview-view: Renders a preview of a LikeC4 view defined by DSL text, against an existing project's real elements, without saving to disk — for iterating on a view before creating or editing it for real.
  • find-relationships: Direct and indirect relationships between two elements in a project.
  • query-graph: Query element hierarchy (ancestors, descendants, siblings, children, parent) and relationships (incomers, outgoers).
  • query-incomers-graph: Get complete graph of all upstream dependencies/producers (recursive incomers).
  • query-outgoers-graph: Get complete graph of all downstream consumers/dependents (recursive outgoers).
  • query-by-metadata: Search elements and deployment nodes by metadata key-value pairs with exact/contains/exists matching.
  • query-by-tags: Search elements and deployment nodes by tags 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 relationship chains between two elements with bounded BFS traversal. Supports includeIndirect to control implied relationships.
  • batch-read-elements: Read summaries of multiple elements in a single request, including links and sourceLocation.
  • 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.
  • removal-impact: Report what removing an element takes with it (relationships, deployed instances, views, orphans, source references).
  • list-diffs: List model diffs (diff blocks) and the views each diff changes.
  • open-view: Opens the LikeC4 view (available if MCP is running in the editor)
MCP vs LeanIX bridge / Draw.io

MCP tools expose the resolved LikeC4 model in the workspace (search, graph queries, views). They do not generate @likec4/leanix-bridge artifacts, run LeanIX sync, or export Draw.io with the leanix profile. For that vocabulary, use the CLI (likec4 gen leanix …, likec4 sync leanix …, likec4 export drawio --profile leanix) and the Agent Skill reference bridge-leanix-drawio.md in this repository.

Getting help

We are always happy to help you get started:

Contributors

LikeC4 contributors

Become a contributor

Support development

LikeC4 is a MIT-licensed open source project with its ongoing development made possible entirely by your support.
If you like the project, please consider contributing financially to help grow and improve it.
You can support us via OpenCollective or GitHub Sponsors.

License

This project is released under the MIT License

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.