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.7.0.tar.gz (44.0 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.7.0-py3-none-any.whl (24.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ironmcp-0.7.0.tar.gz
Algorithm Hash digest
SHA256 56a220caace039faca0e234328d01abf7d77e62154db9dbe71c8797c5ef0124b
MD5 2cfd99dbe34deba2e38c3e3a154fb296
BLAKE2b-256 feaabb561ae3e262b53ed8087645f8ddeba5d76d89f66ddb1a01518490605cdc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ironmcp-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 24.9 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.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ceda4e4d099dc797d20cef0013aa0fd49bd2d70616be9ed1c192ffe25a2f778e
MD5 645709e55d62a4722c62c0e134616309
BLAKE2b-256 4ae45980ae3a01a60ecc06d73765d6f392b377fdb8ff39bf69f1edf54ec0611b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.7.0 This release

2 files

0.6.0

2 files

0.5.1

2 files

0.5.0

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