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 (project → projects) 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 import — strict_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.

Metadata

Release files for ironmcp 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ironmcp 0.7.0
File Size Uploaded Provenance
ironmcp-0.7.0.tar.gz 44.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ironmcp 0.7.0
File Interpreter ABI Platform
ironmcp-0.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 69.0 kB

Release files / ironmcp-0.7.0.tar.gz

Download URL ironmcp-0.7.0.tar.gz
Size 44.0 kB
Tags Source
SHA-256 checksum
How to use checksums
56a220caace039faca0e234328d01abf7d77e62154db9dbe71c8797c5ef0124b
BLAKE2b-256 checksum
How to use checksums
feaabb561ae3e262b53ed8087645f8ddeba5d76d89f66ddb1a01518490605cdc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / ironmcp-0.7.0-py3-none-any.whl

Download URL ironmcp-0.7.0-py3-none-any.whl
Size 24.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ceda4e4d099dc797d20cef0013aa0fd49bd2d70616be9ed1c192ffe25a2f778e
BLAKE2b-256 checksum
How to use checksums
4ae45980ae3a01a60ecc06d73765d6f392b377fdb8ff39bf69f1edf54ec0611b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for ironmcp 0.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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