Code Reasoning MCP Server
The Code Reasoning MCP Server enhances Claude's ability to solve complex programming tasks through structured thinking. It allows you to:
Break down complex problems into manageable, self-auditing thought steps
Explore and manage multiple solution paths with branching and merging capabilities
Revise and refine reasoning as understanding improves
Handle multi-step planning, design, debugging, and open-ended analysis
Question assumptions and acknowledge uncertainty during the reasoning process
Automatically stop after 20 thought steps to prevent infinite loops
Use ready-made prompts tailored for common development tasks
Evaluate prompt effectiveness with a built-in system
Support structured JSON input with parameters for thought management
Engage in private reasoning before delivering final responses
Allows installation from source via the GitHub repository, providing access to the complete codebase for advanced customization and development.
Enables installation and execution of the code reasoning MCP server through the npm package registry, with support for both global installation and direct execution via npx.
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., "@Code Reasoning MCP Server Use sequential thinking to reason about this."
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.
Code Reasoning MCP Server
A Model Context Protocol (MCP) server that enhances Claude's ability to solve complex programming tasks through structured, step-by-step thinking.
Quick Installation
Configure Claude Desktop by editing:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
{ "mcpServers": { "code-reasoning": { "command": "npx", "args": ["-y", "@mettamatt/code-reasoning"] } } }Configure VS Code:
{
"mcp": {
"servers": {
"code-reasoning": {
"command": "npx",
"args": ["-y", "@mettamatt/code-reasoning"]
}
}
}
}Related MCP server: Sequential Thinking MCP Server
Usage
To trigger this MCP, append this to your chat messages:
Use sequential thinking to reason about this.Use ready-to-go prompts that trigger Code-Reasoning:

Click the "+" icon in the Claude Desktop chat window, or in Claude Code type
/helpto see the specific commands.Select "Add from Code Reasoning" from the available tools
Choose a prompt template and fill in the required information
Submit the form to add the prompt to your chat message and hit return
See the Prompts Guide for details on using the prompt templates.
Command Line Options
--debug: Enable detailed logging--helpor-h: Show help information
Key Features
Programming Focus: Optimized for coding tasks and problem-solving
Structured Thinking: Break down complex problems into manageable steps
Thought Branching: Explore multiple solution paths in parallel
Thought Revision: Refine earlier reasoning as understanding improves
Safety Limits: Automatically stops after 20 thought steps to prevent loops
Ready-to-Use Prompts: Pre-defined templates for common development tasks
Documentation
Detailed documentation available in the docs directory:
Usage Examples: Examples of sequential thinking with the MCP server
Configuration Guide: All configuration options for the MCP server
Prompts Guide: Using and customizing prompts with the MCP server
Testing Framework: Testing information
Project Structure
├── index.ts # Entry point
├── src/ # Implementation source files
└── test/ # Placeholder for future test utilitiesLicense
This project is licensed under the MIT License. See the LICENSE file for details.
Available Tools
1 toolcode-reasoningA
🧠 Code Reasoning Tool (using sequential thinking)
Purpose → break complex problems into self-auditing, exploratory thought steps that can branch, revise, or back-track until a single, well-supported answer emerges.
WHEN TO CALL
• Multi-step planning, design, debugging, or open-ended analysis
• Whenever further private reasoning or hypothesis testing is required before replying to the user
ENCOURAGED PRACTICES
🔍 Question aggressively – ask "What am I missing?" after each step
🔄 Revise freely – mark is_revision=true even late in the chain
🌿 Branch often – explore plausible alternatives in parallel; you can merge or discard branches later
↩️ Back-track – if a path looks wrong, start a new branch from an earlier thought
❓ Admit uncertainty – explicitly note unknowns and schedule extra thoughts to resolve them
MUST DO
✅ Put every private reasoning step in thought
✅ Keep thought_number correct; update total_thoughts when scope changes
✅ Use is_revision & branch_from_thought/branch_id precisely
✅ Set next_thought_needed=false only when all open questions are resolved
✅ Abort and summarise if thought_number > 20
DO NOT
⛔️ Reveal the content of thought to the end-user
⛔️ Continue thinking once next_thought_needed=false
⛔️ Assume thoughts must proceed strictly linearly – branching is first-class
PARAMETER CHEAT-SHEET
• thought (string) – current reasoning step
• next_thought_needed (boolean) – request further thinking?
• thought_number (int ≥ 1) – 1-based counter
• total_thoughts (int ≥ 1) – mutable estimate
• is_revision, revises_thought (int) – mark corrections
• branch_from_thought, branch_id – manage alternative paths
• needs_more_thoughts (boolean) – optional hint that more thoughts may follow
All JSON keys must use lower_snake_case.
EXAMPLE ✔️
{
"thought": "List solution candidates and pick the most promising",
"thought_number": 1,
"total_thoughts": 4,
"next_thought_needed": true
}EXAMPLE ✔️ (branching late)
{
"thought": "Alternative approach: treat it as a graph-search problem",
"thought_number": 6,
"total_thoughts": 8,
"branch_from_thought": 3,
"branch_id": "B1",
"next_thought_needed": true
}Inputs: next_thought_needed (required), thought (required), thought_number (required), total_thoughts (required), +5 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only one tool, there is no possibility of confusion or overlap between tools. The single tool has a clearly defined purpose for code reasoning and problem-solving, so agents cannot misselect between multiple options.
Since there is only one tool named 'code-reasoning', naming consistency is inherently perfect. There are no other tools to compare against, so no inconsistencies can exist in the tool set.
A single tool for a 'Code Reasoning MCP Server' feels too minimal for the apparent scope. While the tool is feature-rich internally, the server's purpose suggests it should offer multiple specialized reasoning tools (e.g., for debugging, design, analysis) rather than one monolithic tool, making the count inappropriate.
The server claims to handle 'code reasoning' but provides only one general-purpose tool. This creates significant gaps: there are no specialized tools for different reasoning tasks (e.g., debugging vs. design), no tools for input/output handling, and no way to manage reasoning sessions independently, leading to potential agent failures in complex workflows.
Maintenance
Related MCP Connectors
Adaptive plan/build/review cycles for AI coding assistants, persisted across sessions.
GodPrompt MCP + Agent Skill for coding agents with TDD, debugging, verification, and task routing.
Source-checked CLI guides and model-aware planning for Claude Code, Codex, and Grok Build.
AI-native programming language and toolchain for accountable, verifiable agent-driven development.
Related MCP Servers
- AlicenseBqualityNot gradedmaintenanceProvides structured sequential thinking capabilities for AI assistants to break down complex problems into manageable steps, revise thoughts, and explore alternative reasoning paths.29-
- AlicenseAqualityDmaintenanceEnables structured, step-by-step problem-solving with dynamic revision and branching capabilities. Supports breaking down complex problems into manageable steps while allowing course corrections and alternative reasoning paths.1282,496 npm1MIT
- AlicenseAqualityCmaintenanceEnables structured step-by-step reasoning with branching, revisions, and self-critique to help break down complex problems into manageable steps with confidence tracking and thought history search.711 npm7MIT
- AlicenseAqualityDmaintenanceEnables structured, step-by-step problem-solving through dynamic thinking processes that can be revised, branched, and adjusted as understanding deepens. Supports breaking down complex problems into manageable steps with the ability to revise previous thoughts and explore alternative reasoning paths.1282,496 npmMIT
Appeared in Searches
- A server for learning and finding resources about SAS programming
- Tools and frameworks for thinking about software development
- A server for finding information about sequential thinking
- A tool for critical thinking and devil's advocate analysis of AI model plans
- Tools for slow thinking, step-back reasoning, and contextual memory capabilities