The useful shape here is that a problem is data: a population size, a chromosome size, a generation count and a fitness function, all in JSON. That makes it easy to hand the assistant a variation and ask it to compare runs. Start from one of the bundled samples and edit it — the travelling-salesman file shows exactly which keys the solver expects.
A Python MCP server that solves maximization problems with a genetic algorithm, driven either from an MCP client or straight from the command line with a JSON problem file.
- Maximization problems solved by genetic algorithm, defined as JSON rather than code
- A problem definition that takes `population_size`, `chromosome_size`, `generations` and a fitness-function block
- Sample problems that ship with the repo, including `traveling_salesman` with its cities and distance matrix
- A command-line path — run the algorithm against a problem file directly — so you can check a definition before wiring the server into a client
Uv. Run `uv run main.py` from the genetic-mcp-server directory, and point your client at that directory in the mcpServers block.
