Skip to main content
Glama
noahgsolomon

Pump.fun MCP Server

by noahgsolomon

get-token-info

Retrieve detailed information about a Pump.fun token by entering its mint address using the tool on the Pump.fun MCP Server. Simplify token data access for Solana-based assets.

Instructions

Get information about a Pump.fun token

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenAddressYesThe token's mint address

Implementation Reference

  • Core handler function that initializes SDK, fetches bonding curve account for the token, computes supply, and returns token info.
    export async function getTokenInfo(tokenAddress: string) {
      const { sdk } = initializeSDK();
      console.log("SDK initialized");
    
      const mintPublicKey = new PublicKey(tokenAddress);
      console.log("Getting bonding curve account...");
      const bondingCurveAccount = await sdk.getBondingCurveAccount(mintPublicKey);
    
      if (!bondingCurveAccount) {
        console.log(`No token found with address ${tokenAddress}`);
        return null;
      }
    
      const tokenTotalSupply = (bondingCurveAccount as any).tokenTotalSupply;
      const formattedSupply = tokenTotalSupply
        ? Number(tokenTotalSupply) / Math.pow(10, DEFAULT_DECIMALS)
        : "Unknown";
    
      return {
        tokenAddress,
        bondingCurveAccount,
        formattedSupply,
        pumpfunUrl: `https://pump.fun/${tokenAddress}`,
      };
    }
  • src/index.ts:56-96 (registration)
    Registers the 'get-token-info' tool with MCP server, defines input schema, and provides wrapper handler that calls core getTokenInfo function.
    server.tool(
      "get-token-info",
      "Get information about a Pump.fun token",
      {
        tokenAddress: z.string().describe("The token's mint address"),
      },
      async ({ tokenAddress }, extra) => {
        try {
          console.error(`Checking token info for: ${tokenAddress}`);
    
          const tokenInfo = await getTokenInfo(tokenAddress);
    
          if (!tokenInfo) {
            return {
              content: [
                {
                  type: "text" as const,
                  text: `No token found with address ${tokenAddress}`,
                },
              ],
            };
          }
    
          const formattedInfo = formatTokenInfo(tokenInfo);
    
          return createMcpResponse(formattedInfo);
        } catch (error: any) {
          console.error("Error getting token info:", error);
          return {
            content: [
              {
                type: "text" as const,
                text: `Error getting token info: ${
                  error?.message || "Unknown error"
                }`,
              },
            ],
          };
        }
      }
    );
  • Zod input schema for the tool requiring 'tokenAddress' as a string.
      tokenAddress: z.string().describe("The token's mint address"),
    },
  • Helper function to initialize PumpFunSDK and Solana connection using environment RPC URL.
    export function initializeSDK() {
      const rpcUrl = process.env.HELIUS_RPC_URL;
      if (!rpcUrl) {
        throw new Error("HELIUS_RPC_URL environment variable is not set");
      }
    
      const connection = new Connection(rpcUrl);
      const provider = new AnchorProvider(
        connection,
        {
          publicKey: new PublicKey("11111111111111111111111111111111"),
          signTransaction: async () => {
            throw new Error("Not implemented");
          },
          signAllTransactions: async () => {
            throw new Error("Not implemented");
          },
        },
        { commitment: "confirmed" }
      );
    
      return {
        sdk: new PumpFunSDK(provider),
        connection,
      };
    }
  • Helper to format token info into a readable string.
    export function formatTokenInfo(
      tokenInfo: ReturnType<typeof getTokenInfo> extends Promise<infer T>
        ? NonNullable<T>
        : never
    ) {
      return [
        `Token: ${tokenInfo.tokenAddress}`,
        `Supply: ${tokenInfo.formattedSupply}`,
        `Pump.fun URL: ${tokenInfo.pumpfunUrl}`,
      ].join("\n");
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is a read operation ('Get information'), which implies it's likely safe and non-destructive, but doesn't address potential rate limits, authentication needs, error conditions, or what specific information is returned. This leaves significant gaps for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any unnecessary words. It's perfectly front-loaded and every word earns its place, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is insufficiently complete. It doesn't explain what information is returned (e.g., price, liquidity, creator), how errors are handled, or any behavioral constraints. For a tool with no structured data beyond the input schema, this leaves too many unknowns for reliable agent operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with the single parameter 'tokenAddress' clearly documented in the schema as 'The token's mint address'. The description doesn't add any additional parameter context beyond what the schema provides, so it meets the baseline for adequate but not exceptional coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get information') and target resource ('about a Pump.fun token'), making the purpose immediately understandable. However, it doesn't differentiate from potential sibling tools like 'get-account-balance' that might also retrieve information, so it doesn't reach the highest score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'get-account-balance' or 'list-accounts'. There's no mention of prerequisites, context, or exclusions, leaving the agent to infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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/noahgsolomon/pumpfun-mcp-server'

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