MCP Server
Examples
Configuration examples for running the OpenOcean MCP server with different clients.
Running with an MCP Client
MCP clients run the server as a background process. Add a server entry like one of the following.
Using pnpm dlx (recommended):
Terminal
{}
1 { 2 "mcpServers": { 3 "openocean-mcp-server": { 4 "command": "pnpm", 5 "args": ["dlx", "openocean-mcp"] 6 } 7 } 8 }
If installed globally:
Terminal
{}
1 { 2 "mcpServers": { 3 "openocean-mcp-server": { 4 "command": "openocean-mcp", 5 "args": [] 6 } 7 } 8 }
Example Prompts
Once the MCP server is configured, you can use prompts like these with your AI assistant:
Terminal
TXT
1 # Get a swap quote 2 "Get me a quote for swapping 1 ETH to USDC on Ethereum" 3
4 # Check token list 5 "What tokens are available on BSC?" 6
7 # Get gas price 8 "What's the current gas price on Polygon?" 9
10 # Build a swap transaction 11 "Build a swap transaction for 100 USDC to ETH on Arbitrum for address 0x..." 12
13 # Check DEXes 14 "What DEXes are supported on Avalanche?"