SuperAPI AI Directory

mercury-multiorg-mcp

Unofficial, read-only Mercury banking across multiple organizations: balances, transactions, statements, cards, invoices, treasury and 1099 pre-filing checks.

Open website

About this tool

mercury-multiorg-mcp is an unofficial, read-only MCP (Model Context Protocol) server designed to let a single AI session access multiple Mercury banking organizations at the same time. Mercury's API tokens can only be created within a single organization, so this server holds one read-only token per organization and routes each tool call through an explicit entity key.

Purpose

This server is mainly used for read-only financial data queries across multiple Mercury organizations, including balances, transactions, statements, cards, invoices, treasury, and 1099 pre-filing checks. It does not provide any write or money movement functionality.

Main capabilities

  • Read-only: only GET endpoints are implemented, and there is no code path that can move money, edit recipients, or change anything.
  • stdio only: the server never opens a network listener and does not provide HTTP or SSE transport.
  • Explicit entities: call list_entities to discover entity keys. Every tool that accesses Mercury requires an explicit entity and identifies that entity in successful results. list_entities and server_info do not require an entity parameter. There is no default entity.
  • Tokens stay in the environment: the registry specifies one environment variable per organization (which must start with MERCURY_TOKEN_), and the server only reads that environment variable. Errors and logs contain at most the last four characters of the token.
  • Mercury hosts only: --api-base / MERCURY_API_BASE must be https://api.mercury.com、https://api-sandbox.mercury.com or a loopback mock address, unless --allow-custom-api-base is passed on the command line.
  • Byte limits: compression is rejected for every request (Accept-Encoding: identity). JSON/PDF reads reject non-identity encodings before reading. PDFs are limited to 10 MiB and JSON to 32 MiB, enforced on the actual bytes received while streaming.
  • Complete or error: traversal stops at the requested limit or the end of the API. Missing/incorrect page objects fail; the optional terminal nextPage may be missing or null. Fully duplicate IDs are discarded and counted; content conflicts fail. Traversals requiring more than 200 pages fail.
  • Full traversal of windowed data sources: Mercury does not document the sort keys for events or treasury transactions, so client windows (since for list_events, start/end for list_treasury_transactions) traverse the entire bounded data source (90 days of events; treasury ledger up to 200 pages), filter here and sort newest first, then apply limit.
  • Binary documents stay in memory: PDFs are returned as embedded application/pdf blobs (base64) and are never written to disk.
  • Path ID validation: every ID that becomes part of a request path must be a single safe segment.
  • Startup errors: a missing or malformed registry, unreadable file, incorrect --env-file, or disallowed API host prints one line to stderr and exits with status 2.
  • Never files anything: reportable_totals is a pre-filing cross-check. Mercury has no 1099 filing endpoint; filing is done in each organization's dashboard.

Usage

Install from PyPI and run a pinned version (no clone required):

uvx <package>@<version>

or

pip install 'mercury-multiorg-mcp==0.1.6'

This puts mercury-multiorg-mcp and mercury-multiorg-mcp-keepalive on PATH. Requires Python 3.11+ and uv (for uvx).

Run from source or a pinned commit:

uvx --from git+https://github.com/dkaleganov/mercury-multiorg-mcp@<FULL_COMMIT_SHA> mercury-multiorg-mcp

Configuration steps:

  1. In each Mercury organization: organization switcher → All Settings → Tokens → create a Read Only token (no IP allowlist needed).
  2. Copy entities.example.yaml to a private location outside the repository, and list your organizations (key, display_name, token_env; the environment variable name must start with MERCURY_TOKEN_).
  3. In the environment where the server is started, export one environment variable for each organization, with the name matching the registry (.env.example shows the names). Configuration is read only from process environment variables; unless --env-file <path> is passed, .env files are not read.
  4. Optional: MERCURY_API_BASE=https://api-sandbox.mercury.com for use with tokens created by the sandbox.
  5. Optional: --allow-documents (or MERCURY_ALLOW_DOCUMENTS=1) to register the two PDF tools. Unless the session truly needs unredacted documents, leave it off.

Startup problems (missing or malformed registry, invalid YAML, unreadable file, wrong API base) print one line to stderr and exit with status 2. Stdout is reserved for the MCP protocol.

Mercury deletes API tokens after 45 days of inactivity, and separately downgrades permissions unused for 45 days. Run mercury-multiorg-mcp-keepalive on a schedule so the inactivity clock does not expire; see docs/keepalive.md for cron and launchd snippets.

When it applies

This server is suitable for MCP clients that support local stdio servers and negotiate protocol versions, such as Claude Code, Claude Desktop, Codex CLI, Cursor, Windsurf legacy Cascade, VS Code, Gemini CLI, and others. The client host must be able to read the private registry and environment files.

Limitations

  • Unofficial, not affiliated with or endorsed by Mercury.
  • Read-only, no write operations of any kind are possible.
  • stdio only, no HTTP or SSE.
  • Requires explicit entities, no default entities.
  • Tokens must be provided via environment variables, and the environment variable name must start with MERCURY_TOKEN_.
  • Mercury hosts only, unless a custom API base is explicitly allowed.
  • There are byte limits and pagination limits.
  • No 1099 filing functionality is provided, only pre-filing cross-checks.
  • Requires Python 3.11+ and uv (for uvx).
  • No specific fee, price, or performance information is provided in the documentation.