Code Reasoning MCP Server
An enhanced fork of the Sequential Thinking MCP server, optimized for programming tasks and complex problem-solving through a structured thinking process.
Quick Start
Why This Fork?
This fork was created to enhance the original Sequential Thinking server with several key improvements:
- Programming Focus: Optimized for coding tasks and programming problem-solving
- Improved Parameter Naming: Consistent snake_case naming convention (e.g.,
thought_number
instead ofthoughtNumber
) - Enhanced Prompting: Clearer, more structured guidance in the tool description
- Enforcement of Best Practices: Automatically aborts chains after 20 steps to prevent excessive recursion
- Local Development: Designed to work seamlessly with Claude Desktop for programming tasks
Key Differences from Original
Feature | Original | Code Reasoning |
---|---|---|
Parameter Style | camelCase | snake_case |
Max Steps | Not enforced | Enforced (max 20) |
Tool Description | Basic | Enhanced markdown with examples |
Primary Focus | General problem-solving | Programming/code tasks |
Error Handling | Basic | Improved with status codes |
Enhanced Prompt
This fork features a significantly improved prompt that provides clearer guidance and examples:
EXAMPLE ✔️ (branching late)
Features
- Break down complex programming problems into manageable steps
- Revise and refine thoughts as understanding deepens
- Branch into alternative paths of reasoning
- Adjust the total number of thoughts dynamically
- Generate and verify solution hypotheses
- Enforce a maximum of 20 thought steps to prevent excessive reasoning
Tool
sequentialthinking
Facilitates a detailed, step-by-step thinking process for programming and technical problem-solving.
Inputs:
thought
(string): The current thinking stepnext_thought_needed
(boolean): Whether another thought step is neededthought_number
(integer): Current thought numbertotal_thoughts
(integer): Estimated total thoughts neededis_revision
(boolean, optional): Whether this revises previous thinkingrevises_thought
(integer, optional): Which thought is being reconsideredbranch_from_thought
(integer, optional): Branching point thought numberbranch_id
(string, optional): Branch identifierneeds_more_thoughts
(boolean, optional): If more thoughts are needed
Important: All parameters must use snake_case format (e.g.,
thought_number
, notthoughtNumber
). The server will reject requests using camelCase parameters.
Usage
The Code Reasoning tool is designed for:
- Breaking down complex programming problems into steps
- Algorithm design and optimization
- Debugging and error analysis
- Code architecture planning
- Technical decision-making when multiple approaches exist
- Understanding complex codebases
Configuration
Usage with Claude Desktop
Add this to your claude_desktop_config.json
:
Location of Claude Desktop config file on macOS:
Usage with VS Code
For manual installation, add the following JSON block to your User Settings (JSON) file in VS Code. You can do this by pressing Ctrl + Shift + P
and typing Preferences: Open Settings (JSON)
.
Optionally, you can add it to a file called .vscode/mcp.json
in your workspace. This will allow you to share the configuration with others.
Installation
Troubleshooting
TypeScript Configuration Error
If you encounter an error like:
This is because the original tsconfig.json extends a parent configuration. Update your tsconfig.json to be self-contained:
Parameter Naming Errors
If Claude receives errors from the server, ensure all parameters use snake_case:
- Use
thought_number
instead ofthoughtNumber
- Use
next_thought_needed
instead ofnextThoughtNeeded
- Use
total_thoughts
instead oftotalThoughts
Keeping Up-to-Date with Upstream
This is a fork of the original Sequential Thinking server. To incorporate updates from the original while maintaining our customizations:
- Check for updates to the original repository:Copy
- Compare the changes to our fork:Copy
- Selectively incorporate updates:
- Update dependencies to match the original (especially important for SDK updates)
- Add new features or bug fixes while maintaining our snake_case naming conventions
- Update the tool description if improvements are made to the original
- Rebuild and reinstall after updating:Copy
License
This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
This server cannot be installed
An enhanced sequential thinking tool optimized for programming tasks that helps break down complex coding problems into structured, self-auditing thought steps with branching and revision capabilities.