home / mcp / code reasoning mcp server
A code reasoning MCP server, a fork of sequential-thinking
Configuration
View docs{
"mcpServers": {
"mettamatt-code-reasoning": {
"command": "npx",
"args": [
"-y",
"@mettamatt/code-reasoning"
]
}
}
}You can run the Code Reasoning MCP Server locally to enable structured, step-by-step reasoning for coding tasks. It integrates with your MCP client to provide disciplined, parallel-thinking prompts and guarded execution, helping you reason through complex programming challenges more systematically.
To use the Code Reasoning MCP Server, connect it to your MCP client and enable the code-focused reasoning flow. You trigger the server by instructing your chat client to engage sequential thinking for problems that require careful planning and multiple solution paths. Use the provided prompts to guide the model through structured thinking, branching, and revision as the problem unfolds.
How you interact with the MCP client matters for best results. Add the Code Reasoning tool from the available tools in your chat interface, select a template that fits your task (for example, a template aimed at step-by-step problem solving or iterative refinement), fill in any required fields, and submit your prompt. The server’s design supports breaking down problems into clear steps, exploring alternative approaches, and refining earlier reasoning as needed.
Prerequisites you need before installation: you should have Node.js and npm installed on your machine. Node provides the npx utility used to run MCP packages without a global install.
Step 1: Create the MCP server configuration for your editor and chat client.
Step 2: Add the Code Reasoning MCP server configuration to Claude Desktop by placing the following JSON in your Claude Desktop configuration file.
Step 3: Add the Code Reasoning MCP server configuration to VS Code by placing the following JSON in your editor settings.
{
"mcpServers": {
"code-reasoning": {
"command": "npx",
"args": ["-y", "@mettamatt/code-reasoning"]
}
}
}Command line options you can use while running the MCP server include enabling verbose debug logs with --debug and requesting help with --help or -h. These can help you diagnose setup or runtime issues.
Key features of the Code Reasoning MCP Server include a programming-focused workflow, structured thinking that decomposes problems into manageable steps, thought branching to explore multiple solution paths, and thought revision to refine understanding as you progress. A safety limit prevents endless looping by stopping after 20 thought steps.
If you encounter connection issues, verify that the MCP server is reachable through your client and that the exact command and arguments are used in your client configuration. Ensure you are using the proper MCP server name as configured in your editor and chat client.
The project includes an entry point and source code organized under index.ts and src/, with tests placeholder under test/. It is released under the MIT License.
Prepare ready-to-use prompts that trigger Code Reasoning in your chat client. You can add a prompt template and fill in required fields to tailor the reasoning flow to your coding task.
- Sequential Thinking: Reason through steps in a logical order from problem statement to solution outline. - Structured Thinking: Break complex tasks into smaller, verifiable steps. - Thought Branching: Explore multiple solution paths concurrently to compare trade-offs. - Thought Revision: Update earlier reasoning as new information becomes available. - Safety Limits: Automatic stopping after 20 thought steps to prevent loops.
Reason through steps in a defined sequence, ensuring each step logically follows from the previous one.
Decompose complex coding tasks into smaller, verifiable actions to manage scope and risk.
Explore multiple solution paths in parallel to compare approaches and outcomes.
Refine earlier conclusions as new information or constraints emerge during the reasoning process.
Automatically stop after a fixed number of steps to prevent endless loops and runaway reasoning.