One connection.
Useful tools.
Connect your agent to the services enabled on your account. Use the connection guide for your chat app, or the HTTP examples below for your own client.
The endpoint
https://agentwire.run/gw/mcp
The current protocol is MCP 2026-07-28 over Streamable HTTP (streamable-http). Each request stands on its own: send a JSON-RPC request by POST, with authorization and client metadata. There is no initialize exchange or session id in this revision. The gateway uses the official MCP SDK to validate and serve it.
Start with server/discover for capabilities, then tools/list for tools this connection can use. Tool lists are private and may change with your selected services.
Connect and authorize
Every request includes authorization:
Authorization: Bearer YOUR_KEY
Create an account through email sign-in, then issue a key in your account. A raw API key is shown once. Revoke a lost key and create another.
Chat connectors: enter the endpoint above and choose OAuth. Sign in to AgentWire and approve the services you want that connection to use. Revoke a connection from your account. Access tokens expire after an hour; clients renew them with a rotating refresh token, and reconnect after 30 days.
Authorization uses PKCE S256 and resource-bound tokens. An unauthorized response includes WWW-Authenticate with the gateway's protected-resource discovery URL. Use the authorization endpoints advertised there. Approved HTTPS Client ID Metadata Documents are supported for public PKCE clients; an unknown origin needs operator approval. Dynamic registration remains available for older clients.
Authorization is checked on every request. Revocation also closes that connection’s open legacy event streams. Repeated invalid credentials are rate limited.
List the tools
This complete request works without a prior handshake:
curl -X POST 'https://agentwire.run/gw/mcp' \
-H 'Authorization: Bearer YOUR_KEY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-H 'MCP-Protocol-Version: 2026-07-28' \
-H 'Mcp-Method: tools/list' \
-d '{
"jsonrpc": "2.0", "id": 1, "method": "tools/list",
"params": {"_meta": {
"io.modelcontextprotocol/protocolVersion": "2026-07-28",
"io.modelcontextprotocol/clientInfo": {"name": "my-agent", "version": "1.0.0"},
"io.modelcontextprotocol/clientCapabilities": {}
}}
}'
A successful response includes resultType: "complete", tool names and their JSON Schemas. Use each tool's advertised schema to build arguments. A response may be JSON or a server-sent event stream; clients must accept both.
Call a tool
Set Mcp-Method: tools/call and Mcp-Name to the exact tool name. Send the matching name in the body, its arguments and the same metadata:
{
"jsonrpc": "2.0", "id": 2, "method": "tools/call",
"params": {
"name": "<tool name from tools/list>", "arguments": {},
"_meta": {
"io.modelcontextprotocol/protocolVersion": "2026-07-28",
"io.modelcontextprotocol/clientInfo": {"name": "my-agent", "version": "1.0.0"},
"io.modelcontextprotocol/clientCapabilities": {}
}
}
}
The version, method and name headers must agree with the request body. Tool failures return isError: true; inspect that result even when the HTTP status is 200. Availability and any review required for an external action are described by the tool itself.
Older MCP clients
The same endpoint supports the session-based revisions 2025-03-26, 2025-06-18 and 2025-11-25. Existing SDK clients can continue their normal handshake:
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{
"protocolVersion":"2025-11-25",
"capabilities":{},"clientInfo":{"name":"my-agent","version":"1.0.0"}
}}
Keep the returned Mcp-Session-Id, send notifications/initialized, and include the session id, negotiated MCP-Protocol-Version and bearer on subsequent requests. GET opens the event stream and DELETE closes the session. An OAuth session belongs to that exact connection; another connection to the same account cannot reuse it. Current 2026-07-28 requests use POST only.
Understand a response
| Status | Meaning | Next step |
|---|---|---|
| 400 | Malformed request, missing metadata or mismatched headers. | Check the JSON-RPC error and correct the request. |
| 401 | Missing, expired or revoked credential. | Refresh or reconnect. Follow OAuth discovery when offered. |
| 403 | The selected services do not include this tool, or the browser origin is not allowed. | Check the insufficient-scope challenge and reconnect with the needed service, or use an approved browser origin. |
| 404 | Unknown method, or an expired legacy session. | Check discovery; older clients may need a new handshake. |
| 405 | The current revision does not support this HTTP method. | Send POST. |
| 415 | Unsupported content type. | Send application/json. |
| 429 | A request or authorization limit was reached. | Follow the error details and wait before retrying. |
| 503 | An authentication dependency or legacy session capacity is unavailable. | Retry with backoff. |
Credits and effects
Pricing and the service catalog read the configured ledger. Fixed-price tools publish a cost; metered tools calculate the total for a request. Insufficient credit is reported as a tool error. Services outside this gateway can require a separate account and balance.
The shared ledger supports idempotent charges and refunds tied to the original debit. An HTTP retry does not automatically make an external effect idempotent: use the tool's documented request identifier where available, and inspect its result before retrying a send or publish.
Discovery and references
GET /catalog.jsonlists service configuration, tool names and prices. Gateway groups that are not configured reportavailable: false.- MCP specification 2026-07-28 and Streamable HTTP requirements.