Dense Evolution — Claude Code MCP Server: Overview and Setup
Runs quantum circuit simulations, VQE routines, and molecular Hamiltonians through agent tooling. It handles circuits up to 28 qubits with disk-spill memory fallbacks.
claude mcp add --env DENSE_EVOLUTION_KERNEL_URL=<DENSE_EVOLUTION_KERNEL_URL> --transport stdio dense-evolution -- uvx dense-evolutionWhat Dense Evolution does
This server equips coding assistants with 21 quantum computing tools. Simulations run on statevector and MPS engines backed by JAX XLA JIT compilation. It translates OpenQASM routines and computes VQE ground states alongside QM/MM molecular forces. A 28-qubit circuit finishes in about 3 seconds.
Memory scaling relies on automated chunking and disk spilling. When large state vectors exceed available system RAM, data writes to storage rather than triggering an out-of-memory crash. Python 3.9 or newer is required. JAX comes installed as the foundational dependency.
macOS users on Apple Silicon face an upstream segfault inside Qiskit initialization. Because of that bug, switching to the PennyLane interop package prevents terminal crashes. You can also point the server to a local Composer kernel using DENSE_EVOLUTION_KERNEL_URL.
What it helps with
- simulate quantum circuits up to 28 qubits with JIT compilation
- parse and execute OpenQASM 2.0 and 3.0 circuit code
- calculate ground state energy using VQE algorithms
- apply noise models to simulated quantum statevectors
- evaluate molecular Hamiltonians and QM/MM forces
Example prompts for the agent
- Simulate the OpenQASM circuit in
circuit.qasmand output measurement probabilities. - Optimize the VQE energy function for my molecular Hamiltonian using
dense-evolution. - Apply a depolarizing noise model with probability 0.05 to the statevector.
How to install Dense Evolution
Platform CLI
claude mcp add --env DENSE_EVOLUTION_KERNEL_URL=<DENSE_EVOLUTION_KERNEL_URL> --transport stdio dense-evolution -- uvx dense-evolutionReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from dense-evolution <command>
Platform CLI
codex mcp add dense-evolution --env DENSE_EVOLUTION_KERNEL_URL=<DENSE_EVOLUTION_KERNEL_URL> -- uvx dense-evolutionReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from dense-evolution <command>
Config file
{
"mcpServers": {
"dense-evolution": {
"command": "uvx",
"args": [
"dense-evolution"
],
"env": {
"DENSE_EVOLUTION_KERNEL_URL": "<DENSE_EVOLUTION_KERNEL_URL>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from dense-evolution <command>
Config file
{
"servers": {
"dense-evolution": {
"type": "stdio",
"command": "uvx",
"args": [
"dense-evolution"
],
"env": {
"DENSE_EVOLUTION_KERNEL_URL": "<DENSE_EVOLUTION_KERNEL_URL>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from dense-evolution <command>
Platform CLI
gemini mcp add -e DENSE_EVOLUTION_KERNEL_URL=<DENSE_EVOLUTION_KERNEL_URL> dense-evolution uvx dense-evolutionReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from dense-evolution <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Dense Evolution
How to install Dense Evolution in Claude Code?
Run claude mcp add dense-evolution -- uvx dense-evolution in your terminal. This command launches the server directly via uvx.
What does Dense Evolution do?
It exposes 21 quantum computing tools to coding agents, including statevector simulation with JAX XLA compilation. It handles VQE evaluation, OpenQASM parsing, and memory chunking.
How does Dense Evolution prevent memory crashes?
When simulating up to 28 qubits, the engine partitions calculations into manageable chunks. If RAM fills up, it spills data to local storage to avoid out-of-memory errors.