🧠 ReasonKit Think MCP

Advanced Reasoning MCP for AI Coding Agents
CoT + ToT + GoT + Verification + Governance Routing

Rust 1.95+ MCP rmcp 1.6 license Apache-2.0 status v1 + v2 live CI

GitHub · Crates.io · reasonkit.sh


🎯 Why ReasonKit Think?

Most AI agents today either reason shallowly and move too fast (causing costly mistakes) or reason deeply but become hard to debug, blindly trusting their own hallucinations.

ReasonKit Think bridges this gap. It provides a structured, auditable, and mathematically grounded reasoning engine directly to your favorite MCP-compatible AI clients (Cursor, Claude Code, Gemini CLI, Copilot).

We transform abstract AI "thinking" into concrete, inspectable, and governable Protocols.

The ReasonKit Advantage:

  • Anti-Hallucination: Strict evidence-based verification gates. Claims without proof are marked DATA_DEFICIT and fail closed.
  • Traceable Auditability: Every thought, branch, and decision is logged in a stateful DAG (Directed Acyclic Graph) for post-mortem analysis.
  • Dynamic Paradigms: Seamlessly switch between Chain-of-Thought (CoT), Tree-of-Thoughts (ToT), and Graph-of-Thoughts (GoT) on the fly.
  • Skeleton-of-Thought Phases: For multi-aspect problems, route into outline-first skeleton branches, elaborate them independently, then merge through GoT checkpoints.
  • Honest Provider Boundaries: Heuristic outputs are labeled as heuristic; model-backed and retrieval-backed analysis fail closed until real provider bindings are configured and implemented.
  • State Survival & Observability: Local snapshots survive process restarts, and telemetry resources expose tool latency, verification outcomes, pruning, and graph-depth metrics.
  • Assumption-Led Reasoning: Critical premises are tracked in an assumption ledger and can block convergence until resolved.
  • Replayable Convergence: Agents can replay a session timeline, run checkpoints, and converge only after quality, evidence, and assumption gates pass.

🧠 Thinking Modes

ReasonKit Think now uses accessible user-facing Thinking Modes. The academic method names are still supported internally for compatibility, but most users should start with these names:

Mode Internal behavior Cost Best for Aliases
Auto Hybrid router / adaptive mode selector Medium Default entry point for most work Autopilot, Guided, Smart, Adaptive, Flow, Default
Quick CoT-style concise reasoning audit Low Fast first pass, simple debugging, concise review Sprint, Simple, Linear, First Pass, Baseline, Trace
Explore Tree-of-Thoughts branching search High Options, hypotheses, tradeoffs, comparisons Branch, Diverse, Brainstorm, Compare, Scenario, Fork
Map Graph-of-Thoughts synthesis High Dependencies, conflicts, refinements, merged plans Architect, Synthesis, Weave, Network, Merge, System
Sketch Skeleton-of-Thought outline-first expansion Medium Multi-section answers, plans, or independent lenses Outline, Blueprint, Scaffold, Skeleton, Draft, Frame
Test CoVe + ReasonKit validation pipeline Medium to high Verification, release gates, go/no-go decisions Verify, Audit, Proof, Guard, Red Team, Check

Auto is the default. Tell ReasonKit what you need; it chooses the right reasoning path and returns an auditable result.

Recommended first tool:

{
  "tool": "run_thinking_mode",
  "arguments": {
    "mode": "Auto",
    "intent": "Compare the migration options, verify risky claims, and return an auditable recommendation."
  }
}

Test means claim verification and governance; it does not run your project test suite.

Clients can discover the full machine-readable mode contract through the native MCP resource reasoning://thinking-modes, including aliases, internal method mapping, estimated cost, required behavior, safety rules, and recommended tools.

Example Prompt: "Use Auto mode with reasonkit-think. Compare the migration options, verify risky claims, and return an auditable recommendation with evidence gaps."

The compatibility mapping is straightforward:

  • Quick maps to cot-style linear audit output.
  • Explore maps to tot branching, scoring, and pruning.
  • Map maps to got graph dependencies and synthesis.
  • Sketch uses a got session plus Skeleton-of-Thought tools.
  • Test uses the ReasonKit verification and governance pipeline.

🛡️ The Verification & Governance Engine

Reasoning is useless if it's based on fabricated facts. ReasonKit Think enforces CoVe (Chain of Verification) and Triangulation.

When you trigger a deep deliberation, the server automatically builds a Verification Matrix:

  1. Extracts Claims: Pulls out factual or architectural assertions from the AI's thoughts.
  2. Evaluates Evidence: Checks if claims are supported by Tier 1 sources (docs, codebase, verified logs).
  3. Fails Closed: If a critical claim has conflicting sources (SOURCE_CONFLICT) or missing data (DATA_DEFICIT), the governance route automatically returns GATHER_MORE_EVIDENCE instead of outputting unsafe code.

🚀 Quickstart & Installation

Prerequisites: Rust 1.95+ and an rmcp-compatible MCP host.

cargo install reasonkit-think-mcp

Build from Source

git clone https://github.com/reasonkit/reasonkit-think.git
cd reasonkit-think
export CARGO_TARGET_DIR="${CARGO_TARGET_DIR:-$PWD/target}"
cargo build --release

To run a quick health check of the server and its tool surface:

./scripts/smoke_test.py

To verify the release binary, protocol handshake, schema compatibility, and local Copilot/Cursor/Claude config paths:

./scripts/client_compat_check.py

Docker

The image packages the stdio MCP server for supervised MCP hosts:

docker build -t reasonkit-think-mcp .
docker run --rm -i reasonkit-think-mcp

⚙️ MCP Client Configuration

Add reasonkit-think-mcp to your favorite AI IDE or CLI. Ensure you provide the ABSOLUTE PATH to the release binary. If you built from source with the default command above, that path is usually:

/path/to/reasonkit-think/target/release/reasonkit-think-mcp
Cursor & Cursor Agent

Add under mcpServers in ~/.cursor/mcp.json or .cursor/mcp.json:

{
  "mcpServers": {
    "reasonkit-think": {
      "type": "stdio",
      "command": "/ABSOLUTE/PATH/TO/reasonkit-think-mcp",
      "args": [],
      "env": { "TMPDIR": "/tmp" }
    }
  }
}

Reload MCP from Cursor settings.

Claude Code

Add to your ~/.claude.json:

"reasonkit-think": {
  "type": "stdio",
  "command": "/ABSOLUTE/PATH/TO/reasonkit-think-mcp",
  "args": [],
  "env": { "TMPDIR": "/tmp" }
}

Restart your Claude Code session.

Other Clients (Gemini CLI, Codex, Copilot, OpenCode)

For other clients, configure a standard stdio MCP server pointing to the absolute path of reasonkit-think-mcp. See the docs/clients/ folder for comprehensive setup guides for all major AI coding platforms.

Reusable JSON snippets are available in examples/client-configs/.

If a client reports ENOENT or "failed to connect", rebuild the release binary and rerun the compatibility check:

export CARGO_TARGET_DIR="$PWD/target"
cargo build --release
./scripts/client_compat_check.py

🗣️ Natural Wording Triggers

You do not have to remember exact MCP tool names. run_thinking_mode, reasoning_intent_router, and reasoning_autopilot understand both the new mode names and legacy method names:

  • Auto: "auto", "autopilot", "guided", "choose for me", "default"
  • Quick: "quick", "simple", "sprint", "linear reasoning", "first pass"
  • Explore: "explore options", "branch", "brainstorm", "compare", "fork"
  • Map: "map", "architect", "synthesis", "merge paths", "network"
  • Sketch: "sketch", "outline first", "blueprint", "scaffold", "skeleton"
  • Test: "test", "verify", "audit", "proof", "red team", "check"
  • Support layer: "assumption", "checkpoint", "quality gate", "replay", "memory snapshot", "go/no-go"

Use docs/README.md for the full vocabulary, mode workflows, and tool map.


Production Contract

ReasonKit Think is explicit about what it does and does not do:

  • heuristic outputs are deterministic structural proxies with provenance and limitations.
  • model_backed and retrieval provider modes are exposed as fail-closed boundaries in reasoning://config/providers; the server does not manufacture semantic confidence when no real provider binding exists.
  • record_assumption and set_assumption_status expose a first-class assumption ledger; unresolved high/critical assumptions gate consensus and convergence.
  • run_reasoning_checkpoint, replay_reasoning_session, and converge_reasoning make readiness, replayability, and final synthesis explicit MCP operations.
  • apply_reasoning_pattern gives agents reusable reasoning modes such as debugging, scientific method, systems mapping, dialectical synthesis, and code reasoning.
  • start_skeleton_of_thought and run_skeleton_elaboration implement a routed SoT workflow. Unsuitable tasks are blocked by default, heuristic mode creates scaffolds/prompt packs only, and model-backed mode fails closed until a real provider exists.
  • plan_tool_sequence returns stage-aware tool call templates; it plans but never executes tools on behalf of the caller.
  • export_memory_snapshot returns a memory-ready payload. External sinks are explicit boundary_unavailable responses unless a caller persists the payload separately.
  • run_thinking_mode is the primary operational mode runner for Auto, Quick, Explore, Map, Sketch, and Test.
  • reasoning://thinking-modes exposes the public Thinking Mode contract used by router/autopilot/run outputs.
  • Mutable tools persist state to ~/.local/share/sh.reasonkit.think/state.json after releasing store locks.
  • reasoning://telemetry/summary reports in-process counters for MCP clients, alongside OpenTelemetry metric instruments.
  • The active transport is stdio; reasoning://config/transports reports streamable HTTP as not active in this build.