API Reference
API Reference
Overview
Last Updated: April 1, 2026Claudius Corp provides two ways for AI agents to communicate with the workflow engine: In-Process Bridge (Primary) The MCP Bridge is the primary communication channel. It runs in-process with the Claudius Corp application, giving agents direct access to workflow state. Protocol: JSON-RPC 2.0 over TCP Host: localhost Port: Dynamic (written to MCP_PORT_FILE at startup) Used...
Connection Protocol
Last Updated: April 1, 2026In-Process Bridge Read the bridge port from the file at MCP_PORT_FILE environment variable: port = readFile(System.getenv("MCP_PORT_FILE")).trim() Open a TCP connection to localhost:{port} Send JSON-RPC requests as newline-delimited JSON strings Read responses as newline-delimited JSON strings Environment Variables Variable Required Description DMSI_CONTEXT_PATH Yes Path to context.md file with phase instructions MCP_PORT_FILE Yes (bridge) Path to file...
Request & Response Format
Last Updated: April 1, 2026Request { "jsonrpc": "2.0", "method": "tool_name", "params": { "param1": "value1", "param2": "value2" }, "id": 1 } Success Response { "jsonrpc": "2.0", "id": 1, "result": { "success": true, "data": { ... } } } Error Response { "jsonrpc": "2.0", "id": 1, "error": { "code": -32600, "message": "Tool not found: dmsi_unknown_tool" } }
Tool Reference — In-Process Bridge Tools
Last Updated: April 1, 2026These tools run in-process with direct access to WorkflowV3Service and the full application state. dmsi_phase_complete Mark the current phase as complete and advance the workflow. Parameters Parameter Type Required Description summary string Yes Summary of what was accomplished in this phase outcome string No Outcome label (used for AUTO decision routing) issues array No Array...
Tool Reference — Standalone MCP Server Tools
Last Updated: April 9, 2026These tools are available in the standalone McpServer (stdin/stdout mode). They access the database directly via DMSI_DB_PATH. dmsi_phase_complete Mark the current phase as complete. Available in both the in-process bridge and the standalone MCP server. Parameters Parameter Type Required Description summary string Yes Summary of what was accomplished in this phase outcome string No Outcome...
Error Handling
Last Updated: April 1, 2026Standard JSON-RPC Error Codes Code Meaning -32700 Parse error — invalid JSON -32600 Invalid request -32601 Method not found -32602 Invalid params -32603 Internal error Application-Level Errors When a tool call fails due to application state, the response includes an error with a descriptive message: { "jsonrpc": "2.0", "id": 1, "error": { "code": -32603, "message":...
Usage Examples
Last Updated: October 13, 2026Complete Phase Workflow # Pseudocode — agent execution loop # 1. Get context context = call("dmsi_context", {}) # 2. List tasks tasks = call("dmsi_task_list", {"status": "pending"}) # 3. Work on tasks for task in tasks: call("dmsi_task_update", {"task_id": task.id, "status": "in_progress"}) # ... do work ... call("dmsi_heartbeat", {"message": f"Completed {task.title}"}) call("dmsi_task_complete", {"task_id": task.id, "notes": "Implementation complete"})...
