Skip to main content

MCP Server Mode

Expose DIAL as tools via the Model Context Protocol (MCP).

Start the Server

npx dialai --mcp

Configure Claude Desktop

Add to claude_desktop_config.json:

{
"mcpServers": {
"dialai": {
"command": "npx",
"args": ["dialai", "--mcp"]
}
}
}

Config File Location

PlatformPath
macOS~/Library/Application Support/Claude/claude_desktop_config.json
Windows%APPDATA%\Claude\claude_desktop_config.json
Linux~/.config/Claude/claude_desktop_config.json

Available Tools

Once connected, Claude has access to these tools:

ToolDescription
create_sessionStart a new decision process from a machine definition
get_sessionGet current state and history of a session
get_sessionsList all sessions
register_proposerRegister a proposer specialist for a machine
register_arbiterRegister an arbiter specialist for a machine
submit_proposalSubmit a transition proposal
evaluate_consensusCheck if consensus has been reached (read-only)
submit_arbitrationEvaluate consensus and optionally execute the winning transition
execute_transitionApply a transition directly
run_sessionRun a machine to completion
get_collapse_metricsGet progressive collapse metrics
get_decision_logGet decision log records

Example Conversation

User: Create a code review session for my PR.

Claude (using tools):

1. create_session({ machine: { machineName: "code-review", ... } })
2. register_proposer({ specialistId: "ai-reviewer", machineName: "code-review", strategyFnName: "firstAvailable" })
3. register_arbiter({ specialistId: "arbiter", machineName: "code-review", strategyFnName: "alignmentMargin" })
4. submit_proposal({ sessionId: "...", specialistId: "ai-reviewer" })
5. submit_arbitration({ sessionId: "..." })

Tool Schemas

create_session

{
"machine": {
"machineName": "code-review",
"initialState": "pending",
"goalState": "approved",
"states": { ... }
}
}

submit_proposal

{
"sessionId": "session-uuid",
"specialistId": "proposer-id",
"transitionName": "approve",
"reasoning": "Why this transition"
}

Server Options

# Stdio transport (default for MCP)
npx dialai --mcp

Debugging

Check server logs:

npx dialai --mcp --verbose

Test with MCP Inspector:

npx @modelcontextprotocol/inspector npx dialai --mcp