2.9 KiB
2.9 KiB
MiroFish MCP Server
The MCP server exposes MiroFish lifecycle tools, not a Graphiti proxy.
Start:
cd /Users/leaf/Documents/future/MiroFish/backend
uv run mirofish-mcp
Tools:
mirofish_create_runmirofish_runmirofish_resume_runmirofish_get_statusmirofish_get_current_stagemirofish_update_simulation_settingsmirofish_approve_stagemirofish_reject_stagemirofish_rerun_stagemirofish_list_requestsmirofish_get_requestmirofish_submit_responsemirofish_validate_responsemirofish_build_graphmirofish_search_graphmirofish_export_graphmirofish_start_simulationmirofish_resume_simulationmirofish_generate_reportmirofish_get_reportmirofish_ask_followup_questionmirofish_get_followup_answermirofish_list_artifactsmirofish_doctor
Staged Mode
Use staged mode when a desktop agent should mirror the original MiroFish step-by-step UI flow. The simulation round count is a hard MCP field, not text hidden in the requirement.
Typical Qoder/Codex/Claude Code sequence:
- Call
mirofish_doctor. - Call
mirofish_create_runwithmode="staged",rounds=10,round_unit="year", and the seed/requirement/output path. - Call
mirofish_get_current_stageand show the user the stage summary. - After user confirmation, call
mirofish_approve_stage. - Call
mirofish_resume_run; staged mode advances only to the next pause point orneed_agent_response. - When
need_agent_responseappears, readrequest_file, write the response JSON, callmirofish_validate_response, thenmirofish_submit_response. - Repeat resume/approve until
report.md,verdict.json,timeline.json, andgraph_snapshot.jsonexist. - Use
mirofish_ask_followup_questionfor post-report questions.
Example mirofish_create_run arguments:
{
"seed": "/Users/leaf/Documents/future/MiroFish/seeds/chip.md",
"requirement": "预测未来10年全球芯片能力格局变化",
"output": "/Users/leaf/Documents/future/MiroFish/runs/chip-2036",
"mode": "staged",
"rounds": 10,
"round_unit": "year",
"minutes_per_round": 525600,
"pause_each_round": false,
"agent_count": 5,
"simulation_name": "chip-2036"
}
If the user changes hard parameters before approval, call mirofish_update_simulation_settings. The engine marks dependent stages stale/pending so old profile/config/simulation/report outputs are not silently reused.
Example MCP server config:
{
"mcpServers": {
"mirofish": {
"command": "uv",
"args": ["run", "mirofish-mcp"],
"cwd": "/Users/leaf/Documents/future/MiroFish/backend",
"env": {
"MIROFISH_MODE": "agent",
"MIROFISH_LLM_PROVIDER": "agent_queue",
"MIROFISH_GRAPH_PROVIDER": "graphiti",
"MIROFISH_RUNS_DIR": "./runs"
}
}
}
}
Reference: https://modelcontextprotocol.github.io/python-sdk/server/