Skip to main content

Receipts MCP Proxy

receipts_mcp/ is a stdio MCP server that sits between an MCP client and one or more upstream MCP servers.

For each tool call:

  1. The client calls the Receipts proxy.
  2. The proxy forwards the call to the real upstream MCP server.
  3. The real output is captured.
  4. The proxy POSTs that result to POST /tools/record on the Receipts backend.
  5. The real result is returned to the client even if receipting fails.

Upstream tools are namespaced as <server>__<tool> so collisions do not clobber each other.

If no upstream config file exists, the proxy falls back to the built-in demo tools:

  • write_file
  • http_fetch
  • db_query

Those demo tools are forwarded to the backend's /tools/call endpoint.

Setup

pip install receipts-mcp
cp upstreams.json.example upstreams.json

Configuration

receipts_mcp/config.py reads environment variables and an upstreams JSON file.

Environment variables:

Variable Default Purpose
RECEIPTS_URL http://localhost:8000 Receipts backend URL
RECEIPTS_API_KEY empty Proxy-role API key used for /tools/record
UPSTREAMS_PATH receipts_mcp/upstreams.json Path to upstream config
TOOL_TIMEOUT_SECONDS 60 Max time for an upstream tool call
RECORD_TIMEOUT_SECONDS 5 Max time for backend receipting

The upstreams file supports:

  • stdio
  • sse
  • streamable_http

${ENV_VAR} references inside env and headers are expanded from the process environment.

Example:

{
  "include_demo_tools": false,
  "upstreams": {
    "github": {
      "transport": "stdio",
      "command": "/path/to/github-mcp",
      "args": [],
      "env": {
        "GITHUB_TOKEN": "${GITHUB_TOKEN}"
      }
    }
  }
}

Claude Code / Cursor config

Add this to ~/.claude/claude_mcp_config.json or the equivalent Cursor MCP config:

{
  "mcpServers": {
    "receipts": {
      "command": "/path/to/receipts/.venv/bin/python3",
      "args": ["-m", "receipts_mcp.server"],
      "cwd": "/path/to/receipts",
      "env": {
        "RECEIPTS_URL": "http://localhost:8000",
        "RECEIPTS_API_KEY": "<proxy-key>",
        "UPSTREAMS_PATH": "receipts_mcp/upstreams.json",
        "PYTHONPATH": "/path/to/receipts"
      }
    }
  }
}

Restart the MCP client after changing the config.

Runtime behavior

  • One proxy process gets one mcp-<hex> session ID.
  • All tool calls from that process share that session so they can be reconciled together.
  • If the backend is unreachable, the tool result still returns and the receipt is skipped.
  • If the backend rejects the API key, the proxy logs it as a configuration error.

Run

python3 -m receipts_mcp

or

python3 -m receipts_mcp.server

Metadata

Release files for receipts-mcp 0.2.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 receipts-mcp 0.2.0
File Size Uploaded Provenance Actions
receipts_mcp-0.2.0.tar.gz 26.9 kB Without provenance Details for receipts_mcp-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for receipts-mcp 0.2.0
File Interpreter ABI Platform Actions
receipts_mcp-0.2.0-py3-none-any.whl Python 3 none any Details for receipts_mcp-0.2.0-py3-none-any.whl

Total release size: 39.0 kB

Release files / receipts_mcp-0.2.0.tar.gz

Download URL receipts_mcp-0.2.0.tar.gz
Size 26.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3f08655a55a59b772e6ab65a5544adb2e560ca4d1d4f18ad5243f859374d9f73
BLAKE2b-256 checksum
How to use checksums
6548eda4bb805ef20615ac5babde39050d38ee25559307ce18185c313a729b63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / receipts_mcp-0.2.0-py3-none-any.whl

Download URL receipts_mcp-0.2.0-py3-none-any.whl
Size 12.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
243ad3e02013b32affbe93c6c5e8471e4c000aed3d212b53c7cde9431f6e61dc
BLAKE2b-256 checksum
How to use checksums
eaee5ae11891f281c7182e1c01da68dcbcab7b737ccac45615350804a53e2bab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Security for receipts-mcp 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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