The Evolith CLI includes a Model Context Protocol (MCP) server that allows AI agents to interact with Evolith governance tools. This guide shows how to configure and use Evolith with popular AI coding assistants.
The Model Context Protocol is a standard for AI agents to use tools. When you configure Evolith as an MCP server, AI agents like Cursor or Claude can:
- Discover available tools - The agent queries
tools/listto see what it can do - Call tools - The agent invokes
tools/callwith tool name and arguments - Read resources - The agent accesses documentation and data
- Use prompts - The agent gets structured guidance for workflows
npm install -g @evolith/smart-cliCreate or edit ~/.cursor/mcp.json:
{
"mcpServers": {
"evolith": {
"command": "smart-cli",
"args": ["mcp", "serve"],
"env": {
"EVOLITH_CORE_PATH": "/path/to/evolith"
}
}
}
}Close and reopen Cursor AI to load the new MCP configuration.
Once configured, you can chat with Cursor:
User: Validate my repository
→ Cursor calls evolith-validate tool
→ Displays validation results
User: Show me the ADR matrix
→ Cursor calls evolith-adr-list tool
→ Displays ADRs with status
User: Install a standard agent
→ Cursor calls evolith-agent-install tool
→ Guides through installation
npm install -g @evolith/smart-cliEdit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"evolith": {
"command": "smart-cli",
"args": ["mcp", "serve"],
"env": {
"EVOLITH_CORE_PATH": "/path/to/evolith"
}
}
}
}Close and reopen Claude Desktop to load the MCP configuration.
Validate repository compliance against Evolith standards.
Arguments:
{
path: string; // Path to repository (required)
format?: 'json' | 'summary' | 'table'; // Output format
ruleset?: string; // Specific ruleset (acl, open-core, etc.)
corePath?: string; // Path to Evolith Core
}Example:
const result = await callTool('evolith-validate', {
path: '/user/project',
format: 'summary'
});
// Returns: { status: 'passed', rulesChecked: 12, issues: [] }Validate repository architecture against F1/F2/F3 rules.
Arguments:
{
path: string;
level?: 'F1' | 'F2' | 'F3'; // Architecture level
}List all ADRs in the repository.
Arguments:
{
status?: string; // Filter by status (accepted, proposed, etc.)
}Get specific ADR details.
Arguments:
{
id: string; // ADR ID (e.g., "ADR-0002")
}Install a new Evolith agent.
Arguments:
{
name: string; // Agent name
template?: string; // Template (standard, minimal, enterprise)
dir?: string; // Installation directory
}List installed agents.
Arguments:
{
dir?: string; // Directory to search
}Validate agent ruleset.
Arguments:
{
name: string; // Agent name
dir?: string; // Agent directory
}Generate phase handoff manifest.
Arguments:
{
path: string; // Repository path
fromPhase: string; // Source phase (phase-0, phase-1, etc.)
toPhase: string; // Target phase
}Show current SDLC phase status.
Arguments:
{
path: string; // Repository path
}Get configuration value.
Arguments:
{
key: string; // Config key (e.g., "coreRef.version")
dir?: string; // Repository directory
}Set configuration value.
Arguments:
{
key: string; // Config key
value: string; // New value
dir?: string; // Repository directory
}Get MCP server usage metrics.
Arguments: {} (none)
Human: Please validate my repository and fix any issues
Claude: I'll validate your repository against Evolith standards.
await callTool('evolith-validate', {
path: '/user/project',
format: 'summary'
})
Result: Validation found 2 blocking issues:
- GOV-01: evolith.yaml missing
- INH-02: Core version not pinned
Claude: I found 2 issues that need fixing:
1. **evolith.yaml missing** - Your repository doesn't have the required configuration file.
2. **Core version not pinned** - The evolith.yaml doesn't specify coreRef.version.
Let me help you fix these:
Human: Create a new ADR for our database decision
Claude: I'll create a new Architecture Decision Record for your database choice.
await callTool('evolith-adr-create', {
title: 'Use PostgreSQL as Primary Database',
context: 'We need to select a database for our main data store...',
decision: 'We decided to use PostgreSQL because...',
consequences: {
positive: ['ACID compliance', 'Rich indexing', 'JSON support'],
negative: ['Requires more memory', 'Migration complexity']
}
})
Result: ADR-0042 created successfully
Human: Set up Evolith governance for our project
Claude: I'll initialize Evolith governance and install the standard agent.
First, let me check the current state:
await callTool('evolith-sdlc-status', { path: '/user/project' })
Result: No evolith.yaml found. Initializing...
Now installing the standard agent:
await callTool('evolith-agent-install', {
name: 'governance-agent',
template: 'standard',
dir: '/user/project'
})
Result: Agent installed successfully with 6 rulesets
Claude: ✅ Evolith governance initialized!
Your project now has:
- evolith.yaml configuration
- Standard agent with 6 rulesets
- ADR registry (empty, ready for first decision)
The MCP server provides these resources:
Lists all ADRs with metadata.
Available governance standards.
Installed agents and their rulesets.
The MCP server includes prompts for common workflows:
Generates a phase handoff manifest template.
Guides through ADR creation process.
If the AI says "Tool not found", check:
- MCP server is running:
smart-cli mcp serve - Configuration is correct in mcp.json
- Restart the AI application
Ensure the AI application has permission to execute evolith.
For long operations, increase timeout in MCP config:
{
"mcpServers": {
"evolith": {
"command": "smart-cli",
"args": ["mcp", "serve"],
"timeout": 30000
}
}
}| Variable | Description | Default |
|---|---|---|
EVOLITH_CORE_PATH |
Path to Evolith Core | Auto-detect |
EVOLITH_CONFIG_PATH |
Custom config location | ~/.evolith |
EVOLITH_LOG_LEVEL |
Logging level | info |
- Configure your AI assistant with the MCP server
- Try validating an existing repository
- Create your first ADR
- Install an agent for automated governance