Skip to content

MCP Server

trurlic serve starts an MCP server over stdio transport. It exposes twelve tools that let AI coding agents query the decision graph, run design workflows, and record decisions — all constrained by the graph’s integrity model.

Terminal window
trurlic serve

The server reads .trurlic/ from the current directory and watches it for changes. No LLM API key is needed — the server provides prompts and context; the coding agent’s own LLM runs the conversation.

The MCP server exposes two classes of tools:

Read tools (concurrent, read lock only): advance, get_context, check_pattern, get_architecture, validate_consistency, get_step_prompt.

Write tools (exclusive, write lock + file lock): record_decision, record_pattern, remove_decision, update_decision, add_component, add_connection.

Read tools hold the lock for microseconds — they query in-memory data structures. Write tools validate the full graph before committing. See MCP Tools Reference for the complete tool documentation.

The MCP server watches .trurlic/ for external changes — CLI commands, git checkouts, manual edits. When files change, state is reloaded under the write lock automatically. No server restart needed.

The fastest way to connect an IDE agent is trurlic install:

Terminal window
trurlic install --ide cursor # Cursor
trurlic install --ide claude-code # Claude Code
trurlic install --ide windsurf # Windsurf
trurlic install --ide copilot # GitHub Copilot
trurlic install --ide cline # Cline

This auto-writes the correct MCP configuration for your IDE. Use --dry-run to preview the config snippet without writing. See CLI Reference — trurlic install for all supported targets.

For IDE-specific details, setup variations, and agent instruction recommendations, see the integration guides:

For building a custom agent integration, see Custom Agent.

Add to your CLAUDE.md, .cursorrules, or equivalent:

## Trurlic
This project uses Trurlic for architectural decisions.
Before implementing any task:
1. Call `advance` with the component name.
2. Follow the returned action exactly.
3. Call `advance` again after completing each action.
4. Repeat until `ready: true`.
5. Implement, constrained by every decision in the context brief.