3.1 KiB
3.1 KiB
Codex and Claude MCP Setup
Goal
Use MiroFish as a shared prediction engine through one MCP server so:
- Codex can build and operate simulation flows
- Claude can reason over the same simulation and report state
- both tools stay aligned on one backend
Recommended Shape
- Run the MiroFish backend locally
- Run one MCP server against that backend
- Point Codex and Claude at the same MCP server
Codex ----\
>---- MiroFish MCP ---- MiroFish backend
Claude ---/
Start Order
From /Users/al/Documents/CODEX/MiroFish:
npm run backend
In another terminal:
npm run mcp:stdio
If you prefer HTTP transport instead of stdio:
MIROFISH_BASE_URL=http://127.0.0.1:5001 npm run mcp:http
Codex Connection
Register the MCP server in Codex using the command below as the server command:
cd /Users/al/Documents/CODEX/MiroFish/backend && uv run python ../integrations/mcp/mirofish_mcp_server.py --transport stdio
Recommended environment:
MIROFISH_BASE_URL=http://127.0.0.1:5001
MIROFISH_HTTP_TIMEOUT=60
Use stdio for local Codex work unless you specifically need HTTP transport for shared remote access.
Claude Connection
Register the same MCP server command in Claude's MCP settings:
cd /Users/al/Documents/CODEX/MiroFish/backend && uv run python ../integrations/mcp/mirofish_mcp_server.py --transport stdio
Use the same environment values:
MIROFISH_BASE_URL=http://127.0.0.1:5001
MIROFISH_HTTP_TIMEOUT=60
This keeps Codex and Claude on one shared tool surface and avoids separate wrapper logic.
MCP Tools You Can Rely On
mirofish_healthmirofish_list_projectsmirofish_get_projectmirofish_build_graphmirofish_get_graph_taskmirofish_create_simulationmirofish_prepare_simulationmirofish_prepare_statusmirofish_start_simulationmirofish_stop_simulationmirofish_simulation_statusmirofish_simulation_timelinemirofish_interview_agentsmirofish_generate_reportmirofish_report_statusmirofish_get_reportmirofish_get_report_by_simulationmirofish_chat_report
Recommended Operator Flow
- Confirm backend health with
mirofish_health. - Choose an existing project with
mirofish_list_projects. - Build or rebuild the graph with
mirofish_build_graph. - Poll graph completion with
mirofish_get_graph_task. - Create a simulation with
mirofish_create_simulation. - Prepare the simulation with
mirofish_prepare_simulation. - Poll readiness with
mirofish_prepare_status. - Start the run with
mirofish_start_simulation. - Poll runtime with
mirofish_simulation_status. - Generate the report with
mirofish_generate_report. - Fetch the final output with
mirofish_get_report_by_simulation. - Ask follow-up questions with
mirofish_chat_report.
Notes
- Real simulation runs still require valid
LLM_API_KEYandZEP_API_KEY. - The MCP server is a control layer, not a replacement for the MiroFish backend.
- n8n should call the backend directly for scheduled runs unless you explicitly want agent-mediated orchestration.