mcp reasoner

Local 2025-08-31 23:24:30 0

A systematic reasoning MCP server for Claude Desktop, featuring Beam Search and Monte Carlo Tree Search to facilitate complex problem-solving and decision-making processes.


A systematic reasoning MCP server implementation for Claude Desktop featuring both Beam Search and Monte Carlo Tree Search (MCTS) capabilities.

Features

  • Dual search strategies:
  • Beam search with configurable width
  • MCTS for complex decision spaces
  • Thought scoring and evaluation
  • Tree-based reasoning paths
  • Statistical analysis of reasoning process
  • MCP protocol compliance

Installation

git clone https://github.com/Jacck/mcp-reasoner.git
cd mcp-reasoner
npm install
npm run build

Configuration

Add to Claude Desktop config:

{
  "mcpServers": {
    "mcp-reasoner": {
      "command": "node",
      "args": ["path/to/mcp-reasoner/dist/index.js"],
    }
  }
}

Search Strategies

  • Maintains fixed-width set of most promising paths
  • Optimal for step-by-step reasoning
  • Best for: Mathematical problems, logical puzzles
  • Simulation-based exploration of decision space
  • Balances exploration and exploitation
  • Best for: Complex problems with uncertain outcomes

Note: Monte Carlo Tree Search allowed Claude to perform really well on the Arc AGI benchmark (scored 6/10 on the public test), whereas beam search yielded a (3/10) on the same puzzles. For super complex tasks, you'd want to direct Claude to utilize the MCTS strategy over the beam search.

Algorithm Details

  1. Search Strategy Selection
  2. Beam Search: Evaluates and ranks multiple solution paths
  3. MCTS: Uses UCT for node selection and random rollouts
  4. Thought Scoring Based On:
  5. Detail level
  6. Mathematical expressions
  7. Logical connectors
  8. Parent-child relationship strength
  9. Process Management
  10. Tree-based state tracking
  11. Statistical analysis of reasoning
  12. Progress monitoring

Use Cases

  • Mathematical problems
  • Logical puzzles
  • Step-by-step analysis
  • Complex problem decomposition
  • Decision tree exploration
  • Strategy optimization

Future Implementations

  • Implement New Algorithms
  • Iterative Deepening Depth-First Search (IDDFS)
  • Alpha-Beta Pruning

License

This project is licensed under the MIT License - see the LICENSE file for details.

[
  {
    "description": "Advanced reasoning tool with multiple strategies including Beam Search and Monte Carlo Tree Search",
    "inputSchema": {
      "properties": {
        "nextThoughtNeeded": {
          "description": "Whether another step is needed",
          "type": "boolean"
        },
        "strategyType": {
          "description": "Reasoning strategy to use (beam_search or mcts)",
          "enum": [
            "beam_search",
            "mcts"
          ],
          "type": "string"
        },
        "thought": {
          "description": "Current reasoning step",
          "type": "string"
        },
        "thoughtNumber": {
          "description": "Current step number",
          "minimum": 1,
          "type": "integer"
        },
        "totalThoughts": {
          "description": "Total expected steps",
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "thought",
        "thoughtNumber",
        "totalThoughts",
        "nextThoughtNeeded"
      ],
      "type": "object"
    },
    "name": "mcp-reasoner"
  }
]