How it works
When your MCP client connects to/mcp/sse, the gateway authenticates your API key, then opens a persistent SSE stream. Over that stream it advertises each of your active routes as an MCP tool — the tool name comes from the route path, and the description comes from the description field you set on the route. When the AI assistant invokes a tool, the gateway:
- Constructs the corresponding
https://gateway.meterlane.app/gateway/{orgSlug}/{routePath}request. - Signs and attaches the x402 payment using your organization’s payer wallet.
- Proxies the request to your upstream and returns the result to the assistant.
Endpoint
The
/mcp/sse endpoint requires a valid Bearer API key. An invalid or missing key returns a 401 immediately, before the SSE stream opens.Configuring Claude Desktop
Claude Desktop supports MCP servers via a JSON configuration file. Add the Meterlane gateway as an MCP server so Claude can call your routes as tools in any conversation.Find your Claude Desktop config
Open
claude_desktop_config.json. On macOS it lives at ~/Library/Application Support/Claude/claude_desktop_config.json. On Windows, it is at %APPDATA%\Claude\claude_desktop_config.json.Add the Meterlane MCP server
Add an entry under
mcpServers. Replace bp_live_… with your real API key from the Meterlane dashboard:Configuring other MCP clients
Any MCP client that supports SSE transports with custom headers can connect to the Meterlane gateway. Use the following values:Payment transparency
When an MCP tool call triggers a paid gateway route, payment happens automatically using your organization’s on-chain payer wallet. The AI assistant receives the upstream response as the tool result. No additional confirmation steps are required.Making routes better MCP tools
The quality of your route’sdescription field directly affects how well AI assistants understand when and how to call it. Write descriptions as plain English instructions:
| Route path | Weak description | Better description |
|---|---|---|
/summarize | Summarize text | Summarize a document or article. Pass the full text as a 'text' query parameter. Returns a concise summary in plain prose. |
/weather | Get weather | Return current weather for a city. Pass city name as 'city' query parameter. Returns temperature, conditions, and humidity. |
PATCH /api/routes/{id} — changes take effect on the next MCP client reconnect.