deep-reasoning-mcp
Click on "Install 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., "@deep-reasoning-mcpAnalyze the payment service architecture."
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.
Deep Reasoning MCP Server
A Model Context Protocol server that turns Claude Code into a recursive analysis engine. Instead of linear reasoning, it builds explorable decision trees where every finding is traced as an IF/THEN chain, challenged with mitigations, and expanded into sub-findings at configurable depth.
Why
Claude Code is excellent at reasoning, but complex problems — architecture reviews, production debugging, incident triage — benefit from structured exploration. Without structure, analysis tends to be shallow: the first plausible explanation wins, edge cases are missed, and mitigations are proposed without examining the risks they introduce.
Deep Reasoning forces a disciplined process:
Scan — Map the problem space, identify 3-7 critical areas
Explore — For each finding, trace the full consequence chain. Challenge every mitigation: "Does this fix introduce new problems?" Discover sub-findings.
Synthesize — Produce a prioritized action plan, residual risks, and decision log
The result is an analysis that is reproducible, auditable, and significantly more thorough than a single-pass review.
How It Works
deep_scan Initial reconnaissance
| Identifies 3-7 key findings
v May ask clarifying questions
deep_explore Recursive what-if chains
/ | \ Loops until max depth
Branch Branch Branch Each gets mitigations + sub-findings
\ | /
v
deep_synthesize Action plan, residual risks,
decision log, quick winsSessions are persisted automatically. You can pause an analysis, close Claude Code, and resume days later with deep_resume.
Execution Modes
Mode | Cost | Requires | Best for |
orchestrator | Zero extra | Any Claude Code plan | Interactive analysis where Claude Code reasons through the prompts itself |
autonomous | API credits |
| Batch analysis, CI/CD pipelines, non-Claude MCP clients |
Auto-detection: if ANTHROPIC_API_KEY is set, defaults to autonomous. Otherwise, defaults to orchestrator. You can override per-call with the mode parameter.
Installation
From PyPI
pip install deep-reasoning-mcpFrom source
git clone https://github.com/yourusername/deep-reasoning-mcp.git
cd deep-reasoning-mcp
uv syncConfiguration
Claude Code
Add to ~/.claude/settings.json:
{
"mcpServers": {
"deep-reasoning": {
"command": "uv",
"args": [
"--directory",
"/path/to/deep-reasoning-mcp",
"run",
"deep-reasoning-mcp"
]
}
}
}If installed from PyPI:
{
"mcpServers": {
"deep-reasoning": {
"command": "deep-reasoning-mcp"
}
}
}With autonomous mode
{
"mcpServers": {
"deep-reasoning": {
"command": "deep-reasoning-mcp",
"env": {
"ANTHROPIC_API_KEY": "sk-ant-..."
}
}
}
}Environment Variables
Variable | Default | Description |
| (none) | Enables autonomous mode. Not needed for orchestrator. |
|
| Model for autonomous API calls |
|
| Max tokens per autonomous API call |
|
| Max concurrent API calls (autonomous) |
|
| Minimum delay between API calls in ms (autonomous) |
Tools
deep_scan — Initial Reconnaissance
Always call this first. Maps the problem space and identifies critical findings.
Parameter | Required | Description |
| Yes | The problem, code, or architecture to analyze |
| No |
|
| No | Additional codebase/stack context |
| No | Max exploration depth 1-5 (default: 3) |
| No | Output language code, e.g. |
| No |
|
| No | Model override for autonomous mode |
deep_explore — Recursive What-If Analysis
Explores specific branches of the reasoning tree. Call multiple times to deepen.
Parameter | Required | Description |
| Yes | Reasoning tree JSON from |
| No | Specific finding IDs to explore (default: all pending) |
| No | Answers to pending questions |
| No | Skip unanswered clarifications and proceed (default: |
| No |
|
| No | Model override for autonomous mode |
deep_synthesize — Final Report
Produces a prioritized action plan from the completed reasoning tree.
Parameter | Required | Description |
| Yes | Completed reasoning tree JSON |
| No | Report language (default: |
| No |
|
| No | Model override for autonomous mode |
Returns a Markdown report with: Executive Summary, Critical Findings, Action Plan, Quick Wins, Residual Risks, Decision Log.
deep_list_sessions — List Saved Sessions
Parameter | Required | Description |
| No | Filter by type |
| No | Filter by status ( |
| No | Max results 1-500 (default: 50) |
deep_resume — Resume a Session
Parameter | Required | Description |
| Yes | Session ID (supports partial matching) |
deep_save_session — Save Manually
Parameter | Required | Description |
| Yes | Reasoning tree to save |
| No | Custom name (auto-generated if omitted) |
deep_delete_session — Delete a Session
Parameter | Required | Description |
| Yes | Session ID to delete (exact match) |
Usage Examples
Architecture review
Analyze the payment callback flow for race conditions.
Stack: Django 4.2, PostgreSQL, Celery, RabbitMQ.
PSPs send HTTP POST callbacks that can arrive within milliseconds of each other.Production debugging
Payment callbacks timeout randomly after 30s under load.
Logs show the PSP responds in 2s. The issue started after last Thursday's deploy.
Stack: Django, Gunicorn (4 workers), PostgreSQL, Redis cache.Incident triage
Production: ticket validation failing for operator CTM for ~20 minutes.
No recent deploys. Health checks pass. Grafana shows normal latency
but elevated 500s on the /api/v2/validate/ endpoint.Brainstorming
We're evaluating migrating from Celery to Django-Q2 for async tasks.
We have ~50 Celery tasks, some with complex retry logic, beat scheduling,
and chain/chord patterns. What are the trade-offs?Session Persistence
Sessions are saved automatically to ~/.claude/deep-reasoning/sessions/. Each session is a self-contained JSON file that captures the full reasoning tree.
~/.claude/deep-reasoning/
sessions/
20250409_152030_debugging_payment_callback.json
20250408_091500_architecture_auth_flow.json
index.jsonWorkflow:
Start:
deep_scan(...)— session auto-savedPause: close Claude Code anytime
Resume:
deep_list_sessions()thendeep_resume({session_id: "payment_callback"})Complete:
deep_synthesize(...)— final report
Reasoning Tree Structure
The JSON tree passed between tools:
{
"id": "a1b2c3d4",
"version": "2.0",
"analysis_type": "architecture",
"max_depth": 3,
"current_depth": 2,
"status": "exploring",
"language": "en",
"description": "Original problem description",
"findings": [
{
"id": "e5f6g7h8",
"depth": 1,
"status": "complete",
"title": "Race condition on payment callback",
"severity": "critical",
"condition": "IF two callbacks arrive within 50ms for same transaction",
"consequence": "THEN duplicate transaction record created",
"mitigations": [
{
"action": "Add SELECT FOR UPDATE on transaction lookup",
"where": "PaymentCallbackView.process_callback()",
"risk_introduced": "Increased lock contention under high load",
"effort": "medium"
}
],
"sub_findings": [
{
"id": "i9j0k1l2",
"depth": 2,
"status": "pending",
"title": "Lock contention under peak load",
"severity": "high",
"condition": "IF >100 concurrent callbacks hit the same lock",
"consequence": "THEN connection pool exhaustion, cascading timeouts"
}
]
}
],
"metadata": {
"total_findings": 5,
"explored_findings": 3,
"critical_count": 1,
"high_count": 2
}
}Comparison with sequential-thinking
sequential-thinking | deep-reasoning | |
Structure | Linear chain | Recursive tree |
Depth | Single pass | Configurable 1-5 levels |
Persistence | None | Auto-saved sessions |
Best for | Quick orientation, simple problems | Thorough analysis, complex systems |
Output | Thought stream | Structured report with action plan |
They complement each other: sequential-thinking identifies the area, deep-reasoning explores it.
Project Structure
deep_reasoning_mcp/
__init__.py # Package entry point
server.py # MCP tool handlers
models.py # Pydantic models and enums
tree.py # Reasoning tree helpers
session.py # Session persistence
prompts.py # Analysis-type-specific prompts
llm.py # Anthropic API client with rate limitingAuthor
Maurizio Mocci — mauriziomocci@gmail.com
License
MIT
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mauriziomocci/deep-reasoning-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server