genetic_mcp
An MCP server to solve classic optimization problems using a Genetic Algorithm
Documentation
genetic_mcp
An MCP server to solve maximization problems using Genetic Algorithm.
Table of Contents
1. How it works
2. How to run
3. How to add the MCP server to Cursor
How it works
...
How to run
Genetic Algorithm
There's already a sample problem loaded in `genetic-mcp-server/genetic_algorithm/main.py`. To run it, run the following commands:
cd genetic-mcp-server/genetic_algorithm
python3 main.pyThere are also sample problems in `genetic-mcp-server/genetic_algorithm/samples`. To run them, simply replace `` below with the name of the actual problem you want to run:
cd genetic-mcp-server/genetic_algorithm
python3 main.py samples/.jsonIf you want to run your own problems, you have 2 options:
1. Simply modify the following section of `genetic-mcp-server/genetic_algorithm/main.py`:
tsp_data = {
"options": {
"population_size": 100,
"chromosome_size": 4,
"fitness_function": {
"cities": ["A", "B", "C", "D"],
"distance_matrix": [
[0, 10, 15, 20],
[10, 0, 35, 25],
[15, 35, 0, 30],
[20, 25, 30, 0]
]
}
},
"problem": "traveling_salesman",
"generations": 50
}2. Create a .json file in the same style of the ones in `genetic-mcp-server/genetic_algorithm/samples` and replace `` with the path to your file:
cd genetic-mcp-server/genetic_algorithm
python3MCP Server
If you want to run the MCP server, run:
cd genetic-mcp-server
uv run main.pyHow to add the MCP server to Cursor
Replace `` in the following JSON with your actual path:
{
"mcpServers": {
"genetic_algorithm_mcp_server": {
"command": "uv",
"args": [
"--directory",
,
"run",
"main.py"
]
}
}
}Frequently asked questions
What is genetic_mcp?
genetic_mcp is An MCP server to solve classic optimization problems using a Genetic Algorithm
How do I install genetic_mcp?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is genetic_mcp open source?
Yes — it is hosted on GitHub at https://github.com/jbmattos03/genetic_mcp.
Related MCP tools
Cognee is the open-source AI memory platform for agents. Give your AI agents persistent long-term memory across sessions with a self-hosted knowledge graph engine.
Automate browser based workflows with AI
Hindsight: Agent Memory That Learns
A privacy-first app that strips AI watermarks from content you own.
Agent framework and applications built upon Qwen>=3.0, featuring Function Calling, MCP, Code Interpreter, RAG, Chrome extension, etc.
The power of Claude Code / GeminiCLI / CodexCLI + [Gemini / OpenAI / OpenRouter / Azure / Grok / Ollama / Custom Model / All Of The Above] working as one.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP