MCP Reasoning Booster: Verifikovateľné mikro‑kroky pre lepšie uvažovanie

MCP Reasoning Booster: Verifiable micro‑steps for better reasoning

1. 10. 2025 Ing. Róbert Polák AI, Technológie AI, Technologies
MCP Reasoning Booster

Čo je MCP Reasoning Booster

MCP Reasoning Booster je minimalistický TypeScript server, ktorý zlepšuje uvažovanie jazykových modelov bez ohľadu na konkrétnu doménu. V každej iterácii vygeneruje niekoľko možných mikro-krokov (buď pomocou LLM cez MCP, alebo použije záložné riešenia), ohodnotí ich kvalitu, vybere najlepší a nakoniec vytvorí stručný súhrn v JSON formáte.

Čo server ponúka

  • Mikro‑kroky: krátke, konkrétne návrhy (max. 200 znakov) s vysvetlením a možnosťou overenia how_to_verify.
  • Hodnotenie: každý krok dostane skóre podľa informačnej hodnoty, originality a konzistentnosti. Skóre slúži ako orientácia, nie ako absolútna pravda.
  • Diagnostika: ak bol použitý LLM, získate dôkaz v podobe diagnostics.provider, lastModel a rawSamples.
  • Spoľahlivé spracovanie: dokáže extrahovať JSON aj z bežného textu, odstráni <think> bloky a ak JSON chybuje, záložné riešenia stále poskytnú použiteľné kroky.

Rýchly štart

{
  "name": "solve",
  "arguments": {
    "task": "vaša úloha",
    "iterations": 8,
    "config": { "numCandidates": 5 },
    "outputPath": "./summary.json",
    "outputFormat": "json"
  }
}

Ako to používať

AI model zavolá nástroj solve s danou úlohou. Server spustí reláciu, vykoná niekoľko iterácií a vráti výsledky v JSON formáte. To je hlavný výstup.

Z výsledných krokov (steps) AI model vyberie 1-2 najlepšie, ktoré majú konkrétny spôsob overenia (how_to_verify) a prinášajú jasnú informáciu. Všeobecné či nekonkrétne kroky sa ignorujú. Vybrané nápady sa použijú v ďalšom uvažovaní. Ak treba viac nápadov, model zavolá znova step alebo solve s upravenou úlohou. Booster poskytuje nápady, finálne riešenie vytvorí AI model.

Dostupné nástroje (Tools)

Server poskytuje nasledujúce MCP nástroje:

  • start: Inicializuje novú reláciu s úlohou a konfiguráciou.
  • step: Vykoná jednu iteráciu (Best-of-N → hodnotenie → aplikovanie).
  • get-state: Vráti aktuálny stav relácie.
  • summarize: Vytvorí stručný súhrn zo scratchpadu.
  • multi-step: Vykoná viacero iterácií naraz.
  • solve: Komplexný nástroj typu "one-shot" – štart → N iterácií → súhrn v jednom volaní.

Tipy pre nastavenie

  • useSampling=true zapne generovanie návrhov pomocou LLM cez MCP. Odpovede budú v čistom JSON formáte.
  • minImprovement (napr. 0.01) aktivuje kontrolu stagnácie – ak nový krok výrazne nezlepší skóre, server vyskúša alternatívne vetvy (beam search).
  • beamWidth a beamDepth riadia počet a hĺbku alternatívnych vetiev, ktoré sa porovnávajú na základe celkového skóre.
  • Hodnotenie krokov používa všeobecné pravidlá (dĺžka, jasnosť, originalita, konzistencia). Váhy týchto pravidiel môžete upraviť.
  • Stav relácie sa drží iba v pamäti počas behu. Server komunikuje cez štandardný vstup/výstup (stdio).

Automatický výber AI modelu

Server si sám vyberie, aký AI model použije, v tomto poradí:

  1. Ak máte nastavený CEREBRAS_API_KEY, pripojí sa priamo na Cerebras API.
  2. Ak máte nastavený OPENAI_API_KEY, pripojí sa priamo na OpenAI API.
  3. Ak váš MCP klient podporuje generovanie textu, použije sa jeho model.
  4. Ak nie je k dispozícii žiadna z možností vyššie, server vygeneruje kroky pomocou vlastných heuristík (stále dostanete použiteľné, konkrétne kroky).

Nastavenie pre Claude Desktop

Ak používate Claude Desktop alebo Claude CLI s podporou MCP, pridajte server do konfigurácie. Tým umožníte Claude používať tento nástroj.

Príklad konfigurácie v claude.config.json:

{
  "mcpServers": {
    "reasoning-booster": {
      "command": "node",
      "args": ["./dist/index.js"],
      "cwd": "./mcp-reasoning-booster"
    }
  }
}

Po nastavení stačí v konverzácii s Claude požiadať o použitie nástroja solve pre vašu úlohu. Claude automaticky prepošle požiadavku serveru a ten vygeneruje kroky pomocou Claude modelu (nepotrebujete vlastné API kľúče). Vo výslednom JSON uvidíte diagnostics.provider: "mcp" a použitý model.

Inštalácia a vývoj

cd mcp-reasoning-booster
npm install
npm run build
# vývoj
npm run dev

Demo v termináli (PowerShell)

cd mcp-reasoning-booster
npm run build
npx --yes tsx tests\demo_sampling.ts --task "Plan a 3-step experiment to test if X causes Y under constraint Z."

Testy a kvalita

Server obsahuje dva typy testov:

  • Smoke test: Základný end-to-end test nástroj registrácie a iteračnej slučky (npm run smoke).
  • Quality test: Overuje zoradenie podľa totalScore, správnosť výberu top-1 kroku a monotónny rast stavu (npm run quality).

Odkaz na repozitár

Kód a dokumentácia: GitHub: mcp-reasoning-booster

MCP Reasoning Booster

What is MCP Reasoning Booster

MCP Reasoning Booster is a minimal, domain‑agnostic "reasoning booster" pipeline written in TypeScript. It iteratively generates candidate micro‑steps (optionally via LLM sampling using MCP; otherwise diversified fallbacks), scores them with a verifier, applies the best step, and finally returns a concise summary in JSON format.

What the booster provides

  • Micro‑steps: short, actionable suggestions (≤ 200 chars) with rationale and optional how_to_verify.
  • Scoring: heuristic scores for step quality (information gain, novelty vs. history, weak consistency). Treat scores as signals, not ground truth.
  • Diagnostics: proof that an LLM was called when available (diagnostics.provider, lastModel, rawSamples).
  • Robust parsing: prose‑to‑JSON extraction and <think>...</think> removal; if JSON is poor, fallback heuristics still return useful, verifiable steps.

Quickstart

{
  "name": "solve",
  "arguments": {
    "task": "your task",
    "iterations": 8,
    "config": { "numCandidates": 5 },
    "outputPath": "./summary.json",
    "outputFormat": "json"
  }
}

Recommended workflow

The AI model calls the solve tool with the given task. The server starts a session, runs N iterations, and returns a JSON result in the MCP response. This JSON is the primary output.

From steps, the AI model picks 1–2 best steps with concrete how_to_verify and clear information gain. Placeholders and meta steps are ignored. The chosen ideas are applied in further reasoning. If more ideas are needed, the model calls step again or re‑runs solve with a refined task. The booster generates ideas; the AI model composes and concludes the final answer.

Available Tools

The server provides the following MCP tools:

  • start: Initializes a new session with a task and configuration.
  • step: Performs one iteration (Best-of-N → scoring → application).
  • get-state: Returns the current session state.
  • summarize: Creates a brief summary from the scratchpad.
  • multi-step: Executes multiple iterations at once.
  • solve: Comprehensive "one-shot" tool – start → N iterations → summary in a single call.

Configuration tips

  • useSampling=true enables LLM sampling through MCP. Keep responses JSON‑only as required by the prompt.
  • minImprovement (e.g. 0.01) enables stagnation control; if the best candidate does not improve the score, a shallow beam can be tried.
  • beamWidth and beamDepth control a small beam search that compares a few short branches by cumulative score.
  • The verifier implements domain‑agnostic heuristics (length, vagueness, redundancy, weak consistency). Weights are configurable.
  • State is in‑memory and ephemeral. The server exposes the tools capability over stdio.

Provider selection (automatic)

The server auto‑selects provider in this order:

  1. If CEREBRAS_API_KEY is set: direct HTTP to Cerebras.
  2. If OPENAI_API_KEY is set: direct HTTP to OpenAI.
  3. If client supports MCP sampling: uses client's model.
  4. Otherwise: heuristic fallback steps (still return concrete, verifiable steps).

Claude CLI/Desktop configuration

If you use Claude CLI/Desktop with MCP enabled, add the server to its config so the client exposes the sampling capability to our server.

Example claude.config.json:

{
  "mcpServers": {
    "reasoning-booster": {
      "command": "node",
      "args": ["./dist/index.js"],
      "cwd": "./mcp-reasoning-booster"
    }
  }
}

In Claude chat/session, ask Claude to call the solve tool with your task. The client will route the request via MCP and our server will use MCP sampling (no API keys needed). You should see diagnostics.provider: "mcp" and the client's model in the JSON output.

Installation and development

cd mcp-reasoning-booster
npm install
npm run build
# development
npm run dev

Terminal demo (PowerShell)

cd mcp-reasoning-booster
npm run build
npx --yes tsx tests\demo_sampling.ts --task "Plan a 3-step experiment to test if X causes Y under constraint Z."

Testing and Quality

The server includes two types of tests:

  • Smoke test: Basic end-to-end test of tool registration and iteration loop (npm run smoke).
  • Quality test: Verifies sorting by totalScore, correctness of top-1 step selection, and monotonic state growth (npm run quality).

Repository

Code and docs: GitHub: mcp-reasoning-booster