### Start DexPaprika MCP Server (Global Install) Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/06-configuration.md Start the DexPaprika MCP server after installing it globally via npm. The server uses stdio for communication. ```bash dexpaprika-mcp ``` -------------------------------- ### Project Setup and Execution Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/README.md Commands for cloning the repository, installing dependencies, running the project in watch mode for development, building for production, and running tests. ```bash # Clone the repository git clone https://github.com/coinpaprika/dexpaprika-mcp.git cd dexpaprika-mcp # Install dependencies npm install # Run with auto-restart on code changes npm run watch # Build for production npm run build # Run tests npm test ``` -------------------------------- ### Quick Start Commands Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/README.md Commands for installing and running the DexPaprika MCP server globally or via npx. ```bash # Install globally npm install -g dexpaprika-mcp # Start the server dexpaprika-mcp # Or run directly without installation npx dexpaprika-mcp ``` -------------------------------- ### Manual Installation and Verification Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/README.md Commands for manual global installation and verifying the server version. ```bash # Install globally (recommended for regular use) npm install -g dexpaprika-mcp # Verify installation dexpaprika-mcp --version # Start the server dexpaprika-mcp ``` -------------------------------- ### Call Tool to Get Networks Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/README.md Example of using the client to call the 'getNetworks' tool. This is useful for discovering all supported blockchains. Ensure the client is properly initialized before use. ```javascript const result = await client.callTool('getNetworks', { rationale: 'Discovering all supported blockchains.' }); console.log(`Found ${result.structuredContent.networks.length} networks`); ``` -------------------------------- ### Clone and Run DexPaprika MCP from Source Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/06-configuration.md Clone the DexPaprika MCP repository and run it from the source code. This involves installing dependencies, building the project, and starting the server. ```bash git clone https://github.com/coinpaprika/dexpaprika-mcp.git cd dexpaprika-mcp npm install # Install dependencies npm run build # Compile src/ to dist/ npm start # Run the server npm run watch # Run with auto-restart on file changes npm test # Run tests ``` -------------------------------- ### Install and Run dexpaprika-mcp Globally Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/06-configuration.md Install the dexpaprika-mcp tool globally to run it as a command. Alternatively, use npx to run it without a global installation. ```bash npm install -g dexpaprika-mcp dexpaprika-mcp ``` ```bash npx dexpaprika-mcp ``` -------------------------------- ### Install via Smithery Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/README.md Automated installation command for Claude Desktop using the Smithery CLI. ```bash npx -y @smithery/cli install @coinpaprika/dexpaprika-mcp --client claude ``` -------------------------------- ### Install DexPaprika MCP with Smithery CLI Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/06-configuration.md Install the DexPaprika MCP server as a client for Claude Desktop integration using the Smithery CLI. ```bash npx -y @smithery/cli install @coinpaprika/dexpaprika-mcp --client claude ``` -------------------------------- ### Discovery & Setup Tools Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/README.md Tools for discovering server capabilities, network information, ecosystem statistics, and performing cross-network searches. ```APIDOC ## Discovery & Setup Tools ### Description Tools for discovering server capabilities, network information, ecosystem statistics, and performing cross-network searches. ### Methods - `getCapabilities`: Server metadata, workflows, network synonyms - `getNetworks`: List all 35 blockchains with stats - `getStats`: Ecosystem totals (chains, pools, tokens) - `search`: Cross-network search by name, symbol, address ``` -------------------------------- ### Resource Not Found Error Example Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/05-types.md Example of an error response when a requested resource cannot be found. ```javascript { error: { code: 'DP404_NOT_FOUND', message: 'Resource not found', retryable: false, suggestion: 'Verify the resource exists. Use search or list endpoints to find correct identifiers.', metadata: { endpoint: '/networks/ethereum/pools/0xINVALID' } } } ``` -------------------------------- ### Start DexPaprika MCP Server (Default Port) Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/06-configuration.md Start the DexPaprika MCP server using the command line. The server defaults to using stdio (JSON-RPC over stdin/stdout) and does not require a port number. ```bash # Start the server on default port (stdio) dexpaprika-mcp # No port number needed — MCP uses stdio (JSON-RPC over stdin/stdout) ``` -------------------------------- ### Executable Entry Point Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/07-architecture.md The `src/bin.js` file serves as the executable entry point for the dexpaprika-mcp command-line tool. It imports the main module to make the command available after installation. ```javascript #!/usr/bin/env node import './index.js'; ``` -------------------------------- ### Install DexPaprika MCP Globally via npm Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/06-configuration.md Install the DexPaprika MCP server globally using npm. This allows you to run the server directly from the command line. ```bash npm install -g dexpaprika-mcp ``` -------------------------------- ### Get Token Details for Jupiter on Solana Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/03-tools-tokens.md Retrieves detailed metadata for the Jupiter token on the Solana network. This example demonstrates how to call the `getTokenDetails` tool with the appropriate network and token address. ```javascript const result = await client.callTool('getTokenDetails', { rationale: 'User asked for Jupiter price and details; fetching token metadata.', network: 'solana', token_address: 'JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN' }); const token = result.structuredContent; console.log(`Token: ${token.name} (${token.symbol})`); console.log(`Decimals: ${token.decimals}`); console.log(`Total Supply: ${token.total_supply} (type: ${typeof token.total_supply})`); console.log(`Added to DexPaprika: ${token.added_at}`); console.log(`Website: ${token.website || 'N/A'}`); ``` -------------------------------- ### Server Startup Log Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/06-configuration.md Logs a message to stderr when the DexPaprika MCP server starts. This is a standard informational log. ```javascript console.error('DexPaprika MCP server (v2.0.0) is running...'); ``` -------------------------------- ### DexPaprika MCP Server Startup Output Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/06-configuration.md The expected output message when the DexPaprika MCP server starts successfully. This message is written to stderr. ```bash DexPaprika MCP server (v2.0.0) is running... ``` -------------------------------- ### Verify DexPaprika MCP Installation Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/06-configuration.md Verify that the DexPaprika MCP server has been installed globally by checking its version. ```bash dexpaprika-mcp --version ``` -------------------------------- ### Get Server Capabilities and Workflows Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/08-examples.md Retrieves server capabilities, including network synonyms, common workflows, and potential pitfalls. Useful for agent onboarding and understanding server functionalities. ```javascript const caps = await client.callTool('getCapabilities', { rationale: 'Agent onboarding; fetching server capabilities and best practices.' }); const { network_synonyms, workflows, common_pitfalls } = caps.structuredContent; console.log('Supported Networks:'); Object.entries(network_synonyms).slice(0, 5).forEach(([canonical, aliases]) => { console.log(` ${canonical}: ${aliases.slice(0, 3).join(', ')}, ...`); }); console.log('\nCommon Workflows:'); Object.entries(workflows).slice(0, 3).forEach(([name, steps]) => { console.log(` ${name}: ${steps.join(' → ')}`); }); console.log('\nPitfalls:'); common_pitfalls.forEach(p => console.log(` ⚠️ ${p}`)); ``` -------------------------------- ### Run DexPaprika MCP via npx Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/06-configuration.md Execute the DexPaprika MCP server directly using npx without a global installation. This is a convenient way to run the server quickly. ```bash npx dexpaprika-mcp ``` -------------------------------- ### Get Token Details and Pools (Solana) Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/08-examples.md Fetches comprehensive details and liquidity pool information for a given token address on the Solana network. Useful for in-depth token analysis. ```javascript const jupiterAddress = 'JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN'; const tokenDetails = await client.callTool('getTokenDetails', { rationale: 'User asked for Jupiter token; fetching comprehensive details.', network: 'solana', token_address: jupiterAddress }); const token = tokenDetails.structuredContent; console.log(`${token.name} (${token.symbol})`); console.log(`Address: ${token.id}`); console.log(`Decimals: ${token.decimals}`); console.log(`Total Supply: ${token.total_supply}`); console.log(`Website: ${token.website}`); console.log(`Added: ${new Date(token.added_at).toLocaleDateString()}`); // Get all pools for this token const pools = await client.callTool('getTokenPools', { rationale: 'Analyzing liquidity; fetching all pools for Jupiter token.', network: 'solana', token_address: jupiterAddress, limit: 10, sort_by: 'volume_usd', sort_dir: 'desc' }); console.log(`\nTop 10 ${token.symbol} pools:`); pools.structuredContent.pools.forEach((pool, i) => { const otherToken = pool.tokens.find(t => t.id !== jupiterAddress); console.log(`${i + 1}. ${token.symbol}/${otherToken.symbol} on ${pool.dex_name}`); }); ``` -------------------------------- ### Get All Networks and Sort by Volume Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/01-tools-discovery.md Fetches all supported blockchain networks and identifies the top 5 by 24-hour trading volume. Requires a rationale string explaining the purpose of the call. ```javascript // Get all networks and find the one with highest 24h volume const result = await client.callTool('getNetworks', { rationale: 'User asked for the most active blockchain; fetching network stats to rank by 24h volume.' }); const networks = result.structuredContent.networks; const byVolume = networks.sort((a, b) => b.volume_usd_24h - a.volume_usd_24h); console.log(`Top 5 networks by 24h volume:`); byVolume.slice(0, 5).forEach(net => { console.log(` ${net.display_name} (${net.id}): $${net.volume_usd_24h.toLocaleString()} / ${net.txns_24h} txns / ${net.pools_count} pools`); }); ``` -------------------------------- ### Get Daily OHLCV for 30 Days Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/02-tools-pools.md Fetches 30 days of daily OHLCV data for a specified pool. Ensure the start date is formatted correctly. ```javascript const thirtyDaysAgo = new Date(); thirtyDaysAgo.setDate(thirtyDaysAgo.getDate() - 30); const startDate = thirtyDaysAgo.toISOString().split('T')[0]; // 'YYYY-MM-DD' const result = await client.callTool('getPoolOHLCV', { rationale: 'Analyzing WETH 30-day price trend; fetching daily candles.', network: 'ethereum', pool_address: '0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640', start: startDate, interval: '24h', limit: 30 }); console.log(`WETH/USDC daily prices (last 30 days):`); result.structuredContent.ohlcv.forEach(row => { const date = new Date(row.time_open); console.log(`${date.toLocaleDateString()}: O $${row.open} H $${row.high} L $${row.low} C $${row.close}`); }); ``` -------------------------------- ### Generate Portfolio Dashboard Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/08-examples.md This example demonstrates how to generate a portfolio dashboard by fetching network context, token prices, and calculating the value of holdings. It assumes Ethereum as the network and limits token price fetches to 10 per call. ```javascript async function generatePortfolioDashboard(holdings) { // holdings: { [tokenAddress]: amount } console.log('=== PORTFOLIO DASHBOARD ===\n'); // Get network-wide context const networks = await client.callTool('getNetworks', { rationale: 'Portfolio dashboard; getting ecosystem context.' }); const topNet = networks.structuredContent.networks .sort((a, b) => b.volume_usd_24h - a.volume_usd_24h)[0]; console.log(`Top network: ${topNet.display_name} ($${topNet.volume_usd_24h.toLocaleString()} volume)\n`); // Fetch prices for all holdings (assuming Ethereum for this example) const addresses = Object.keys(holdings).slice(0, 10); // Max 10 per call const prices = await client.callTool('getTokenMultiPrices', { rationale: 'Portfolio dashboard; calculating current position values.', network: 'ethereum', tokens: addresses }); let totalValue = 0; console.log('Position Values:'); console.log('─────────────────────────────────'); prices.structuredContent.prices.forEach((entry, i) => { const addr = addresses[i]; const amount = holdings[addr]; if (entry.price_usd !== null) { const value = amount * entry.price_usd; totalValue += value; const pct = (value / 100000) * 100; // Assume $100k total const bar = '█'.repeat(Math.round(pct / 5)) + '░'.repeat(20 - Math.round(pct / 5)); console.log(`${entry.id.slice(0, 6)}...`); console.log(` Amount: ${amount}`); console.log(` Price: $${entry.price_usd.toFixed(2)}`); console.log(` Value: $${value.toLocaleString()}`); console.log(` ${bar} ${pct.toFixed(1)}%`); } }); console.log('─────────────────────────────────'); console.log(`Total Portfolio Value: $${totalValue.toLocaleString()}`); } // Usage await generatePortfolioDashboard({ '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2': 10, // 10 WETH '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48': 50000, // 50k USDC }); ``` -------------------------------- ### Get Token Details for WETH on Ethereum Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/03-tools-tokens.md Fetches metadata for Wrapped Ether (WETH) on the Ethereum network. This example shows how to use `getTokenDetails` for a common token on a different blockchain. ```javascript // WETH on Ethereum const wethResult = await client.callTool('getTokenDetails', { rationale: 'Portfolio analysis; fetching WETH details on Ethereum.', network: 'ethereum', token_address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' }); ``` -------------------------------- ### Get Pool OHLCV Data Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/README.md Fetch historical OHLCV (Open, High, Low, Close, Volume) candle data for a specific pool. Requires network, pool address, start date, and interval. Limited to a 1-year range per request; use pagination for longer periods. ```javascript const ohlcvData = await getPoolOHLCV({ network: "ethereum", pool_address: "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640", start: "2023-01-01", interval: "24h", limit: 30 }); ``` -------------------------------- ### Initialize DexPaprika MCP Server Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/07-architecture.md Initializes the DexPaprika MCP server with metadata and instructions, then connects to the StdioServerTransport to begin processing JSON-RPC requests. Includes error handling for startup failures. ```javascript const server = new McpServer( { name: 'dexpaprika', version: SERVER_VERSION }, { instructions: SERVER_INSTRUCTIONS }, ); async function main() { try { const transport = new StdioServerTransport(); await server.connect(transport); console.error('DexPaprika MCP server (v2.0.0) is running...'); } catch (error) { console.error('Failed to start server:', error); process.exit(1); } } main(); ``` -------------------------------- ### Rate Limit Error Example Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/05-types.md Example of an error response when the rate limit has been exceeded. ```javascript { error: { code: 'DP429_RATE_LIMIT', message: 'Daily rate limit exceeded', retryable: true, suggestion: 'Wait until rate limit resets or use cached data', metadata: { reset_at: '2024-01-02T00:00:00.000Z', retry_after_seconds: 3600 } } } ``` -------------------------------- ### Invalid Network Error Example Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/05-types.md Example of an error response for an unrecognized network ID. ```javascript { error: { code: 'DP400_INVALID_NETWORK', message: "Network ID 'eth5' not recognized", retryable: true, suggestion: "Use normalized network ID from getNetworks. Call getCapabilities for network_synonyms.", corrected_example: "getNetworkPools('ethereum', 10)", metadata: { provided: 'eth5', suggested: 'ethereum', valid_networks: ['ethereum', 'bsc', 'polygon', ...] } } } ``` -------------------------------- ### Check Node Version and Dependencies Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/06-configuration.md Verify your Node.js version is 18 or higher and reinstall dependencies if issues arise. Rebuilding from source may also resolve startup problems. ```bash node --version ``` ```bash npm install ``` ```bash npm run build ``` -------------------------------- ### Claude Desktop macOS Configuration (global install) Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/06-configuration.md Configure DexPaprika MCP for Claude Desktop on macOS using a global installation. Add this to ~/Library/Application Support/Claude/claude_desktop_config.json. ```json { "mcpServers": { "dexpaprika": { "command": "dexpaprika-mcp" } } } ``` -------------------------------- ### MCP Data Flow Example Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/07-architecture.md Illustrates the request lifecycle within the dexpaprika-mcp system, including client-server interaction, handler logic, API calls, and response formatting. This flow is typical for tools like getNetworkPools. ```text 1. MCP client sends JSON-RPC: { jsonrpc: '2.0', id: 1, method: 'tools/call', params: { name: 'getNetworkPools', arguments: { network: 'eth', ... } } } 2. McpServer dispatches to registered handler 3. Handler receives { network: 'eth', limit: 10, rationale: '...' } → Validates against inputSchema (rationale must be 20–500 chars, network must be string) 4. Handler logic: const endpoint = `/networks/${network}/pools?page=1&limit=10&...`; → Calls fetchFromAPI(endpoint) 5. fetchFromAPI: → normalizeNetworkPath('/networks/eth/pools?...') → '/networks/ethereum/pools?...' → Fetches from https://api.dexpaprika.com/networks/ethereum/pools?... → Parses JSON response 6. Handler wraps response: jsonText(upstream, 'pools') → Returns { content: [...], structuredContent: { pools: [...] } } 7. McpServer validates structuredContent against outputSchema 8. MCP client receives: { jsonrpc: '2.0', id: 1, result: { content: [...], structuredContent: {...} } } 9. Client reads structuredContent.pools (modern) or parses content[0].text (legacy) ``` -------------------------------- ### Error Handling Example Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/04-tools-misc.md Demonstrates how to handle errors returned from tool calls. Errors are not thrown but returned within the response content. It's recommended to check for structured content errors when available. ```javascript const response = await client.callTool('getPoolDetails', { rationale: 'Analyzing pool; fetching details.', network: 'eth', pool_address: '0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640' }); if (response.content[0].text.includes('error')) { const error = JSON.parse(response.content[0].text); console.error(`Error: ${error.error.code}`); console.error(`Message: ${error.error.message}`); console.error(`Suggestion: ${error.error.suggestion}`); if (error.error.retryable) { // Retry with backoff } } // Better: use structuredContent when available if (response.structuredContent?.error) { const err = response.structuredContent.error; // handle... } ``` -------------------------------- ### Get Token Details Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/README.md Retrieve detailed information for a specific token on a given network. Requires network and token address. ```javascript const solanaJupToken = await getTokenDetails({ network: "solana", token_address: "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN" }); ``` -------------------------------- ### Submit Feedback on Documentation or Usability Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/04-tools-misc.md Use this for suggestions regarding documentation clarity or tool usability. Specify the goal, what was unclear, and your expectation for improvement. ```javascript const feedback3 = await client.callTool('submitFeedback', { goal: 'Understand which time formats are accepted by getPoolOHLCV.', blocked_at: 'Documentation mentions "RFC3339 recommended" but not clear if UNIX ms also works.', expected: 'Clear, concise format examples in tool description.', observed: 'Had to read server instructions to figure out YYYY-MM-DD works.', severity: 'nit' }); ``` -------------------------------- ### Paginate Through Ethereum Pools Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/02-tools-pools.md Demonstrates how to fetch a subsequent page of liquidity pool data, specifically the second page with 20 items per page, sorted by the number of transactions. This is useful for exploring beyond the initial results. ```javascript // Pagination example const page2 = await client.callTool('getNetworkPools', { rationale: 'Fetching second page of Ethereum pools.', network: 'ethereum', page: 2, limit: 20, sort_by: 'transactions' }); console.log(`Page ${page2.structuredContent.page_info.page} of ${page2.structuredContent.page_info.total_pages}`); ``` -------------------------------- ### getCapabilities Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/01-tools-discovery.md Returns server metadata, network synonyms, workflow patterns, and best-practice sequences. This is a purely local operation and does not make an upstream API call. ```APIDOC ## getCapabilities ### Description Returns server metadata, network synonyms, workflow patterns, and best-practice sequences. No upstream API call—purely local. ### Method `getCapabilities()` ### Parameters No parameters required. ### Return Type - `name` (string) - Server canonical name: `'dexpaprika'` - `aliases` (string[]) - Common misspellings/variations agents might try: `['dexpapika', 'dexpaprica', 'dex-paprika', 'dex paprika']` - `server.name` (string) - Display name: `'DexPaprika MCP'` - `server.version` (string) - Version: `'2.0.0'` - `tools_count` (number) - Total tools: `17` - `stats.networks` (number) - Count: `35` - `stats.tokens_approx` (number) - Approx: `29,000,000` - `stats.pools_approx` (number) - Approx: `31,000,000` - `stats.free` (boolean) - No payment required: `true` - `stats.requires_api_key` (boolean) - Authentication needed: `false` - `network_synonyms` (Record) - Map of canonical network ID → accepted aliases (e.g., `ethereum: ['ethereum', 'eth', 'mainnet', ...]`). - `workflows` (Record) - Named tool sequences: `discover_networks`, `find_pools_on_network`, `filter_pools_by_volume`, `find_new_pools`, `token_details_and_pools`, `batch_price_lookup`, `top_tokens_on_network`, `filter_tokens_by_metrics`, `historical_price_chart`, `recent_swaps`, `cross_network_search`. - `common_pitfalls` (string[]) - Known edge cases: `/pools (global) returns 410 Gone — use /networks/{network}/pools instead`. - `documentation` (string) - URL: `'https://docs.dexpaprika.com'` - `agent_skills` (string) - URL: `'https://dexpaprika.com/agents/skill.md'` ### Example ```javascript // Start by understanding server capabilities const caps = await client.callTool('getCapabilities', { rationale: 'User asked for help exploring DEX data; fetching server metadata and workflow guides.' }); console.log(`Connected to ${caps.structuredContent.server.name} v${caps.structuredContent.server.version}`); console.log(`Supported networks: ${caps.structuredContent.stats.networks}`); console.log('Network synonyms:'); for (const [canonical, aliases] of Object.entries(caps.structuredContent.network_synonyms)) { console.log(` ${canonical}: ${aliases.join(', ')}`); } ``` ### Notes - **Alias support**: The `aliases` array documents what the server will accept if agents mistype the server name. The server name is `'dexpaprika'` (canonical). - **Network synonyms**: This map drives the wire-layer normalization in `normalizeNetwork()`. Agents can use any of the listed aliases and they will resolve to the canonical form. - **Workflow patterns**: These are human-readable sequences (not executable code)—e.g., `discover_networks: ['getNetworks']` or `filter_pools_by_volume: ['getNetworks', 'getNetworkPoolsFilter']`. - **Rate limits**: The capabilities payload explicitly notes that the service is free with no rate limiting enforced (though the real API has soft limits: 10,000 requests/day free tier). ``` -------------------------------- ### Get Top Pools for a Token Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/03-tools-tokens.md Finds the top liquidity pools for a specific token, sorted by USD volume. Requires network and token address. ```javascript const result = await client.callTool('getTokenPools', { rationale: 'User analyzing token liquidity; fetching all pools containing this token.', network: 'ethereum', token_address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', // WETH limit: 10, sort_by: 'volume_usd', sort_dir: 'desc' }); console.log(`Top 10 WETH pools by volume:`); result.structuredContent.pools.forEach((pool, i) => { const otherToken = pool.tokens.find(t => t.id !== '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'); console.log(`${i + 1}. WETH/${otherToken.symbol} on ${pool.dex_name}`); }); ``` -------------------------------- ### Get Server Capabilities Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/01-tools-discovery.md Fetches server metadata, network synonyms, workflow patterns, and best-practice sequences. This is a local operation with no upstream API calls. ```javascript const caps = await client.callTool('getCapabilities', { rationale: 'User asked for help exploring DEX data; fetching server metadata and workflow guides.' }); console.log(`Connected to ${caps.structuredContent.server.name} v${caps.structuredContent.server.version}`); console.log(`Supported networks: ${caps.structuredContent.stats.networks}`); console.log('Network synonyms:'); for (const [canonical, aliases] of Object.entries(caps.structuredContent.network_synonyms)) { console.log(` ${canonical}: ${aliases.join(', ')}`); } ``` -------------------------------- ### Hosted Alternative: Streamable HTTP Configuration Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/06-configuration.md Configure DexPaprika MCP to use the hosted Streamable HTTP server. This is the recommended zero-setup deployment option. ```json { "mcpServers": { "dexpaprika": { "type": "streamable-http", "url": "https://mcp.dexpaprika.com/streamable-http" } } } ``` -------------------------------- ### Register a New Tool Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/07-architecture.md Use this function to register a new tool with its name, description, parameter schema, and handler function. Ensure parameters are defined using Zod schemas. ```javascript registerReadTool( 'newToolName', 'Description...', { param1: z.string(), param2: z.number().optional() }, async (args) => { const result = await fetchFromAPI(`/new/endpoint?...`); return jsonText(result); } ); ``` -------------------------------- ### Get Network Pools Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/README.md Retrieve the top liquidity pools on a specified network, with options for sorting and limiting results. Requires network and optional sorting/limiting parameters. ```javascript const ethereumPools = await getNetworkPools({ network: "ethereum", order_by: "volume_usd", limit: 10 }); ``` -------------------------------- ### npm Scripts Configuration Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/06-configuration.md Defines the available npm scripts for building, testing, and running the project. ```json { "build": "mkdir -p dist && cp -r src/* dist/ && chmod +x dist/bin.js", "start": "node src/index.js", "watch": "nodemon --watch src --exec npm start", "test": "node src/test.js", "test:api": "node src/test_methods.js", "test:mcp": "node src/test_mcp_client.js" } ``` -------------------------------- ### List All Networks and Stats Source: https://github.com/coinpaprika/dexpaprika-mcp/blob/main/_autodocs/08-examples.md Fetches and displays global ecosystem statistics and details for all available blockchain networks. Use this to get an overview of the DexPaprika ecosystem's activity. ```javascript const networks = await client.callTool('getNetworks', { rationale: 'User wants to explore all available blockchains and their activity levels.' }); const stats = await client.callTool('getStats', { rationale: 'Displaying ecosystem dashboard; fetching global statistics.' }); console.log(`DexPaprika Ecosystem (v${stats.structuredContent.version})`); console.log(`Networks: ${stats.structuredContent.chains}`); console.log(`Pools: ${stats.structuredContent.pools.toLocaleString()}`); console.log(`Tokens: ${stats.structuredContent.tokens.toLocaleString()}`); console.log('\nTop 5 networks by 24h volume:'); const sorted = networks.structuredContent.networks .sort((a, b) => b.volume_usd_24h - a.volume_usd_24h) .slice(0, 5); sorted.forEach((net, i) => { console.log(`${i + 1}. ${net.display_name} (${net.id})`); console.log(` Volume: $${net.volume_usd_24h.toLocaleString()}`); console.log(` Pools: ${net.pools_count}, Txns: ${net.txns_24h}`); }); ```