Skip to main content

Vector/tensor calculus and visualization MCP server - 15 tools for geometry

Project description

ReasonForge Geometry

Vector/tensor calculus, general relativity, and visualization - 15 tools

An MCP (Model Context Protocol) server that provides Claude with geometric and tensor calculus 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

  • Vector Calculus - Gradient, divergence, curl in arbitrary coordinate systems
  • Tensor Calculus - Christoffel symbols, Riemann and Ricci tensors, Einstein tensor
  • General Relativity - Predefined metrics (Schwarzschild, Kerr, FLRW, etc.)
  • Unit Conversions - Symbolic unit handling and conversions
  • Visualization - 2D/3D plots, contour plots, vector field visualization

Installation

pip install reasonforge-geometry

Or install from source:

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

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-geometry": {
      "command": "python",
      "args": ["-m", "reasonforge_geometry"]
    }
  }
}

Tools

Vector Calculus (5 tools)

Tool Description Example Use
create_coordinate_system Create coordinate system (Cartesian, spherical, cylindrical) Set up spherical coordinates
create_vector_field Define symbolic vector fields F = xi + yj + z*k
calculate_curl Compute curl of vector field curl(F)
calculate_divergence Compute divergence of vector field div(F)
calculate_gradient Compute gradient of scalar field grad(phi)

Tensor Calculus & General Relativity (5 tools)

Tool Description Example Use
create_predefined_metric Load standard spacetime metrics Schwarzschild, Kerr, FLRW
search_predefined_metrics Search available metric library Find all black hole metrics
calculate_tensor Compute Christoffel, Riemann, Ricci, Einstein tensors Curvature calculations
create_custom_metric Define custom metric tensors Custom spacetime geometry
print_latex_tensor LaTeX output for tensors Publication-ready equations

Unit Handling (2 tools)

Tool Description Example Use
convert_to_units Convert between unit systems meters to feet
quantity_simplify_units Simplify compound units kg*m/s^2 to N

Visualization (3 tools)

Tool Description Example Use
plot_symbolic_function Plot 2D symbolic functions Graph sin(x)*e^(-x)
contour_plot_symbolic Generate contour plots Level curves of x^2 + y^2
vector_field_plot Visualize vector fields Flow field visualization

Example Usage

Once configured, you can ask Claude:

Vector Calculus:

  • "Calculate the divergence of F = x^2i + y^2j + z^2*k"
  • "Find the curl of the velocity field v = -yi + xj"
  • "Compute the gradient of phi = x^2 + y^2 + z^2 in spherical coordinates"

General Relativity:

  • "Show me the Schwarzschild metric for a black hole"
  • "Calculate the Christoffel symbols for the FLRW metric"
  • "What is the Ricci scalar for the Kerr metric?"

Visualization:

  • "Plot the function sin(x)*cos(y) as a contour plot"
  • "Visualize the vector field F = -yi + xj"

Dependencies

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

Running Tests

pytest packages/reasonforge-geometry/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_geometry-0.1.1.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

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

reasonforge_geometry-0.1.1-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for reasonforge_geometry-0.1.1.tar.gz
Algorithm Hash digest
SHA256 41a231b0023abba7eb001f10516fb36fc82f8cf5e75beeaaf7556c73d7fc6622
MD5 dc62b91cc5d5fab166022e851fc11fe8
BLAKE2b-256 0e42c695b91ba6c78f595acd3fdd3aa3442fbdbe790a1d141251f22e53e2d5e9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for reasonforge_geometry-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5f9a4f61341d8029fee5d20a3c7e77f539e16819bd48421c0330c0cb2366d9a5
MD5 f9bd78f2d1520de93806f8abcb1e1a0d
BLAKE2b-256 67252df49635f353a903d8a34079121775aefd4f0b76dbc5132f6f555311c826

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