get_coin_info
Retrieve detailed coin information using its mint ID through the Pump Fun Data MCP Server. Access essential data for analysis and decision-making.
Instructions
Get information about a coin
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mintId | Yes | The mint id of the coin(coin address) |
Implementation Reference
- index.ts:102-110 (handler)Handler logic for the 'get_coin_info' tool. Constructs the pump.fun API URL using the provided mintId argument and fetches the coin data, returning it as a JSON string in the tool result.case "get_coin_info": url = PUMP_FUN_API_URL+'/coins/'+args.mintId; return { content: [{ type: "text", text: JSON.stringify((await fetchPumpFunData(url, {}))) }], isError: false, };
- index.ts:43-53 (schema)Schema definition for the 'get_coin_info' tool, specifying the required 'mintId' input parameter.{ name: "get_coin_info", description: "Get information about a coin", inputSchema: { type: "object", properties: { mintId: { type: "string", description: "The mint id of the coin(coin address)" }, }, required: ["mintId"], }, }
- index.ts:148-150 (registration)Registration of the ListTools handler, which exposes the 'get_coin_info' tool via the TOOLS array.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS, }));
- index.ts:152-154 (registration)Registration of the CallTool handler, which dispatches to the specific tool handler based on name, including 'get_coin_info'.server.setRequestHandler(CallToolRequestSchema, async (request) => handleToolCall(request.params.name, request.params.arguments ?? {}) );
- index.ts:56-74 (helper)Helper function used by the get_coin_info handler (and others) to fetch data from the pump.fun API with appropriate headers.async function fetchPumpFunData(url: string, params: any) { const headers = { 'accept': '*/*', 'accept-language': 'en-US,en;q=0.9', 'content-type': 'application/json', 'origin': 'https://pump.fun', 'priority': 'u=1, i', 'referer': 'https://pump.fun/', 'sec-ch-ua': '"Chromium";v="134", "Not:A-Brand";v="24", "Google Chrome";v="134"', 'sec-ch-ua-mobile': '?0', 'sec-ch-ua-platform': '"macOS"', 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36' }; const response = await axios.get(url, { params, headers }); if (response.status !== 200 || !response.data) { throw new Error(`Failed to fetch data: ${response.status}`); } return response.data; }