
relayprotocol/relay-mcp
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
A Model Context Protocol server for Relay Protocol — cross-chain bridge and swap tools for AI agents.
Обзор
A Model Context Protocol server for Relay Protocol — cross-chain bridge and swap tools for AI agents. Add to your claude_desktop_config.json or .claude.json: - — Pass "base", "ethereum", "arb" instead of numeric chain IDs. Supports aliases and fuzzy matching. - — Addresses, amounts, and chain IDs are validated before hitting the API, with clear error messages. - — check_chain_status and get_app_fees combine multiple API calls into single tools with parallel fetching. - — Tool descriptions guide agents to pick the right tool ("For just the price, use get_token_price. For full fundamentals, use get_token_details."). - — Responses are trimmed to essential fields. Chart data is downsampled from ~21KB to ~3KB. - — get_api_schema lets agents explore available endpoints on demand (progressive disclosure pattern). - — get_transaction_status accepts either a request ID or an on-chain transaction hash.
README
Показан фрагмент оригинального README. Открыть оригинал.
Relay MCP Server
A Model Context Protocol server for Relay Protocol — cross-chain bridge and swap tools for AI agents.
Tools (16)
Quoting & Routing
| Tool | Description |
|---|---|
get_bridge_quote |
Quote for bridging same token across chains |
get_swap_quote |
Quote for swapping between different tokens (same-chain or cross-chain) |
estimate_fees |
Fee breakdown for a bridge or swap route |
Token & Chain Discovery
| Tool | Description |
|---|---|
get_supported_chains |
List supported blockchain networks (slim response) |
get_supported_tokens |
Search for tokens across chains |
get_trending_tokens |
Currently trending tokens across Relay-supported chains |
get_token_price |
Current USD price of a token |
get_token_details |
Full token fundamentals: price, market cap, volume, liquidity, optional price chart |
get_swap_sources |
List DEX aggregators and AMMs that Relay routes through |
Chain Health
| Tool | Description |
|---|---|
check_chain_status |
Chain health, solver liquidity, and route configuration (3 API calls in 1 tool) |
Transaction Tracking
| Tool | Description |
|---|---|
get_transaction_status |
Check status by request ID or on-chain tx hash |
get_transaction_history |
Past transactions for a wallet |
index_transaction |
Tell Relay to index a transaction it may have missed |
Integrator Tools
| Tool | Description |
|---|---|
get_app_fees |
Claimable app fee balances and claim history (2 API calls in 1 tool) |
get_relay_app_url |
Deep link to the Relay web app with pre-filled parameters |
get_api_schema |
Discover Relay API endpoints and inspect their schemas |
Usage
Claude Desktop / Claude Code
Add to your claude_desktop_config.json or .claude.json:
{
"mcpServers": {
"relay": {
"command": "npx",
"args": ["-y", "@relayprotocol/relay-mcp"]
}
}
}
Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"relay": {
"command": "npx",
"args": ["-y", "@relayprotocol/relay-mcp"]
}
}
}
Run from source
npm install
npm run build
npm start
Environment variables
| Variable | Default | Description |
|---|---|---|
RELAY_API_URL |
https://api.relay.link |
Relay API base URL |
RELAY_API_KEY |
— | API key. Required by get_transaction_history (GET /requests/v3); optional elsewhere for higher rate limits |
MCP_TOKEN_SECRET |
random per process | HTTP mode only. Signs OAuth tokens; set it so tokens stay valid across restarts |
Features
Установка
npx -y @relayprotocol/relay-mcpКонфигурация
{
"mcpServers": {
"relay": {
"command": "npx",
"args": ["-y", "@relayprotocol/relay-mcp"]
}
}
}