3.5 KiB
3.5 KiB
MiroFish Integration Stack
Goal
Use MiroFish as the prediction engine and simulation brain, with:
- Codex as the builder and operator
- Claude as the reasoning and synthesis layer
- n8n as the automation layer
- MCP as the shared tool access layer
Recommended Architecture
Codex / Claude
|
v
MCP tools
|
v
MiroFish backend API
|
+--> graph build
+--> simulation lifecycle
+--> interviews with agents
+--> report generation and chat
|
v
MiroFish frontend
n8n
|
+--> calls MiroFish backend directly over HTTP
+--> or invokes the same lifecycle through the MCP server
Roles
Codex
- builds workflow glue, prompts, and wrappers
- drives MiroFish through MCP tools
- prepares projects, simulations, and reports
Claude
- consumes simulation outputs and reports
- performs deeper reasoning on what the simulation means
- uses the same MCP tools so it sees the same state as Codex
n8n
- schedules or triggers prediction runs
- polls preparation/report task status
- routes outputs to Slack, email, dashboards, or databases
MCP
- standardizes access to MiroFish
- gives Codex and Claude a stable tool layer
- avoids coupling every agent directly to raw REST details
Added in This Setup
- MCP server:
integrations/mcp/mirofish_mcp_server.py - start scripts:
- Codex and Claude setup guide:
- n8n workflow template:
- npm scripts:
npm run mcp:stdionpm run mcp:http
MCP Tools Exposed
- health
- project list
- project detail
- graph build
- graph task status
- simulation create
- simulation prepare
- simulation prepare status
- simulation start
- simulation stop
- simulation run status
- simulation timeline
- batch interviews
- report generate
- report generate status
- report fetch
- report fetch by simulation
- report chat
n8n Automation Pattern
Use HTTP Request nodes against the backend:
POST /api/graph/build- poll
GET /api/graph/task/{task_id} POST /api/simulation/createPOST /api/simulation/prepare- poll
POST /api/simulation/prepare/status POST /api/simulation/start- poll
GET /api/simulation/{simulation_id}/run-status POST /api/report/generate- poll
POST /api/report/generate/status GET /api/report/by-simulation/{simulation_id}
An importable starter workflow is included at
integrations/n8n/mirofish_prediction_pipeline.json.
Suggested Operating Mode
- Let Codex build and evolve the simulation workflow.
- Let Claude reason over the generated report and interview outputs.
- Let n8n handle timed or event-driven execution.
- Treat MiroFish as the core prediction substrate, not the orchestration system.
Notes
- Real simulation quality depends on valid
LLM_API_KEYandZEP_API_KEY. - Local boot verification can use placeholder values, but real runs cannot.
- Python 3.12 is required for this repo on this Mac.