@likec4/mcp 1.38.0 → 1.39.0
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/.turbo/turbo-build.log +134 -119
- package/README.md +38 -0
- package/build.config.ts +3 -2
- package/dist/index.mjs +294 -261
- package/package.json +16 -10
- package/src/index.ts +79 -20
- package/tsconfig.json +6 -2
package/README.md
CHANGED
|
@@ -25,6 +25,41 @@ This package starts MCP server using [`stdio`](https://modelcontextprotocol.io/s
|
|
|
25
25
|
|
|
26
26
|
If `LIKEC4_WORKSPACE` environment variable is not set, the current directory will be used as workspace.
|
|
27
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-server -h
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
USAGE `likec4-mcp-server [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 (element kinds, deployment node kinds, tags, metadata keys), 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
|
+
- `find-relationships`: Direct and indirect relationships between two elements in a project.
|
|
61
|
+
- `open-view`: Opens the LikeC4 view (available if MCP is running in the editor)
|
|
62
|
+
|
|
28
63
|
## Getting help
|
|
29
64
|
|
|
30
65
|
We are always happy to help you get started:
|
|
@@ -49,3 +84,6 @@ You can support us via [OpenCollective](https://opencollective.com/likec4) or [G
|
|
|
49
84
|
## License
|
|
50
85
|
|
|
51
86
|
This project is released under the [MIT License](LICENSE)
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
```
|
package/build.config.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { resolve } from 'node:path'
|
|
1
2
|
import { defineBuildConfig } from 'unbuild'
|
|
2
3
|
|
|
3
4
|
export default defineBuildConfig({
|
|
@@ -5,8 +6,8 @@ export default defineBuildConfig({
|
|
|
5
6
|
stub: false,
|
|
6
7
|
declaration: false,
|
|
7
8
|
alias: {
|
|
8
|
-
'raw-body': './src/empty.ts',
|
|
9
|
-
'content-type': './src/empty.ts',
|
|
9
|
+
'raw-body': resolve('./src/empty.ts'),
|
|
10
|
+
'content-type': resolve('./src/empty.ts'),
|
|
10
11
|
},
|
|
11
12
|
rollup: {
|
|
12
13
|
esbuild: {
|