Skip to main content
Glama
openSVM

DexScreener MCP Server

by openSVM

search_pairs

Find cryptocurrency trading pairs on decentralized exchanges by entering a search query to access real-time market data across multiple blockchains.

Instructions

Search for pairs matching query

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query

Implementation Reference

  • The main handler function for the 'search_pairs' tool. It fetches search results from the DexScreener API endpoint '/latest/dex/search' using the provided query parameter, applying rate limiting.
    async searchPairs({ query }: SearchParams): Promise<DexResponse> {
      return this.fetch<DexResponse>(
        '/latest/dex/search',
        dexRateLimiter,
        { q: query }
      );
    }
  • TypeScript type definition for the input parameters of the search_pairs tool, specifying the required 'query' string.
    export type SearchParams = {
      query: string;
    };
  • JSON schema definition for the search_pairs tool provided in the ListTools MCP handler, matching the SearchParams type.
    {
      name: 'search_pairs',
      description: 'Search for pairs matching query',
      inputSchema: {
        type: 'object',
        properties: {
          query: {
            type: 'string',
            description: 'Search query',
          },
        },
        required: ['query'],
      },
    },
  • src/index.ts:337-341 (registration)
    Registration and dispatch logic in the CallTool MCP handler switch statement, which extracts arguments and delegates to the dexService.searchPairs method.
    case 'search_pairs': {
      const args = request.params.arguments as { query: string };
      result = await this.dexService.searchPairs(args);
      break;
    }
  • src/index.ts:282-295 (registration)
    Tool registration in the ListTools MCP handler response, listing the search_pairs tool with its schema and description.
    {
      name: 'search_pairs',
      description: 'Search for pairs matching query',
      inputSchema: {
        type: 'object',
        properties: {
          query: {
            type: 'string',
            description: 'Search query',
          },
        },
        required: ['query'],
      },
    },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/openSVM/dexscreener-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server