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.1.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.1-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ironmcp-0.5.1.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.1.tar.gz
Algorithm Hash digest
SHA256 2610b8b8cf990c4bd05ec0fa6a0826b1ffae78faff9a56717623e12e0d3679cf
MD5 629b1911b0c5d648fca32200c777f5f6
BLAKE2b-256 f8a31715594c139073c142935f8c5840dd118d19a6d35019e5e625d31cbc0cfa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ironmcp-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 13.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c499183a6670ffb59ad7a87bddec42ca69de49b9005ff001aa79d6b7699a6ec6
MD5 07a225d9e67e3eae5aecc95868839557
BLAKE2b-256 487bfabe990b54de0abcf0db50903f97f90011d0787f6a843ccf55a29f26072e

See more details on using hashes here.

Release history Release notifications | RSS feed

0.7.0

2 files

0.6.0

2 files

This release

0.5.1 This release

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