MCP Reasoner MCP server

Implements beam search and thought evaluation for structured problem-solving, enabling exploration of multiple solution paths in complex reasoning tasks.
Back to servers
Provider
Jacck
Release date
Dec 20, 2024
Language
TypeScript
Stats
189 stars

The MCP Reasoner serves as a reasoning enhancement for Claude Desktop, offering both Beam Search and Monte Carlo Tree Search (MCTS) capabilities. It significantly improves Claude's complex problem-solving abilities by implementing different search strategies and tracking reasoning paths.

Installation

To install the MCP Reasoner, follow these steps:

# Clone the repository
git clone https://github.com/frgmt0/mcp-reasoner.git 
# OR clone the original
git clone https://github.com/Jacck/mcp-reasoner.git

# Navigate to the project directory
cd mcp-reasoner

# Install dependencies and build
npm install
npm run build

Configuration

To integrate MCP Reasoner with Claude Desktop, add the following to your Claude Desktop configuration:

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

Be sure to replace "path/to/mcp-reasoner" with the actual path where you cloned the repository.

Features

Search Strategies

The MCP Reasoner provides two main search strategies:

  • Beam Search: Efficient for straightforward problems
  • Monte Carlo Tree Search (MCTS): Better suited for complex problems

Available Reasoning Algorithms

The reasoner offers several algorithm options:

  • Standard MCTS

  • mcts-002-alpha:

    • Uses A* Search Method with a Policy Simulation Layer
    • Includes alpha implementations of Adaptive Exploration Simulator & Outcome Based Reasoning Simulator
  • mcts-002alt-alpha:

    • Uses Bidirectional Search with a Policy Simulation Layer
    • Includes the same alpha simulators as mcts-002-alpha

Parameter Control

As of version 1.1.0, you can control search parameters:

  • beamWidth: Adjust how many paths Claude tracks (range: 1-10)
  • numSimulations: Fine-tune MCTS simulation count (range: 1-150)

Usage

When using Claude Desktop with the MCP Reasoner configured, you can specify which reasoning algorithm to use and adjust parameters directly in your queries.

Example Usage

For basic beam search:

Use beam search to solve this optimization problem...

For MCTS with custom parameters:

Use MCTS with beamWidth=5 and numSimulations=50 to analyze this chess position...

For experimental algorithms:

Use the mcts-002-alpha reasoning algorithm to solve this complex problem...

The MCP Reasoner will track different reasoning paths, analyze their effectiveness, and present Claude's solution process in a more structured and effective manner.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later