Skip to main content

MCP server exposing the Monogate Forge compiler as 9 tools

Project description

monogate-forge-mcp

MCP server that exposes the Monogate Forge EML compiler and the SuperBEST corpus as 8 tools any MCP-compatible client (Claude Desktop, IDE plugins, custom agents) can call. The PyPI distribution is monogate-forge-mcp; the CLI command it installs is forge-mcp.

  • Live endpoint: https://mcp.monogate.dev/sse
  • Status: https://mcp.monogate.dev/health
  • License: Apache-2.0 for this wrapper. Forge engine targets are split Free / Pro -- see list_targets.

Tools

Tool Tier Purpose
compile Free target / Pro target Compile EML to one of 32 backends. Pro targets need a license token from monogateforge.com.
profile Free Per-function chain order, cost class, fp16 drift risk, FPGA estimates when @target(fpga) is present.
verify Free Emit Lean 4 theorem scaffolding with sorry proofs. Does NOT run Lean. Returns {theorems_emitted, sorries, ready_for_lean_check, lean_source} so the caller can run lake build themselves.
search_corpus Free Query the 576-record SuperBEST corpus by name/expression substring, domain, or max chain order.
genome Free Find structural neighbours in the corpus via cost-class fingerprint distance (wraps eml_cost.find_siblings).
explain_function Free Human-readable optimizer trace for one function: passes that fired, before/after node counts, SuperBEST family.
list_targets Free Enumerate all 32 backends split Free (12) / Pro (20).
list_verticals Free List industry verticals with kernel counts. Sources themselves are not exposed.

The verify tool is honest by contract: it never claims a theorem is "proven", "verified", or "machine-checked". It only emits Lean source you can run yourself.

Run locally

git clone https://github.com/agent-maestro/monogate-forge-mcp
cd monogate-forge-mcp

# Install the wrapper + the Forge engine + cost analyzer.
pip install -e ../forge       # editable install of monogate-forge
pip install -e .

# stdio transport for IDE / Claude Desktop attach
forge-mcp --transport stdio

# SSE transport on http://0.0.0.0:8080
forge-mcp --transport sse

Claude Desktop config

{
  "mcpServers": {
    "forge": {
      "command": "forge-mcp",
      "args": ["--transport", "stdio"]
    }
  }
}

Deploy to Fly.io

The deploy artifacts under deploy/ build the image from the monorepo root so it can COPY both forge/ (the engine) and mcp-server/ (this wrapper) in one shot.

cd ~/monogate                    # monorepo root
fly auth login                   # one-time

# First time: create the Fly app, set the license signing key,
# deploy, and verify /health.
bash mcp-server/deploy/deploy.sh --first-time

# Subsequent deploys:
bash mcp-server/deploy/deploy.sh

After the first deploy, point DNS at the app:

fly certs create -a monogate-forge-mcp mcp.monogate.dev
# then add the CNAME / A+AAAA records `fly` prints

Environment

Var Purpose Default
PORT TCP port to bind. Fly.io sets this. 8080
FORGE_MCP_HOST Bind address. 0.0.0.0
FORGE_MCP_TRANSPORT stdio, sse, or streamable-http. sse
MONOGATE_FORGE_SIGNING_KEY Override the embedded ed25519 public key used to verify Pro license tokens. Set as a Fly secret in production. unset

Tests

Three layers, all real (no mocking the engine):

pytest tests/test_auth.py        # 10 license / target-tier tests
pytest tests/test_tools.py       # 25 in-process tool tests
pytest tests/test_server_e2e.py  # 10 e2e tests through the real
                                 # MCP stdio transport

The e2e suite spawns python -m forge_mcp.server --transport stdio in a subprocess and talks JSON-RPC over the official MCP client SDK. This is the closest in-process equivalent to "what Claude sees on the wire" before deployment.

Versioning

monogate-forge-mcp tracks monogate-forge major versions. The engine shipped in the deployed image is whatever pip install /src/forge resolves at image-build time (always the version vendored under forge/ in this monorepo).

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

monogate_forge_mcp-0.2.0.tar.gz (19.7 kB view details)

Uploaded Source

Built Distribution

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

monogate_forge_mcp-0.2.0-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file monogate_forge_mcp-0.2.0.tar.gz.

File metadata

  • Download URL: monogate_forge_mcp-0.2.0.tar.gz
  • Upload date:
  • Size: 19.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for monogate_forge_mcp-0.2.0.tar.gz
Algorithm Hash digest
SHA256 30255b7c120b19e938270a94a0e67b630dbc184fb4eadb910a67f05b149951f1
MD5 cccf3a83ed3b2c11db161f130dca3eb0
BLAKE2b-256 3547dbb45541a8884134c1364fcf6cb6f95a93bb0d2f4d895e666a49ef97c861

See more details on using hashes here.

Provenance

The following attestation bundles were made for monogate_forge_mcp-0.2.0.tar.gz:

Publisher: release.yml on agent-maestro/forge-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file monogate_forge_mcp-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for monogate_forge_mcp-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 294711ce5bf22517cd7b7280ecb7dc9bfc42137fd41da84bfa593fda09290101
MD5 131b3f7a632a3a123353b3c649babd70
BLAKE2b-256 2fe505f09b01e7fe8fe769d61dad7664d241d8e87f2cca74ff893a83a087807e

See more details on using hashes here.

Provenance

The following attestation bundles were made for monogate_forge_mcp-0.2.0-py3-none-any.whl:

Publisher: release.yml on agent-maestro/forge-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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