# Endpoints (/docs/mcp/endpoints)

The Swop MCP server has two endpoints. They share one server, one sign-in and one token; they differ in which tools they expose.

| | `https://mcp.swopme.co/mcp` | `https://mcp.swopme.co/mcp/commerce` |
|---|---|---|
| Tools | 51 | 27 |
| Sell, SmartSite, lookups, orders | Yes | Yes |
| Send money, pay x402 links, swap | Yes, within caps | No |
| Perps and prediction-market trading | Yes, within caps | No |
| Prediction market data | Yes | No |
| AI trading agent control | Yes | No |
| Scopes offered at sign-in | All 11 | `profile.read`, `wallet.read`, `smartsite.write`, `commerce.write` |
| Listed in the MCP Registry as | | `io.github.Travisswop/swop` |
| Use it for | Personal assistants that act for one user, with their caps | Directory listings, shared or team assistants, and anyone who wants selling without spending |

On `/mcp/commerce`, the excluded tools don't appear in `tools/list` at all; calling one fails as an unknown tool rather than prompting a sign-in.

## Tools only on `/mcp` [#tools-only-on-mcp]

Money: `swop_get_spending_delegation`, `swop_send`, `swop_pay_x402_link`, `swop_get_swap_quote`, `swop_swap`.
Trading: `swop_perps_order`, `swop_get_my_predictions`, `swop_prediction_order`, `swop_cancel_prediction_order`.
Market data: `swop_search_markets`, `swop_get_event_markets`, `swop_get_event_live_status`, `swop_get_orderbook`, `swop_get_prices`, `swop_get_price_history`, `swop_get_taxonomy`, `swop_get_taxonomy_stats`, `swop_check_predictions_access`.
Lookups: `swop_get_token_price`, `swop_get_sports`.
Agent control: `swop_resolve_strategy_markets`, `swop_get_my_agent`, `swop_message_my_agent`, `swop_update_my_agent`.

## Protocol details [#protocol-details]

| | |
|---|---|
| Transport | MCP Streamable HTTP. Send JSON-RPC with `POST`; responses are plain JSON (no server-sent event stream) |
| Sessions | Stateless. No `Mcp-Session-Id`; any request can go to any replica. `GET` and `DELETE` on the endpoint return `405` |
| `initialize`, `tools/list` | Always open, no token needed |
| Auth challenge | A `tools/call` for an account tool without a token gets HTTP `401` with `WWW-Authenticate: Bearer resource_metadata="…"` and JSON-RPC error `-32001`. In a batch, one such call challenges the whole batch |
| Tool results | One `text` content item containing JSON. Failures set `isError: true` with the reason, for example `Swop API error (HTTP 404): …` |
| Request body limit | 4 MB (enough for an inline image on `swop_create_feed_post`) |
| Health | `GET https://mcp.swopme.co/healthz` |

## Server instructions [#server-instructions]

On `initialize` the server returns `instructions`: a plain-language list of what the user can do from that endpoint, plus conduct rules (confirm prices and payments with the user, don't expose tool names or infrastructure to them). Clients that pass server instructions to their model get sensible behaviour without extra prompting. `swop_get_help` returns the same capability list when a user asks "what can you do?".
