recursivemas
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@recursivemassolve this triple integral over the region x²+y²+z²≤9"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
OpenCode × RecursiveMAS — logica ufficiale, zero dipendenze
Tutta la logica di RecursiveMAS (MIT) replicata come procedura nativa OpenCode: nessun server, nessun MCP, nessuno script, nessuna GPU. Ogni regola cita il file ufficiale da cui deriva.
Stato verificato: config globale minima, agent 9 sezioni (11 citazioni), comando
/recursive, repo allineata al locale.
Indice
Related MCP server: advanced-reason-mcp
1. Preview
Richiesta | Cosa fa OpenCode in automatico |
Codice/test | Planner (3-6 step, no codice) → refiner pure-plan → solver (1 blocco) |
Opzioni A-D | Stesso giro, risposta |
Math/scienza | Stesso giro, risposta |
Domanda mista | 3 esperti (math/code/science) → summarizer |
Piano da eseguire con vincoli | Expert → learner ("prioritize the task constraints") |
Ricerca esterna | Reflector |
Problema duro | 3 round con feedback + judge JSON |
Fuori scope | Risposta normale |
2. Architettura
tu scrivi in OpenCode (qualsiasi progetto)
└─▶ instructions globali (routing, 1 riga per regola)
└─▶ agent recursive (primary, temp 0.6 ufficiale)
├─▶ §1 routing code/choice/math (infer_hie_task, infer_distill_task)
├─▶ §2 sequential + feedback (prompts.py planner/refiner/solver)
├─▶ §3 mixture + summarizer (prompts.py hie)
├─▶ §4 distillation learner (prompts.py distill)
├─▶ §5 deliberation reflector (reflector_tool_notes.py, TOOL_RE)
├─▶ §6 passaggi = slot ufficiali (FEEDBACK/REFINED/DISTILL/HIE slots)
├─▶ §7 log esiti result_jsonl (run.py) in memory/recursive-results.jsonl
├─▶ §8 temperature 0.6 / 0.2 (run.py, MBPPPLUS_TEMPERATURE)
└─▶ §9 judge {"true_false"} (llm_judge.py)3. Struttura repo
agent/recursive.md # agent globale: 9 sezioni, ogni regola citata
command/recursive.md # /recursive: forza il protocollo
opencode.example.json # config minima: $schema + instructions
memory/recursive-results.jsonl # log esiti (schema result_jsonl ufficiale)
docs/ # guide (guida completa, token-saver, installazione, CPU roles)
recursivemas/ # sorgenti extra archiviati + vendor/ (file ufficiali MIT)
scripts/ # start server, setup CPU roles, Modelfile4. Installazione
mkdir -p ~/.config/opencode/agent ~/.config/opencode/command
cp agent/recursive.md ~/.config/opencode/agent/
cp command/recursive.md ~/.config/opencode/command/
# unisci "instructions" da opencode.example.json nel tuo ~/.config/opencode/opencode.jsoncVerifica: apri opencode in un progetto qualsiasi, chiedi codice + math e controlla
che segua planner → refiner → solver con \boxed{}.
5. Agent recursive — le 9 sezioni
§1 Routing — task code/choice/math come
infer_hie_task/infer_distill_task; dataset ufficiali (math500, medqa, gpqa, mbppplus, aime25/26, livecodebench, bamboogle, hotpotqa); search-QA → deliberation.§2 Sequential — wording originale planner/refiner/solver (code 3-6 step "Do not write code"; math "Give a plan"); solver 1 blocco codice o
\boxed{}; feedback-slot; round da tabella release (3 default, 2 su task veloci).§3 Mixture — esperti testuali + summarizer ufficiale ("You may reference the three expert information").
§4 Distillation — learner ufficiale ("Use the expert plan as guidance, but prioritize the task constraints"), judge a chiudere il loop.
§5 Deliberation — reflector ufficiale (think in mind, tag search/python/result,
\boxed{}latex), tool eseguiti con quelli OpenCode.§6 Passaggi inter-round — solo ciò che gli slot ufficiali trasportano (Initial/Refined Plan, feedback, result). Nient'altro.
§7 Log esiti — schema
result_jsonldi run.py (question/gold/pred/raw_output + verdetto); rilettura ultime 20 su task duri.§8 Temperature — 0.6 default, 0.2 code con test nascosti.
§9 Judge — JSON
{"true_false": bool}(llm_judge.py); false → 1 riparazione, max 2 giudizi.
6. Comando /recursive
Forza il protocollo sulla richiesta $ARGUMENTS con lo stesso routing e le stesse
chiusure dell'agent. Nessun tool esterno.
7. Flusso logico
richiesta → routing (§1) → famiglia (§2/3/4/5)
→ round con feedback via slot (§6, conteggi §2)
→ judge (§9) → false? 1 riparazione : fine
→ append log (§7)8. Schema operativo
Installi una volta (vedi §4) → vale per OGNI progetto.
Programmi normale: il protocollo scatta da solo.
/recursive ...solo per forzarlo.Niente da accendere, niente da aggiornare: è testo in config.
9. Fonti ufficiali e vendor
recursivemas/vendor/ contiene (MIT, (c) 2026 RecursiveMAS, vedi ATTRIBUTION.txt):
official_prompts.py, official_mas_prompt.py, off_notes.py (reflector),
off_judge.py (llm_judge). Studiati anche inference_mas*.py (6985 righe),
load_from_repo.py (STYLE_SPECS), run.py (dataset, temperature, result_jsonl).
10. Cosa NON è incluso (e perché)
Non è logica replicabile ma calcolo fisico o attività separata:
Esecuzione latente (
modeling.pyRecursiveLink, adapter.pt, pesi) → richiede GPU/VRAM.Training (
train/) → richiede cluster per gradienti.Eval harness eseguito → richiede i pesi; la sua logica (routing, temperature, result_jsonl, judge) È inclusa sopra.
11. Extra opzionali
In extras/ (richiedono dipendenze, non servono all'uso nativo): wrapper FastAPI
OpenAI-compatible, router CLI, pipeline ruoli CPU via Ollama (testata), MCP server,
setup Colab T4, code pipeline, check-gpu. Dettagli in docs/.
This server cannot be deployed
Maintenance
Related MCP Connectors
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
A paid remote MCP for OpenAI Codex context compressor, built to return verdicts, receipts, usage log
Multiple MCP tools, persistent graph memory, token-saving data pointers, and more.
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables context compression for Claude Code by offloading large file queries and document processing to Ollama, saving context window tokens.MIT
- AlicenseNot gradedqualityDmaintenanceEnables advanced reasoning and reflection using the Gemini API and OpenRouter models, integrating sequential thinking and critique capabilities.33MIT
- FlicenseNot gradedqualityCmaintenanceRoutes code generation tasks between local models and Claude Cloud, optimizing cost by handling simple tasks locally and reserving cloud thinking for complex tasks.-
- AlicenseNot gradedqualityBmaintenanceEnables Claude Code to delegate prompts to an OpenCode agent session for cheaper executor-role work, supporting different providers and session persistence.17,832 npmMIT