Skip to main content

ironmcp

Part of the ironmcp monorepo — one contract, one conformance corpus, a native kit per language. For AI agents: AGENTS.md. Direction: ROADMAP.md.

The hardening & conformance standard for MCP servers. Dedicated, hardened, conformant MCP tooling on every platform — so nobody hand-rolls JSON-RPC again.

ironmcp is a policy layer for Model Context Protocol servers. It ships no tools — it constrains how your tools behave. The Python kit targets mcp>=2.

The problem it fixes

Most MCP SDKs silently drop any argument a tool doesn't declare, before the tool runs — no error, no signal. One added letter (projectprojects) yields a genuine answer to a question nobody asked, with no way for the caller to learn their constraint was ignored. ironmcp refuses the unknown argument instead, and advertises that it does.

Quick start

from ironmcp import strict_server

app = strict_server(name="my-server", version="1.0.0")

@app.tool()
async def search(query: str, limit: int = 20) -> str:
    ...

Now search(query="x", projekt="y") comes back as an error result ("unknown argument(s): projekt … Nothing was executed"), instead of silently running with projekt dropped. The advertised schema carries additionalProperties: false, so agents are told the truth — advertisement == runtime. A tool that sets additionalProperties: true opts out and accepts arbitrary keys.

Conformance — the guarantee is provable

from ironmcp import aassert_enforces_v2, run_corpus

await aassert_enforces_v2(app)                         # every tool: advertisement == runtime
results = await run_corpus(app, "conformance/cases")   # the language-neutral corpus
assert all(r.passed for r in results)

The behavioural contract lives in spec/, executable as conformance/ — a JSON corpus owned by no language. A kit in any language conforms when a server built with its strict layer passes the same cases. That is what makes "the same guarantee everywhere" provable rather than claimed.

Also included

  • health_payload(name, version) / code_sha() — agent-interrogable liveness (an agent learns what a server is and whether it is current without asking a human).
  • make_bearer_asgi(app, expected_token=...) — fail-closed bearer auth (401 + WWW-Authenticate) to wrap app.streamable_http_app().

API

from ironmcp importstrict_server, StrictArgsMiddleware, assert_enforces_v2, aassert_enforces_v2, run_corpus, Result, health_payload, code_sha, make_bearer_asgi.

See examples/demo.py for a runnable server that proves the guarantee end to end.

License

Apache-2.0. By Srclight.

Download files

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

Source Distribution

ironmcp-0.5.0.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

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

ironmcp-0.5.0-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file ironmcp-0.5.0.tar.gz.

File metadata

  • Download URL: ironmcp-0.5.0.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for ironmcp-0.5.0.tar.gz
Algorithm Hash digest
SHA256 c11af732fe73114919dcaee90628b735cd4a2d158c498b1598310ca5af7d5740
MD5 734c6c9f3414498c208c1d155babd992
BLAKE2b-256 7066662ac0f06bf9419bd36c57ee45b578191d36509104b83169d25b3a14e471

See more details on using hashes here.

File details

Details for the file ironmcp-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: ironmcp-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for ironmcp-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 614f2e45613d45ffff5b44b4819ed1956b70be34fc74109161157056357487b9
MD5 775b120bf329e8fe6bef8af7c2e491c4
BLAKE2b-256 08ddb1218dc5d736b2980aadef401d431c2aa455877b49671df10dbc5b938c3b

See more details on using hashes here.

Release history Release notifications | RSS feed

0.7.0

2 files

0.6.0

2 files

0.5.1

2 files

This release

0.5.0 This release

2 files

0.3.0

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page