CleanSlice MCP Server
[Install 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
Install in Claude Code
Run this command. See Claude Code MCP docs for more info.
Remove --scope user to install for the current project only.
Tip: enforce MCP usage with CLAUDE.md
To make sure Claude Code always consults the CleanSlice MCP before writing any code, add the following to your project's CLAUDE.md:
This ensures the agent reads CleanSlice docs at the start of every task, not after the fact.
Optional: add a Stop hook as a safety net
To catch cases where the agent skips the MCP despite the CLAUDE.md instruction, add this to .claude/settings.json:
Install in Cursor
Go to: Settings -> Cursor Settings -> MCP -> Add new global MCP server
Paste the following into your Cursor ~/.cursor/mcp.json file. You may also install in a specific project by creating .cursor/mcp.json in your project folder. See Cursor MCP docs for more info.
Tip: enforce MCP usage with a Cursor rule
Create .cursor/rules/cleanslice.mdc in your project to make Cursor always consult the MCP before writing code:
Install in Windsurf
Add to your Windsurf MCP config file. See Windsurf MCP docs for more info.
Tip: enforce MCP usage with a Windsurf rule
Create .windsurf/rules/cleanslice.md in your project to make Windsurf always consult the MCP before writing code:
Install in VS Code (Copilot)
Add to .vscode/mcp.json in your project. See VS Code MCP docs for more info.
Tip: enforce MCP usage with Copilot instructions
Create .github/copilot-instructions.md in your project root to make Copilot always consult the MCP before writing code:
Install in Claude Desktop
Add to your claude_desktop_config.json. See Claude Desktop MCP docs for more info.
Install in Opencode
Add this to your Opencode configuration file. See Opencode MCP docs for more info.
Tip: enforce MCP usage with AGENTS.md
Create AGENTS.md in your project root to make Opencode always consult the MCP before writing code:
Run Locally
Then point your MCP client to http://localhost:8080/mcp.
Available Tools
Recommended workflow
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
Docker
Endpoints
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.