Skip to main content

metrecept-mcp

Slim MCP server for Metrecept: prompt cache replay, multi-provider model routing (BYOK), and compliant public-web fetch as Cursor tools — without installing the full gateway stack. Runs over stdio (default) or as a stateless remote streamable-HTTP server.

Install

pip install metrecept-mcp

Then run metrecept-mcp (ohm-mcp is the same binary, kept as an alias). ohm-mcp on PyPI is an unrelated third-party package — do not pip install ohm-mcp.

No local install: attach the hosted server at https://api.metrecept.co.uk/mcp with Authorization: Bearer sk-at-….

From this repo instead of PyPI:

pip install "git+https://github.com/iwasinnam2/metrecept-opensource.git#subdirectory=packages/ohm-mcp"

Cursor attach (stdio)

{
  "mcpServers": {
    "metrecept": {
      "command": "metrecept-mcp",
      "env": {
        "OHM_API_KEY": "sk-at-YOUR_ISSUED_KEY",
        "OHM_UPSTREAM_KEY": "sk-proj-optional-byok-key",
        "OHM_BASE_URL": "https://api.metrecept.co.uk/v1"
      }
    }
  }
}

Hosted streamable HTTP (no local install): https://api.metrecept.co.uk/mcp with Authorization: Bearer sk-at-…. Stdio remains the metrecept.co.uk/i one-click default.

Get a key from the $0 Intermediate seat at metrecept.co.uk/billing/intermediate.

Tools

  • ohm_chat — chat through the pipe; identical prompts replay from Redis cache.
  • ohm_fetch_web — compliant public URL fetch (robots-gated, PII-redacted, metered).
  • ohm_usage — usage snapshot: cache hit ratio, fetches, estimated pipe rent.
  • ohm_models — model ids the pipe routes to, including BYOK upstreams.
  • ohm_cache_trees — list the tenant's cache-tree inventory (named exact-replay namespaces).
  • ohm_cache_inventory — list cached entries in a tree: digest, model, TTL, size (metadata only).
  • ohm_savings — cache savings snapshot: replayed prompts, estimated spend avoided.
  • ohm_receipt — mint a public savings receipt (/r/…) from the savings snapshot.
  • ohm_providers — upstream provider and failover status.
  • ohm_policy — compliance policy: allowed web-fetch purposes and limits.
  • ohm_register_api_service / ohm_api_services / ohm_api_call — audit-mode GET to registered business APIs.
  • ohm_session — signed flight-recorder for one tagged session.

metrecept_* and metre_* names alias the same handlers.

Remote (stateless streamable HTTP)

OHM_MCP_TRANSPORT=http metrecept-mcp   # or: metrecept-mcp-http — serves POST /mcp on :8091

Production hosted endpoint: https://api.metrecept.co.uk/mcp.

Auth is per-request: clients send Authorization: Bearer sk-at-* (and optional X-Ohm-Upstream-Key) on the MCP HTTP request; OHM_API_KEY env is the stdio/local fallback.

Env

Variable Required Purpose
OHM_API_KEY stdio: yes Your Metrecept tenant key (sk-at-…); HTTP mode can use per-request Authorization instead
OHM_BASE_URL no Defaults to https://api.metrecept.co.uk/v1
OHM_UPSTREAM_KEY no BYOK provider key for cache-miss model calls

MIT licensed. The hosted service is commercial — see Pricing and Terms.

Note for maintainers: src/ohm_mcp/__init__.py in the monorepo root is the source of truth; run scripts/sync_ohm_mcp.ps1 before building this package.

Metadata

Release files for metrecept-mcp 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for metrecept-mcp 0.3.0
File Size Uploaded
metrecept_mcp-0.3.0.tar.gz 11.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for metrecept-mcp 0.3.0
File Interpreter ABI Platform
metrecept_mcp-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 24.5 kB

Release files / metrecept_mcp-0.3.0.tar.gz

Download URL metrecept_mcp-0.3.0.tar.gz
Size 11.6 kB
Tags Source
SHA-256 checksum
How to use checksums
597f43d051037004f06bfc6a9569dbfec7072423314b29dc10d1b97df8f9b1c0
BLAKE2b-256 checksum
How to use checksums
c63097fb02c0355e1ce17c9890e9ef0f2c4d3f2cf2141e7ba8718cc4b5e0dabc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / metrecept_mcp-0.3.0-py3-none-any.whl

Download URL metrecept_mcp-0.3.0-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f92181e634d67688ce132e8b515a0b4ef8182c08f0e5ade1d3bf391ee1535682
BLAKE2b-256 checksum
How to use checksums
98c04c3c3d672331e81245c0f9a4aa2d4149e3a1bdfbcf32e65eaf91661d403c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release 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