@likec4/mcp 1.59.1 → 1.59.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +102 -100
- package/dist/app/render-view-client.css +1 -0
- package/dist/app/render-view-client.js +745 -0
- package/dist/chunks/src.mjs +55 -341
- package/dist/cli.mjs +1 -5
- package/package.json +33 -24
- package/dist/chunks/libs/@chevrotain/cst-dts-gen.mjs +0 -1
- package/dist/chunks/libs/@chevrotain/regexp-to-ast.mjs +0 -9
- package/dist/chunks/libs/@hono/mcp.mjs +0 -70
- package/dist/chunks/libs/@hono/node-server.mjs +0 -3
- package/dist/chunks/libs/@logtape/logtape.mjs +0 -5
- package/dist/chunks/libs/@modelcontextprotocol/sdk.mjs +0 -5
- package/dist/chunks/libs/@radix-ui/colors.mjs +0 -1
- package/dist/chunks/libs/@ts-graphviz/ast.mjs +0 -3
- package/dist/chunks/libs/@ts-graphviz/core.mjs +0 -1
- package/dist/chunks/libs/@ungap/structured-clone.mjs +0 -1
- package/dist/chunks/libs/character-entities.mjs +0 -2
- package/dist/chunks/libs/chevrotain-allstar.mjs +0 -2
- package/dist/chunks/libs/chevrotain.mjs +0 -58
- package/dist/chunks/libs/chokidar.mjs +0 -3
- package/dist/chunks/libs/chroma-js.mjs +0 -15
- package/dist/chunks/libs/eventemitter3.mjs +0 -1
- package/dist/chunks/libs/graphology-dag.mjs +0 -1
- package/dist/chunks/libs/graphology.mjs +0 -1
- package/dist/chunks/libs/hast-util-sanitize.mjs +0 -1
- package/dist/chunks/libs/hast-util-to-html.mjs +0 -9
- package/dist/chunks/libs/hono.mjs +0 -1
- package/dist/chunks/libs/immer.mjs +0 -1
- package/dist/chunks/libs/khroma.mjs +0 -1
- package/dist/chunks/libs/langium.mjs +0 -19
- package/dist/chunks/libs/markdown-table.mjs +0 -2
- package/dist/chunks/libs/mdast-util-find-and-replace.mjs +0 -1
- package/dist/chunks/libs/mdast-util-from-markdown.mjs +0 -3
- package/dist/chunks/libs/mdast-util-gfm.mjs +0 -15
- package/dist/chunks/libs/mdast-util-to-hast.mjs +0 -11
- package/dist/chunks/libs/merge-error-cause.mjs +0 -2
- package/dist/chunks/libs/micromark-extension-gfm.mjs +0 -1
- package/dist/chunks/libs/mnemonist.mjs +0 -1
- package/dist/chunks/libs/nano-spawn.mjs +0 -3
- package/dist/chunks/libs/p-queue.mjs +0 -1
- package/dist/chunks/libs/pathe.mjs +0 -1
- package/dist/chunks/libs/picomatch.mjs +0 -1
- package/dist/chunks/libs/pretty-ms.mjs +0 -1
- package/dist/chunks/libs/remark-github-blockquote-alert.mjs +0 -3
- package/dist/chunks/libs/remark-rehype.mjs +0 -1
- package/dist/chunks/libs/remeda.mjs +0 -1
- package/dist/chunks/libs/ufo.mjs +0 -1
- package/dist/chunks/libs/unified.mjs +0 -1
- package/dist/chunks/libs/unstorage.mjs +0 -1
- package/dist/chunks/rolldown-runtime.mjs +0 -1
package/README.md
CHANGED
|
@@ -1,100 +1,102 @@
|
|
|
1
|
-
# `@likec4/mcp`
|
|
2
|
-
|
|
3
|
-
[Documentation](https://likec4.dev/tooling/mcp/)
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
```json
|
|
8
|
-
{
|
|
9
|
-
"mcpServers": {
|
|
10
|
-
"likec4": {
|
|
11
|
-
"command": "npx",
|
|
12
|
-
"args": [
|
|
13
|
-
"-y",
|
|
14
|
-
"@likec4/mcp"
|
|
15
|
-
],
|
|
16
|
-
"env": {
|
|
17
|
-
"LIKEC4_WORKSPACE": "${workspaceFolder}"
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
This package starts MCP server using [`stdio`](https://modelcontextprotocol.io/specification/2025-11-25/basic/transports#stdio) transport.
|
|
25
|
-
|
|
26
|
-
If `LIKEC4_WORKSPACE` environment variable is not set, the current directory will be used as workspace.
|
|
27
|
-
|
|
28
|
-
### Usage as CLI
|
|
29
|
-
|
|
30
|
-
Install it globally (or use `npx`):
|
|
31
|
-
|
|
32
|
-
```sh
|
|
33
|
-
npm install -g @likec4/mcp
|
|
34
|
-
likec4-mcp -h
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
```
|
|
38
|
-
USAGE `likec4-mcp [OPTIONS] [WORKSPACE]`
|
|
39
|
-
|
|
40
|
-
ARGUMENTS
|
|
41
|
-
|
|
42
|
-
`WORKSPACE="."` change workspace, defaults to current directory, can be set by LIKEC4_WORKSPACE env <directory>
|
|
43
|
-
|
|
44
|
-
OPTIONS
|
|
45
|
-
|
|
46
|
-
`--stdio` use stdio transport (this is default)
|
|
47
|
-
`--http` use streamable http transport
|
|
48
|
-
`--port=<number>` change http port (default: 33335)
|
|
49
|
-
`--no-watch` disable watch for changes (consume less resources if you have static workspace)
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
## Available tools
|
|
53
|
-
|
|
54
|
-
- `list-projects`: List all LikeC4 projects in the workspace.
|
|
55
|
-
- `read-project-summary`: Project specification, configuration, all elements, deployment nodes and views.
|
|
56
|
-
- `search-element`: Search elements and deployment nodes across all projects by id/title/kind/shape/tags/metadata.
|
|
57
|
-
- `read-element`: Full element details including relationships, includedInViews, deployedInstances, metadata and sourceLocation.
|
|
58
|
-
- `read-deployment`: Details of a deployment node or deployed instance.
|
|
59
|
-
- `read-view`: Full view details (nodes/edges) and sourceLocation.
|
|
60
|
-
- `
|
|
61
|
-
- `
|
|
62
|
-
- `
|
|
63
|
-
- `query-
|
|
64
|
-
- `query-
|
|
65
|
-
- `query-
|
|
66
|
-
- `query-by-
|
|
67
|
-
- `
|
|
68
|
-
- `
|
|
69
|
-
- `
|
|
70
|
-
- `
|
|
71
|
-
- `
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
MCP
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
1
|
+
# `@likec4/mcp`
|
|
2
|
+
|
|
3
|
+
[Documentation](https://likec4.dev/tooling/mcp/)
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{
|
|
9
|
+
"mcpServers": {
|
|
10
|
+
"likec4": {
|
|
11
|
+
"command": "npx",
|
|
12
|
+
"args": [
|
|
13
|
+
"-y",
|
|
14
|
+
"@likec4/mcp"
|
|
15
|
+
],
|
|
16
|
+
"env": {
|
|
17
|
+
"LIKEC4_WORKSPACE": "${workspaceFolder}"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
This package starts MCP server using [`stdio`](https://modelcontextprotocol.io/specification/2025-11-25/basic/transports#stdio) transport.
|
|
25
|
+
|
|
26
|
+
If `LIKEC4_WORKSPACE` environment variable is not set, the current directory will be used as workspace.
|
|
27
|
+
|
|
28
|
+
### Usage as CLI
|
|
29
|
+
|
|
30
|
+
Install it globally (or use `npx`):
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
npm install -g @likec4/mcp
|
|
34
|
+
likec4-mcp -h
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
USAGE `likec4-mcp [OPTIONS] [WORKSPACE]`
|
|
39
|
+
|
|
40
|
+
ARGUMENTS
|
|
41
|
+
|
|
42
|
+
`WORKSPACE="."` change workspace, defaults to current directory, can be set by LIKEC4_WORKSPACE env <directory>
|
|
43
|
+
|
|
44
|
+
OPTIONS
|
|
45
|
+
|
|
46
|
+
`--stdio` use stdio transport (this is default)
|
|
47
|
+
`--http` use streamable http transport
|
|
48
|
+
`--port=<number>` change http port (default: 33335)
|
|
49
|
+
`--no-watch` disable watch for changes (consume less resources if you have static workspace)
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Available tools
|
|
53
|
+
|
|
54
|
+
- `list-projects`: List all LikeC4 projects in the workspace.
|
|
55
|
+
- `read-project-summary`: Project specification, configuration, all elements, deployment nodes and views.
|
|
56
|
+
- `search-element`: Search elements and deployment nodes across all projects by id/title/kind/shape/tags/metadata.
|
|
57
|
+
- `read-element`: Full element details including relationships, includedInViews, deployedInstances, metadata and sourceLocation.
|
|
58
|
+
- `read-deployment`: Details of a deployment node or deployed instance.
|
|
59
|
+
- `read-view`: Full view details (nodes/edges) and sourceLocation.
|
|
60
|
+
- `render-view`: Renders a view as an interactive diagram (pan/zoom/fit) inline in chat, for hosts that support [MCP Apps](https://github.com/modelcontextprotocol/ext-apps).
|
|
61
|
+
- `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.
|
|
62
|
+
- `find-relationships`: Direct and indirect relationships between two elements in a project.
|
|
63
|
+
- `query-graph`: Query element hierarchy (ancestors, descendants, siblings, children, parent) and relationships (incomers, outgoers).
|
|
64
|
+
- `query-incomers-graph`: Get complete graph of all upstream dependencies/producers (recursive incomers).
|
|
65
|
+
- `query-outgoers-graph`: Get complete graph of all downstream consumers/dependents (recursive outgoers).
|
|
66
|
+
- `query-by-metadata`: Search elements and deployment nodes by metadata key-value pairs with exact/contains/exists matching.
|
|
67
|
+
- `query-by-tags`: Search elements and deployment nodes by tags with boolean logic (allOf, anyOf, noneOf).
|
|
68
|
+
- `query-by-tag-pattern`: Search elements by tag patterns using prefix, contains, or suffix matching.
|
|
69
|
+
- `find-relationship-paths`: Discover all relationship chains between two elements with bounded BFS traversal. Supports `includeIndirect` to control implied relationships.
|
|
70
|
+
- `batch-read-elements`: Read full details for multiple elements in a single request.
|
|
71
|
+
- `subgraph-summary`: Summarize descendants of an element with depth, metadata, and relationship counts.
|
|
72
|
+
- `element-diff`: Compare two elements and show differences in properties, tags, metadata, and relationships.
|
|
73
|
+
- `open-view`: Opens the LikeC4 view (available if MCP is running in the editor)
|
|
74
|
+
|
|
75
|
+
### MCP vs LeanIX bridge / Draw.io
|
|
76
|
+
|
|
77
|
+
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`](../../skills/likec4-dsl/references/bridge-leanix-drawio.md) in this repository.
|
|
78
|
+
|
|
79
|
+
## Getting help
|
|
80
|
+
|
|
81
|
+
We are always happy to help you get started:
|
|
82
|
+
|
|
83
|
+
- [Join Discord community](https://discord.gg/86ZSpjKAdA) – it is the easiest way to get help
|
|
84
|
+
- [GitHub Discussions](https://github.com/likec4/likec4/discussions) – ask anything about the project or give feedback
|
|
85
|
+
|
|
86
|
+
## Contributors
|
|
87
|
+
|
|
88
|
+
<a href="https://github.com/likec4/likec4/graphs/contributors">
|
|
89
|
+
<img src="https://contrib.rocks/image?repo=likec4/likec4" alt="LikeC4 contributors" />
|
|
90
|
+
</a>
|
|
91
|
+
|
|
92
|
+
[Become a contributor](../../CONTRIBUTING.md)
|
|
93
|
+
|
|
94
|
+
## Support development
|
|
95
|
+
|
|
96
|
+
LikeC4 is a MIT-licensed open source project with its ongoing development made possible entirely by your support.\
|
|
97
|
+
If you like the project, please consider contributing financially to help grow and improve it.\
|
|
98
|
+
You can support us via [OpenCollective](https://opencollective.com/likec4) or [GitHub Sponsors](https://github.com/sponsors/likec4).
|
|
99
|
+
|
|
100
|
+
## License
|
|
101
|
+
|
|
102
|
+
This project is released under the [MIT License](LICENSE)
|