dci-mcp
v0.2.0
Published
MCP Server generating code that adheres to DCI architecture principles.
Readme
dci-mcp
An MCP server that generates code adhering to the DCI architecture when generating or refactoring code. It loads language-specific rules and examples, then instructs the LLM to apply them immediately — no back-and-forth.
Tools
| Tool | When to use |
| -------------------------------- | -------------------------------------------------------------------------- |
| prepare_dci_refactor | User wants to refactor existing code into DCI |
| scaffold_dci_from_mental_model | User describes a mental model / user story and wants DCI code from scratch |
Both tools accept a language argument (e.g. "typescript", "javascript") and return the full DCI ruleset for that language as context.
Supported languages
Add a folder under docs/ with instructions.md (required) and examples.md (optional):
docs/
core.md # DCI rules shared across all languages
typescript/
instructions.md
examples.md
javascript/
instructions.md
examples.mdUsage in mcp.json (stdio)
"dci": {
"command": "pnpx",
"args": ["dci-mcp"]
}Or with npx:
"dci": {
"command": "npx",
"args": ["-y", "dci-mcp"]
}Development
pnpm install
pnpm dev # build + pnpm link (makes dci-mcp available globally)
pnpm inspector # open MCP Inspector connected to the local serverAfter pnpm dev, the server is available as dci-mcp in your PATH and can be used in mcp.json outside this project while you iterate:
"dci": {
"command": "dci-mcp"
}