docs(likec4): Enhance documentation for LikeC4 MCP server and AI agent integration
All checks were successful
ci / build (push) Successful in 56s
All checks were successful
ci / build (push) Successful in 56s
This commit is contained in:
parent
5f4296204f
commit
d390953891
1 changed files with 91 additions and 10 deletions
|
|
@ -76,16 +76,15 @@ git push
|
|||
content/en/
|
||||
├── _index.md # Homepage
|
||||
├── docs/
|
||||
│ ├── architecture/ # Architecture documentation
|
||||
│ │ └── highlevelarch.md
|
||||
│ ├── documentation/ # Documentation guides
|
||||
│ │ ├── local-development.md
|
||||
│ │ ├── testing.md
|
||||
│ │ └── cicd.md
|
||||
│ ├── decisions/ # ADRs (Architecture Decision Records)
|
||||
│ └── v1/ # Legacy documentation
|
||||
│ ├── _index.md # Docs landing page
|
||||
│ ├── edgeconnect/ # Edge Connect documentation
|
||||
│ ├── edp/ # EDP platform documentation
|
||||
│ └── governance/ # Governance documentation
|
||||
├── docs-old/ # Legacy documentation (archived)
|
||||
└── blog/ # Blog posts
|
||||
└── 20250401_review.md
|
||||
├── 20250401_review.md
|
||||
├── 20251027_important_links.md
|
||||
└── 240823-archsession.md
|
||||
```
|
||||
|
||||
## Writing Documentation
|
||||
|
|
@ -211,6 +210,88 @@ task likec4:generate
|
|||
grep -r "^view " resources/edp-likec4/ --include="*.c4"
|
||||
```
|
||||
|
||||
## Using LikeC4 with AI Agents (MCP Server)
|
||||
|
||||
The LikeC4 Model Context Protocol (MCP) server allows AI agents to query and navigate your architecture models interactively.
|
||||
|
||||
### Configuring AI Agents
|
||||
|
||||
Create or edit `.vscode/mcp.json` in your workspace:
|
||||
|
||||
```json
|
||||
{
|
||||
"servers": {
|
||||
"likec4": {
|
||||
"type": "sse",
|
||||
"url": "http://localhost:33335/mcp"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This configuration gives GitHub Copilot and other MCP-compatible AI agents access to LikeC4 tools for querying your architecture models.
|
||||
|
||||
### Starting the MCP Server
|
||||
|
||||
Start the LikeC4 MCP server locally:
|
||||
|
||||
```bash
|
||||
# in the project root of the documentation repo
|
||||
npx likec4 mcp resources/edp-likec4 --http
|
||||
```
|
||||
|
||||
The server runs on `http://localhost:33335/mcp` by default.
|
||||
|
||||
### Querying Architecture Models
|
||||
|
||||
Once connected, you can ask the AI agent questions like:
|
||||
|
||||
- **"In which model file is the resource edp.garm specified?"**
|
||||
- Returns: `resources/edp-likec4/models/containers/garm.c4`
|
||||
|
||||
- **"Show me all views that include the forgejo element"**
|
||||
- Lists all views containing the forgejo element
|
||||
|
||||
- **"What relationships does edp.garm have?"**
|
||||
- Shows incoming and outgoing relationships
|
||||
|
||||
- **"List all elements in the architecture project"**
|
||||
- Provides a complete overview of elements
|
||||
|
||||
### Available MCP Tools
|
||||
|
||||
The LikeC4 MCP server provides these tools to AI agents:
|
||||
|
||||
- `list-projects` - List all LikeC4 projects
|
||||
- `search-element` - Search elements by id/title/kind/tags
|
||||
- `read-element` - Get detailed element information
|
||||
- `read-view` - Get view details (nodes/edges)
|
||||
- `read-deployment` - Get deployment node information
|
||||
- `find-relationships` - Find relationships between elements
|
||||
- `read-project-summary` - Get project overview
|
||||
|
||||
### Use Cases
|
||||
|
||||
**Finding definitions:**
|
||||
```
|
||||
"Where is edp.forgejo defined?"
|
||||
```
|
||||
|
||||
**Understanding relationships:**
|
||||
```
|
||||
"What components does edp.garm contain?"
|
||||
```
|
||||
|
||||
**Exploring views:**
|
||||
```
|
||||
"Which views show the deployment architecture?"
|
||||
```
|
||||
|
||||
**Documentation validation:**
|
||||
```
|
||||
"Check if all elements in the forgejoGarmInteraction view are documented"
|
||||
```
|
||||
|
||||
## Available Tasks
|
||||
|
||||
View all tasks:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue