Metadata-Version: 2.5
Name: paymid-mcp
Version: 0.1.0
Summary: Commission protection for middlemen: the commission is paid first, then the seller is paid. Stdio bridge to the hosted Paymid MCP server.
Project-URL: Homepage, https://paymid.com.br
Project-URL: Documentation, https://paymid.com.br/docs
Author-email: Paymid <contact@aufwassen.com>
License: MIT
License-File: LICENSE
Keywords: commission,mcp,middleman,model-context-protocol,payments
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Office/Business :: Financial
Requires-Python: >=3.10
Requires-Dist: mcp-proxy<0.16,>=0.15.0
Description-Content-Type: text/markdown

# paymid-mcp

<!-- mcp-name: br.com.paymid/mcp-server -->

**The middleman gets paid first.**

Commission protection for middlemen: the commission is paid first, then the seller is paid.

Paymid is a hosted MCP server that protects a middleman's commission on a deal. The buyer accepts a commission agreement (12-month non-circumvention) and pays the commission; only then does the payment to the seller open. Paymid sequences the two payments and keeps the proof record — it never processes or holds the money itself.

This package is a thin **stdio bridge** to the hosted server, for MCP clients that can only launch local commands. Clients that accept a remote URL directly should skip it and connect to `https://mcp.paymid.com.br/mcp/claude` (Streamable HTTP).

## Install

```json
{
  "mcpServers": {
    "paymid": {
      "command": "uvx",
      "args": ["paymid-mcp"]
    }
  }
}
```

Or with pip: `pip install paymid-mcp`, then run `paymid-mcp`. No API keys, no environment variables.

## Authentication — what you will experience

The Paymid server uses OAuth 2.1 with dynamic client registration and requires an access token. Be precise about what this bridge does and doesn't do:

- The bridge reaches the server and forwards your client's requests. Without a token, the server answers **401 Unauthorized** and the bridge exits with an error — `mcp-proxy` does **not** run the interactive browser sign-in.
- If you already have a Paymid access token, pass it through (arguments are forwarded to `mcp-proxy`):

  ```bash
  paymid-mcp -H Authorization "Bearer <your-token>"
  ```

  With a valid token, the full handshake completes and all 6 tools are available (validated live against the production server).
- For the sign-in itself, use a client with native remote-MCP OAuth — or the npm bridge (`npx -y paymid-mcp`), which performs the full browser OAuth flow and caches the token. Clients that accept a remote URL directly don't need any shim: connect to `https://mcp.paymid.com.br/mcp/claude`.

## Tools

| Tool | What it does |
|---|---|
| `create_bridge` | Create a commission-protected bridge (optionally from an existing agreement's text — Paymid extracts the parties, values and does the math). Returns the payment link to send the buyer. |
| `get_bridge_status` | Current status: commission paid? seller contact unlocked (blind mode)? service payment confirmed? |
| `list_my_bridges` | Your bridges, with statuses and amounts. |
| `get_bridge_link` | The payment link of an existing bridge, to resend to the buyer. |
| `get_bridge_record` | The proof record: accepted agreement, timestamps, amounts, both payment receipts. |
| `cancel_bridge` | Cancel a bridge. |

Two modes: `padrao` (default — payment order enforced, parties may already know each other) and `blind` (the seller's contact stays sealed until the commission is confirmed — for deals where the seller's identity is the secret).

Rails are global and chosen by the middleman: Pix, Zelle, Wise, wire/SWIFT, ACH, SEPA, card, PayPal, Bitcoin, payment link, or a custom rail. Platform fee, owed by the middleman: 1.5% of the commission + 0.1% of the deal value.

## Links

- Website: https://paymid.com.br
- Docs: https://paymid.com.br/docs
- Privacy: https://paymid.com.br/privacy
- Support: contact@aufwassen.com
- Official MCP Registry: `br.com.paymid/mcp-server`

## License

MIT
