Skip to main content

hermes-mpp

hermes-mpp makes Hermes Agent HTTPX traffic payment-aware. It answers supported MPP 402 challenges with a Tempo charge and retries the request through the same client.

V1 targets Hermes Agent 0.19, HTTPX 0.27–0.28, and pympp 0.10.

Install

After installing Hermes, run:

uvx hermes-mpp install

The installer adds and enables the plugin, then prompts for a Tempo private key; leave it blank to generate one. It stores the key in ~/.hermes/.env with owner-only permissions and prints the address to fund.

Generated wallets start empty. For Moderato resources, fund the printed address with the Tempo faucet.

Use a dedicated, low-balance key. By default, any origin presenting a valid MPP challenge can charge it without a prompt or spend cap. To restrict payments, set an exact, comma-separated allowlist:

MPP_ALLOWED_ORIGINS=https://mpp.dev,https://api.example.com

Paths and wildcards are rejected. The challenge selects the public Tempo RPC, so no RPC or network configuration is needed. Use plaintext http:// only for trusted local development; an on-path attacker can inject a payment challenge.

Use

Ask Hermes for the resource normally:

hermes chat -q "Make a request to https://mpp.dev/api/ping/paid"

The model gets one generic mpp_fetch tool for arbitrary HTTP APIs. Payment is not a separate tool call: it and every other in-process HTTPX client handle supported MPP challenges automatically.

Behavior

  • Existing and future sync and async clients retain their transport, pool, cookies, hooks, redirects, extensions, and streaming behavior. Response hooks observe the final logical response rather than the internal 402.
  • Free responses pass through. Malformed, unsupported, and disallowed challenges remain ordinary 402 responses.
  • A paid request is retried at most once. Distinct payments are serialized; equivalent, repeated, and uncertain attempts fail closed.
  • mpp_fetch blocks private-network redirects, hides sensitive response headers, and truncates large bodies.
  • Only HTTPX traffic in the Hermes process is instrumented. Shell commands and Requests, aiohttp, or urllib3 are not; use mpp_fetch for arbitrary HTTP.

If a payment outcome is uncertain, verify the wallet transaction before restarting Hermes; later payments remain blocked in that process.

Manage

hermes plugins list
uvx --refresh hermes-mpp install  # update or reconfigure
uvx hermes-mpp uninstall

Uninstalling leaves the private key in Hermes's .env file.

Develop

uv sync
uv run pytest
uv run ruff check .

CI tests Python 3.11–3.13 and HTTPX 0.27–0.28.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hermes_mpp-0.1.0.tar.gz (153.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hermes_mpp-0.1.0-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file hermes_mpp-0.1.0.tar.gz.

File metadata

  • Download URL: hermes_mpp-0.1.0.tar.gz
  • Upload date:
  • Size: 153.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for hermes_mpp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3cf559f3956a0c526a833f5a42b8f61caa76444ab094ae7c54f73dde2403ab17
MD5 49b2bc768a671cd2bf03e9f17737b4f2
BLAKE2b-256 924f5aa9e05d0abe4b71ca5fbe13a71e1372f17e0641ba25821a4a022cc47250

See more details on using hashes here.

File details

Details for the file hermes_mpp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: hermes_mpp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for hermes_mpp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0eb658ca7aece831425b505947d30e3a9d0d8ada8d0ce1f70634aada882c8d41
MD5 2ca43cc212843c64e1c357de27a1edae
BLAKE2b-256 e870ec156fc10e60630bceba78351958f5c17d4aed47a3f273d440cb00cbcfa2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page