{"$schema":"https://wellknown.network/schemas/agent-record-v1.json","schemaVersion":"1","id":"ag_hx9meq6kcq27","handle":"safeact-mcp","url":"https://wellknown.network/agents/safeact-mcp","links":{"self":"https://wellknown.network/agents/safeact-mcp/record.json","html":"https://wellknown.network/agents/safeact-mcp","markdown":"https://wellknown.network/agents/safeact-mcp/record.md","api":"https://wellknown.network/api/v1/agents/safeact-mcp","status":"https://wellknown.network/api/v1/agents/safeact-mcp/status","claim":"https://wellknown.network/agents/safeact-mcp/claim","claimApi":"https://wellknown.network/api/v1/claims","claimDescriptor":"https://wellknown.network/agents/safeact-mcp/claim.json","badge":"https://wellknown.network/agents/safeact-mcp/badge.svg","openapi":"https://wellknown.network/openapi.json","history":"https://wellknown.network/api/v1/agents/safeact-mcp/history","tools":"https://wellknown.network/api/v1/agents/safeact-mcp/tools"},"ard":{"identifier":"urn:air::server:safeact-mcp","type":"application/mcp-server-card+json"},"kind":"mcp_server","declared":{"name":"safeact-mcp","summary":"Make any MCP tool exactly-once and auditable — one decorator on top of the MCP SDK.","description":"# safeact-mcp\n\n**Make any MCP tool exactly-once and auditable — one decorator.**\n\nYour MCP tools *do real things*: charge a card, send an email, book a slot. When\nthe agent crashes and retries — and agents crash and retry a lot — a naive tool\nfires the action **twice**. And there's no record of what actually happened, so\nyou can't prove it or check it.\n\n`safeact-mcp` fixes both, in one line on top of the MCP SDK.\n\n```bash\npip install safeact-mcp\n```\n\n## Quickstart\n\n```python\nfrom mcp.server.mcpserver import MCPServer\nfrom safeact_mcp import safe_tool\n\nserver = MCPServer(\"payments\")\n\n@server.tool()\n@safe_tool(store=\"agent.db\")\ndef charge_card(idempotency_key: str, customer: str, amount: int) -> dict:\n    stripe.charge(customer, amount)          # the real, irreversible action\n    return {\"charged\": amount}\n```\n\nThat's it. Now `charge_card`:\n\n- **Runs at most once per idempotency key** — even across crashes and retries.\n- **Records every attempt** to a durable store — that's your audit trail.\n- **Refuses to guess.** If the process dies *after* the charge but *before* it's\n  recorded, the key is marked `IN_DOUBT` and the next call raises `InDoubtError`\n  instead of blindly charging again. (An honest \"we don't know, go check\" beats a\n  silent double-charge.)\n\n## Reading the audit trail\n\n```python\nfrom safeact_mcp import audit_record, in_doubt\n\naudit_record(\"agent.db\", \"order-42\")   # the durable record for one call\nin_doubt(\"agent.db\")                   # keys stuck in the gap — your review queue\n```\n\n## The one honest limitation\n\nMCP has no crash-safe idempotency key of its own. So the **caller supplies one**\nvia the `idempotency_key` argument — pass a *stable* value (e.g. your agent's\ntool-call id) so retries deduplicate. No key → you still get the audit trail, but\nnot the exactly-once guarantee. We're upfront about that.\n\n## How it works\n\n`safeact-mcp` is a thin adapter over [**safeact**](https://github.com/tarunagarwal1981/safeact),\nthe correctness core (exactly-on…","publisher":{"name":"Tarun Agarwal","url":null},"homepage":"https://safeact.dev","repository":"https://github.com/tarunagarwal1981/safeact","version":"0.0.1","license":"Apache License\n                                   Version 2.0, …","protocols":["mcp"],"tags":["mcp","model-context-protocol","ai-agents","idempotency","exactly-once","tools","audit","safeact","tool-use"],"pricing":null,"endpoints":[{"url":"pypi:safeact-mcp","type":"package_pypi","auth":null,"probeable":false,"listed":true}],"skills":null,"tools":null,"extra":null,"attribution":{"kind":"pypi","name":"pypi","license":"pypi","repoUrl":"pypi","summary":"pypi","version":"pypi","description":"pypi","homepageUrl":"pypi","publisherName":"pypi"}},"derived":{"capabilities":[{"slug":"commerce.payments","name":"Payments","confidence":1,"provenance":"derived"}],"categories":["commerce"],"language":"en"},"observed":{"status":"unknown","statusReason":"Distributed as a package to run locally; no network endpoint to check.","lastOkAt":null,"lastProbedAt":null,"statusComputedAt":null,"reliability30d":null,"latestObservations":[],"tools":null,"package":{"name":"safeact-mcp","registry":"pypi","observedAt":"2026-11-10T02:25:25.339Z","publishedAt":"2026-08-24T04:07:00.977019Z","latestVersion":"0.0.1"},"toolSurface":null,"endpointFacts":[]},"verification":{"claimed":false,"claimedAt":null,"proofs":[]},"provenance":{"sources":[{"source":"pypi","key":"safeact-mcp","url":"https://pypi.org/project/safeact-mcp/","firstSeenAt":"2026-09-10T11:27:40.441Z","fetchedAt":"2026-11-10T02:23:30.613Z","normalizedAt":"2026-11-10T02:23:30.613Z"}]},"firstSeenAt":"2026-09-10T11:27:40.441Z","updatedAt":"2026-11-10T02:25:25.339Z"}