The MCTS MCP Server provides an Advanced Bayesian Monte Carlo Tree Search engine for AI-assisted analysis and reasoning. It uses probabilistic algorithms to systematically explore different angles and interpretations of topics or questions, producing insightful analyses that evolve through multiple iterations.
To install the MCTS MCP Server, follow these steps:
./setup.sh
This script will:
If you prefer manual setup, use:
# Install UV if not already installed
curl -fsSL https://astral.sh/uv/install.sh | bash
# Create and activate a virtual environment
uv venv .venv
source .venv/bin/activate
# Install dependencies
uv pip install -r requirements.txt
To integrate with Claude Desktop:
claude_desktop_config.json
from the repository~/.claude/claude_desktop_config.json
)Example configuration:
{
"mcpServers": {
"MCTSServer": {
"command": "uv",
"args": [
"run",
"--directory", "/home/ty/Repositories/ai_workspace/mcts-mcp-server/src/mcts_mcp_server",
"server.py"
],
"env": {
"PYTHONPATH": "/home/ty/Repositories/ai_workspace/mcts-mcp-server"
}
}
}
}
Important: Update the paths to match the location of the MCTS MCP server on your system.
The server provides several key functions to use in your prompts:
list_ollama_models() # Check what models are available
set_ollama_model("cogito:latest") # Set the model you want to use
initialize_mcts(question="Your question here", chat_id="unique_id") # Initialize analysis
run_mcts(iterations=1, simulations_per_iteration=5) # Run the analysis
Note: After running run_mcts()
, the process can take several minutes to hours to complete. During this time, you can discuss ideas or ask questions while waiting for the process to finish.
Once the MCTS process is complete, you can use these tools to analyze the results:
# Get a summary of MCTS results
generate_synthesis()
# View current configuration
get_config()
# Update configuration parameters
update_config()
# Check current status
get_mcts_status()
# List recent MCTS runs
list_mcts_runs(count=10, model=None)
# Get details about a specific run
get_mcts_run_details('cogito:latest_1745979984')
# Extract key insights
get_mcts_insights(run_id='cogito:latest_1745979984')
# Generate a comprehensive report
get_mcts_report(run_id='cogito:latest_1745979984', format='markdown')
# Compare multiple runs
compare_mcts_runs(['cogito:latest_1745979984', 'qwen3:0.6b_1745979584'])
The server supports integration with Ollama models:
# List available models
list_ollama_models()
# Set a specific model
set_ollama_model("qwen3:0.6b")
# Compare performance across models
run_model_comparison(question="Your question", iterations=2)
You can adjust the MCTS algorithm behavior by updating its configuration:
max_iterations
: Number of MCTS iterations to runsimulations_per_iteration
: Number of simulations per iterationexploration_weight
: Controls exploration vs. exploitation balanceearly_stopping
: Whether to stop early if a high-quality solution is founduse_bayesian_evaluation
: Whether to use Bayesian evaluation for node scoresuse_thompson_sampling
: Whether to use Thompson sampling for selectionInitialize a new analysis:
initialize_mcts(question="What are the implications of artificial intelligence on human creativity?", chat_id="creativity_analysis")
Run the MCTS process:
run_mcts(iterations=3, simulations_per_iteration=10)
Generate a summary of findings:
generate_synthesis()
Extract insights:
get_mcts_insights(run_id='your_run_id')
Generate a detailed report:
get_mcts_report(run_id='your_run_id', format='markdown')
The MCTS server stores all results automatically in /home/ty/Repositories/ai_workspace/mcts-mcp-server/results
, organized by model name and run ID.
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.
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"
]
}
}
}
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.
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.