Metadata-Version: 2.5
Name: mcp-outbound-metering
Version: 0.3.0
Summary: Producer runtime for outbound usage metering.
License-Expression: LicenseRef-Proprietary
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.12
Requires-Dist: httpx>=0.28
Requires-Dist: jsonschema>=4.25
Requires-Dist: pyyaml>=6
Provides-Extra: conformance
Requires-Dist: pytest>=8; extra == 'conformance'
Provides-Extra: otel
Requires-Dist: opentelemetry-api>=1.30; extra == 'otel'
Provides-Extra: verify
Requires-Dist: pytest>=8; extra == 'verify'
Description-Content-Type: text/markdown

# mcp-outbound-metering

Provider-neutral runtime for recording outbound MCP provider HTTP attempts,
buffering usage events in a per-replica SQLite outbox, and exporting signed
CloudEvents batches to a trusted ingest boundary.

The provider-facing transport is structural and supports both `httpx` and
`httpx2>=2.9.1,<3`. Billing delivery continues to use its own private `httpx`
client. The package contains no provider credentials, account mappings,
customer identifiers, pricing, or destination configuration.

Production hosts must:

- start one runtime before reporting ready;
- wrap every provider data-plane transport construction site;
- use a writable, non-memory-backed, non-network, per-replica outbox path;
- expose `runtime.health()` through readiness; and
- allow at least `GRACEFUL_SHUTDOWN_BOUND_SECONDS` before terminating the
  process, then add platform stop-grace margin.

The package is alpha software. Public distribution exposes the wire format,
not authority: batches require an enrolled key and HMAC signature, while the
trusted edge derives the source, account, sink, metric, and policy.
