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 wrapapp.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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ironmcp-0.6.0.tar.gz.
File metadata
- Download URL: ironmcp-0.6.0.tar.gz
- Upload date:
- Size: 43.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
39550a4da27f3af4d89d6b3013f2bb0691d5a81933e4cf4e5022e4afeb6e6c6e
|
|
| MD5 |
9f0647247e72aa2ec9db6a184421b70a
|
|
| BLAKE2b-256 |
43c30ac6d043a157a0d6e073c0913ff1c9535627cc74a71687be343528d32d70
|
File details
Details for the file ironmcp-0.6.0-py3-none-any.whl.
File metadata
- Download URL: ironmcp-0.6.0-py3-none-any.whl
- Upload date:
- Size: 24.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
936a3af55b2c24055fd6098945e2d2b1a7abfb13850199b881b0756df32c9899
|
|
| MD5 |
909c1591f3ec750f82c2e0e607c9184e
|
|
| BLAKE2b-256 |
5a1c4a9e6891a2a83195717e58867d193ad343c4a067b79c46a48e4bb3749594
|