Skip to main content

Physics and quantum computing MCP server - 16 tools for physics simulations

Project description

ReasonForge Physics

Classical mechanics, electromagnetism, and quantum computing - 16 tools

An MCP (Model Context Protocol) server that provides Claude with physics simulation and quantum computing capabilities using SymPy's symbolic engine.

Beta Status: This package is functional but still undergoing testing. Some edge cases may not be fully covered. Please report issues on GitHub.

Capabilities

  • Classical Mechanics - Lagrangian and Hamiltonian formulations, Noether's theorem
  • Electromagnetism - Maxwell's equations in differential form
  • Special Relativity - Lorentz transformations and relativistic dynamics
  • Quantum Computing - Quantum states, gates, circuits, and measurements

Installation

pip install reasonforge-physics

Or install from source:

git clone https://github.com/foxintheloop/ReasonForge.git
cd ReasonForge
pip install -e packages/reasonforge -e packages/reasonforge-physics

Claude Desktop Configuration

Add to your Claude Desktop config file:

Windows: %APPDATA%\Claude\claude_desktop_config.json macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "reasonforge-physics": {
      "command": "python",
      "args": ["-m", "reasonforge_physics"]
    }
  }
}

Tools

Classical Mechanics (3 tools)

Tool Description Example Use
lagrangian_mechanics Derive equations of motion from Lagrangian Pendulum, double pendulum
hamiltonian_mechanics Hamiltonian formulation and phase space Canonical transformations
noether_theorem Find conserved quantities from symmetries Energy, momentum conservation

Electromagnetism & Relativity (2 tools)

Tool Description Example Use
maxwell_equations Work with Maxwell's equations Field calculations
special_relativity Lorentz transformations and 4-vectors Time dilation, length contraction

Quantum Computing (10 tools)

Tool Description Example Use
create_quantum_state Create quantum state vectors |0>, |1>, |+>, |-> states
quantum_gate_operations Apply quantum gates X, Y, Z, H, CNOT, etc.
tensor_product_states Compose multi-qubit states |00>, |01>, Bell states
quantum_entanglement_measure Measure entanglement Concurrence, entanglement entropy
quantum_circuit_symbolic Build symbolic quantum circuits Gate sequences
quantum_measurement Perform measurements Projective measurements
quantum_fidelity Calculate state fidelity Compare quantum states
pauli_matrices Work with Pauli operators Spin-1/2 systems
commutator_anticommutator Compute [A,B] and {A,B} Operator algebra
quantum_evolution Time evolution of states Schrodinger dynamics

Optimization (1 tool)

Tool Description Example Use
symbolic_optimization_setup Set up optimization problems Variational methods

Example Usage

Once configured, you can ask Claude:

Classical Mechanics:

  • "Derive the equations of motion for a simple pendulum using Lagrangian mechanics"
  • "Find the Hamiltonian for a harmonic oscillator"
  • "What quantity is conserved due to time translation symmetry?"

Electromagnetism:

  • "Write out Maxwell's equations in differential form"
  • "Calculate the Lorentz transformation for velocity v = 0.8c"

Quantum Computing:

  • "Create the Bell state (|00> + |11>)/sqrt(2)"
  • "Apply a Hadamard gate followed by CNOT to |00>"
  • "Calculate the entanglement entropy of this two-qubit state"
  • "What is the fidelity between |+> and |0>?"

Dependencies

  • Python >= 3.10
  • mcp >= 1.0.0
  • sympy >= 1.12
  • numpy >= 1.24.0
  • reasonforge (core library)

Running Tests

pytest packages/reasonforge-physics/tests/ -v

License

MIT License - See LICENSE for details.

Related Packages

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reasonforge_physics-0.1.1.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reasonforge_physics-0.1.1-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file reasonforge_physics-0.1.1.tar.gz.

File metadata

  • Download URL: reasonforge_physics-0.1.1.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for reasonforge_physics-0.1.1.tar.gz
Algorithm Hash digest
SHA256 344504ea18a0b3d48136c5b9f1d28f0c097881e25538ee74c78bf88e4fb2d937
MD5 248e0cbf7fe686531bd2b76b5e61f84b
BLAKE2b-256 77ada2d949f3cfb2b0b0ada456ba87a2125c953691ade099d1ed9c6cbbed6a5c

See more details on using hashes here.

File details

Details for the file reasonforge_physics-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for reasonforge_physics-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d1e2a3bf138c56cabb6b783a69b26fd65816f5b582e6b0f87c7aa86fdb067889
MD5 5d5ed24b53c1e3692825b3bccea4ab8a
BLAKE2b-256 d9ad8c4d6b00de399d335ea52b07b2fe0f8b6fc79ead0db8502f042c645a44dd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page