MCP (Model Context Protocol) server that gives AI coding agents access to the CleanSlice architecture documentation.
Overview
MCP (Model Context Protocol) server that gives AI coding agents access to the CleanSlice architecture documentation.
README
CleanSlice MCP Server
MCP (Model Context Protocol) server that gives AI coding agents access to the CleanSlice architecture documentation. Connect it to Claude, Cursor, Windsurf, or any MCP-compatible client so the AI knows how to build apps using CleanSlice conventions.
Installation
Available Tools
| Tool | Description |
|---|---|
get-started |
Returns the essential CleanSlice rules and conventions. Call this first. |
list-categories |
Lists all documentation categories available for search filtering |
search |
Search docs by query, category, framework, phase, or tags. Returns snippets (keyword-in-context excerpts) and document paths |
read-doc |
Read the full content of a specific document by path. Use after search to get complete docs |
Recommended workflow
get-started → learn the core rules
list-categories → discover what's available
search(query: "...") → find relevant docs (returns snippets)
read-doc(path: "...") → read full document when snippets aren't enough
The search tool returns 1-3 keyword-in-context snippets per result instead of full document content. This keeps responses compact (~3-5K instead of ~95K) while showing the most relevant sections. Use read-doc with the path from search results to fetch the complete document when needed.
Environment Variables
| Variable | Default | Description |
|---|---|---|
PORT |
8080 |
Server port |
NODE_ENV |
- | Set to dev for debug/verbose logging |
DOCS_PATH |
Auto-discover | Path to bundled docs directory |
GITHUB_REPO |
CleanSlice/docs |
Fallback GitHub repo for docs |
GITHUB_BRANCH |
main |
GitHub branch to fetch from |
GITHUB_TOKEN |
- | GitHub token (optional, for higher rate limits) |
GITHUB_CACHE_TTL |
3600 |
GitHub content cache TTL in seconds |
CORS_ORIGIN |
* |
Allowed CORS origin(s) |
Docker
docker build -t cleanslice-mcp .
docker run -p 8080:8080 cleanslice-mcp
Endpoints
| Endpoint | Description |
|---|---|
GET /sse |
SSE transport (for Claude Desktop, Cursor) |
POST /messages |
SSE message handler |
POST /mcp |
Streamable HTTP transport |
GET /health |
Health check |
GET /api |
Swagger docs |
Architecture documentation synchronization
The four reliability guides in docs/architecture/ are generated from the website repository’s docs/architecture/ files (sibling checkout ../docs/docs/architecture). Run node scripts/sync-architecture-docs.mjs after editing the canonical docs and node scripts/sync-architecture-docs.mjs --check before release. For another checkout layout pass --source=/absolute/path/to/architecture. The check fails on missing or divergent copies. Commit the generated bundle with the MCP change so standalone deployments can search/read the same versioned content.
get-started loads 00-quickstart/get-started.md directly, with local-first/remote fallback. If unavailable it fails explicitly rather than returning empty rules. The bundled-knowledge integration tests exercise real loading, searching and rendered startup content. Updating files locally does not update the hosted MCP: build/test, publish the docs and deploy the MCP through the normal authorized release process.
Install
docker run -p 8080:8080 cleanslice-mcpConfiguration
{
"mcpServers": {
"cleanslice": {
"type": "http",
"url": "https://mcp.cleanslice.org/mcp"
}
}
}