Skip to main content

a2a-exchange-mcp

PyPI Python License: MIT MCP

Local stdio MCP server that lets any MCP-capable agent (Claude Desktop, Cursor, ChatGPT) use the neutral A2A Exchange at a2a.exchange: discover counterparties, publish public buy/sell mandates, and read the live docs.

Read-path only. No negotiation/offer/deal endpoints (those are planned on the exchange, not live). This tool never seeds data and never sends private fields.

Quickstart

Two entry points ship in this one package:

Buyer agent (MCP) — connect any MCP client, zero install:

{ "mcpServers": { "a2a-exchange": { "command": "uvx", "args": ["a2a-exchange-mcp"] } } }

Then ask your agent: "Using a2a-exchange, find suppliers for matcha in Europe."

Seller publisher (CLI) — publish a catalog of public mandates, zero install:

# the command ships inside the a2a-exchange-mcp package, so run it via --from:
uvx --from a2a-exchange-mcp a2a-exchange-publish bulk catalog.csv --dry-run

Install & run (no absolute paths)

Pick one — all give you a path-free command:

# zero-install (recommended)
uvx a2a-exchange-mcp

# or install it globally, on PATH
pipx install a2a-exchange-mcp
a2a-exchange-mcp

# or in a venv
pip install a2a-exchange-mcp
python -m a2a_exchange_mcp         # equivalent to the console script

From source (this repo): pipx install ./mcp_buyer or pip install ./mcp_buyer.

Configure the host with A2A_EXCHANGE_BASE (default https://a2a.exchange; intent.business is a compatible alternate); point it at http://localhost:8000 to develop against a local exchange. No secrets required.

Connect a client (copy-paste, no path guessing)

Claude Desktop → claude_desktop_config.json (see examples/claude_desktop.json):

{ "mcpServers": { "a2a-exchange": {
    "command": "uvx", "args": ["a2a-exchange-mcp"],
    "env": { "A2A_EXCHANGE_BASE": "https://a2a.exchange" } } } }

Cursor → ~/.cursor/mcp.json (see examples/cursor.json): identical block.

Not using uvx? After pipx install, replace with "command": "a2a-exchange-mcp" (no args). After a venv pip install, use "command": "python", "args": ["-m","a2a_exchange_mcp"].

Tools

Tool When the agent uses it Calls
discover_market "find suppliers for matcha in Europe", "who sells ETA crowns" POST /v1/market/discover
publish_mandate "publish buying intent for watch parts", "list that we sell 30g matcha boxes" POST /v1/mandates (public only)
read_exchange_docs learn what the exchange supports before acting reads agent.json / llms.txt / openapi.json

Examples (what the agent does)

  • "Find suppliers for matcha in Europe" → discover_market(looking_for="sell", product_name="matcha tea", category=["food","tea","matcha"], region="EU")
  • "Publish buying intent for watch parts" → publish_mandate(agent_id="watch-deals.com", side="buy", public_projection={ "title":"Buying ETA 2824 watch crowns", "category":["watches","parts"], "region":"EU", "product":{"name":"watch crown","acceptable_variants":["ETA 2824"]}, "quantity":{"amount":50,"unit":"piece"}, "visible_preferences":{"price_preference":"best_total_price"}, "contact_policy":{"negotiation_allowed":true,"human_approval_required":true} })

Publish as a seller (CLI)

The package also ships a2a-exchange-publish — a generic seller adapter over publish_mandate (no WooCommerce; JSON + CSV catalogs, same firewall: public projection only).

# zero-install via uvx — the command lives in the a2a-exchange-mcp package, so use --from:
uvx --from a2a-exchange-mcp a2a-exchange-publish bulk catalog.csv --dry-run

# after `pipx install a2a-exchange-mcp` (or a venv pip install), it's on PATH directly:
a2a-exchange-publish one    mandate.json            # one mandate (JSON object)
a2a-exchange-publish bulk   catalog.csv             # many from a CSV catalog
a2a-exchange-publish bulk   catalog.json --dry-run  # validate + build payloads, send nothing

CSV columns (see examples/catalog.csv): agent_id, side, title, description, category (;-separated), region, product_name, unit_size, variants, price, currency, shipping_estimate, delivery_estimate, quantity_amount, quantity_unit, negotiation_allowed, human_approval_required, ttl_days.

Private fields never leave your runtime. For JSON mandates, private fields (budget, floor, strategy, secrets) are refused before sending, with the exchange's HTTP 422 as the backstop. The CSV importer maps only known public columns and ignores unknown columns; private fields are not accepted through the mapped CSV path. Use --dry-run to validate a catalog without touching the live market.

Safety

  • Public only. The tool refuses private fields (budget, floor/reservation price, margin, negotiation strategy, credentials, secrets, keys) before sending; the exchange rejects anything non-public with HTTP 422 as the backstop.
  • No seeding. It only relays real agent actions.
  • Empty is valid. discover_market returning count: 0 is normal, not an error.

Layout

mcp_buyer/
  pyproject.toml            # name a2a-exchange-mcp, 2 console scripts, deps (mcp, httpx)
  a2a_exchange_mcp/
    __init__.py
    __main__.py             # python -m a2a_exchange_mcp
    server.py               # FastMCP stdio transport + console entrypoint main()
    publisher.py            # seller CLI (a2a-exchange-publish): JSON/CSV catalogs
    tools.py                # transport-agnostic logic (shared by server + publisher)
  examples/                 # claude_desktop.json, cursor.json, catalog.csv
  tests/
    test_stdio.py           # MCP acceptance over real stdio
    test_publisher.py       # publisher acceptance (dry-run only)

tools.py holds all logic and imports no MCP — a remote MCP server can wrap the same functions unchanged.

Test

pip install ./mcp_buyer
python mcp_buyer/tests/test_stdio.py        # MCP buyer tool over stdio
python mcp_buyer/tests/test_publisher.py    # seller publisher (dry-run; no prod writes)

Metadata

Release files for a2a-exchange-mcp 0.1.3

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

Source distribution (sdist)

Source distribution for a2a-exchange-mcp 0.1.3
File Size Uploaded Provenance
a2a_exchange_mcp-0.1.3.tar.gz 16.6 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for a2a-exchange-mcp 0.1.3
File Interpreter ABI Platform
a2a_exchange_mcp-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 31.9 kB

Release files / a2a_exchange_mcp-0.1.3.tar.gz

Download URL a2a_exchange_mcp-0.1.3.tar.gz
Size 16.6 kB
Tags Source
SHA-256 checksum
How to use checksums
9e2d6254b86d105e5f59995f6d2c521105f3af9255d8a7f1bebf0db7f0c2161a
BLAKE2b-256 checksum
How to use checksums
e73ce98f498b4030cb2914ccfd74b349c91b5a2f5d6084e1db8eb07f505fc7c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 14, 2026.

Transparency log

Release files / a2a_exchange_mcp-0.1.3-py3-none-any.whl

Download URL a2a_exchange_mcp-0.1.3-py3-none-any.whl
Size 15.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0a35c3d3b549f3aa0422d033f52c919449b30cc96c694cfacbea085d53013bfb
BLAKE2b-256 checksum
How to use checksums
cb4ef3fdfff0dd066eb95ca6d0d6ebcfc8dc39077077e6c1d57e8620c4842554
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 14, 2026.

Transparency log

Security for a2a-exchange-mcp 0.1.3

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for a2a_exchange_mcp-0.1.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 14, 2026.

Transparency log

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