Skip to main content
Glama

pumpfun-mcp

A Model Context Protocol (MCP) server for interacting with the Pump.fun platform on Solana. This server enables AI assistants to create, buy, and sell tokens on the Pump.fun platform.

Usage

https://github.com/user-attachments/assets/0b0f1f6f-6ea6-4ca8-92a8-b4cc895814e4

To use this server with Claude or other MCP-compatible AI assistants, add the following configuration to your MCP client:

If you're on MacOS and want to run this in Claude Desktop, in your ~/Library/Application \Support/Claude/claude_desktop_config.json file, write the following:

{
  "mcpServers": {
    "pumpfun": {
      "command": "node",
      "args": ["/Users/noahsolomon/Desktop/pumpfun-mcp/build/index.js"], // note this should be YOUR absolute path to index.js, not mine.
      "env": {
        "HELIUS_RPC_URL": "https://your-helius-rpc-url.com"
      }
    }
  }
}

Replace https://your-helius-rpc-url.com with your Helius RPC URL.

Related MCP server: RefundYourSOL

Installation

  1. Clone this repository:

    git clone https://github.com/noahgsolomon/pumpfun-mcp.git
    cd pumpfun-mcp
  2. Install dependencies:

    npm install
  3. Create a .env file with your Solana RPC URL:

    HELIUS_RPC_URL=https://your-helius-rpc-url.com

    You can get a free RPC URL from Helius.

    To use an existing Solana wallet, add your private key to the .env file:

    PRIVATE_KEY=your-base58-encoded-private-key

    Then run the conversion script to create a keypair file:

    node convert-key.js

    This will create a default.json file in the .keys folder with your keypair.

  4. Build the project:

    npm run build
  5. Run the MCP server:

    node build/index.js

Components

Tools

  • get-token-info

    • Get information about a Pump.fun token

    • Input parameters:

      • tokenAddress (string, required): The token's mint address

  • create-token

    • Create a new Pump.fun token

    • Input parameters:

      • name (string, required): Token name

      • symbol (string, required): Token symbol

      • description (string, required): Token description

      • imageUrl (string, optional): Path to local image file

      • initialBuyAmount (number, required): Initial buy amount in SOL (min 0.0001)

      • accountName (string, optional): Name of the account to use (defaults to "default")

  • buy-token

    • Buy a Pump.fun token

    • Input parameters:

      • tokenAddress (string, required): The token's mint address

      • buyAmount (number, required): Amount to buy in SOL (min 0.0001)

      • accountName (string, optional): Name of the account to use (defaults to "default")

      • slippageBasisPoints (number, optional): Slippage tolerance in basis points (defaults to 100)

  • sell-token

    • Sell a Pump.fun token

    • Input parameters:

      • tokenAddress (string, required): The token's mint address

      • sellAmount (number, required): Amount of tokens to sell (use 0 to sell all)

      • accountName (string, optional): Name of the account to use (defaults to "default")

      • slippageBasisPoints (number, optional): Slippage tolerance in basis points (defaults to 100)

  • list-accounts

    • List all accounts in the keys folder

    • No input parameters required

  • get-account-balance

    • Get the SOL and token balances for an account

    • Input parameters:

      • accountName (string, optional): Name of the account to check (defaults to "default")

      • tokenAddress (string, optional): Token address to check balance for

Account Management

The MCP automatically creates and manages Solana keypairs in the .keys folder. Each keypair is stored as a JSON file with the account name as the filename.

When creating a token, the mint keypair is also saved in the .keys folder with the prefix mint-.

To use the MCP with your own account, you need to:

  1. Add your private key to the .env file and run node convert-key.js

  2. Have sufficient SOL in that wallet

Standalone Scripts

The project includes several standalone scripts that can be run directly:

  • Get Token Info: node build/get-token-info.js <token_address>

  • Create Token: node build/create-token.js <name> <symbol> <description> <initial_buy_amount> [account_name] [image_url]

  • Buy Token: node build/buy-token.js <token_address> <buy_amount_sol> [account_name] [slippage_basis_points]

  • Sell Token: node build/sell-token.js <token_address> <sell_amount> [account_name] [slippage_basis_points]

  • List Accounts: node build/list-accounts.js

  • Get Account Balance: node build/get-token-balance.js <account_name> [token_address]

Important Notes

  • Security: The keypairs are stored unencrypted in the .keys folder. Make sure to secure this folder appropriately.

  • Fees: All transactions on Solana require SOL for transaction fees. Make sure your accounts have enough SOL.

  • Slippage: The default slippage tolerance is 1% (100 basis points). You can adjust this for each transaction.

  • Images: When creating tokens with images, you must provide a local file path to the image. Remote URLs are not supported.

Development

Project Structure

  • src/index.ts: Main MCP server entry point

  • src/get-token-info.ts: Token information retrieval

  • src/create-token.ts: Token creation functionality

  • src/buy-token.ts: Token buying functionality

  • src/sell-token.ts: Token selling functionality

  • src/list-accounts.ts: Account listing functionality

  • src/get-token-balance.ts: Account balance checking

  • src/utils.ts: Shared utility functions

  • convert-key.js: Utility to convert a base58 private key to a keypair JSON file

Building

npm run build

Available Tools

6 tools
buy-tokenC

Buy a Pump.fun token

ParametersJSON Schema
NameRequiredDescriptionDefault
tokenAddressYesThe token's mint address
buyAmountYesAmount to buy in SOL
accountNameNoName of the account to usedefault
slippageBasisPointsNoSlippage tolerance in basis points (1% = 100)

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Buy' implies a financial transaction with real-world consequences, but the description doesn't mention critical behaviors: that this likely spends real SOL, requires wallet authorization, may have transaction fees, or what happens on failure. For a financial tool with zero annotation coverage, this is a significant gap in safety and operational transparency.

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 states the core purpose without any wasted words. It's appropriately sized for a tool with a clear primary function and doesn't bury important information. Every word earns its place in communicating the essential action.

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?

For a financial transaction tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what the tool returns (transaction hash? success status?), error conditions, authorization requirements, or financial implications. The combination of high-stakes operation with minimal behavioral disclosure creates significant gaps for an AI agent.

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?

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema. The baseline score of 3 reflects adequate parameter documentation through the schema alone, with no value added by the description.

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 ('Buy') and target resource ('a Pump.fun token'), making the purpose immediately understandable. It distinguishes from siblings like 'sell-token' by specifying the opposite action, but doesn't differentiate from 'create-token' which is also a token-related operation. The description is specific enough to understand what the tool does without being tautological.

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. It doesn't mention prerequisites (like needing sufficient SOL balance), when not to use it (e.g., for tokens that aren't on Pump.fun), or how it relates to sibling tools like 'sell-token' or 'create-token'. The agent must infer usage context 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.

create-tokenC

Create a new Pump.fun token

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesToken name
symbolYesToken symbol
descriptionYesToken description
imageUrlNoURL to token image (optional)
initialBuyAmountYesInitial buy amount in SOL
accountNameNoName of the account to use (will be created if it doesn't exist)default

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states 'Create' which implies a write/mutation operation, but doesn't mention critical behaviors: whether this requires authentication, consumes SOL (implied by 'initialBuyAmount' but not explicitly stated), has rate limits, or what happens on success/failure. For a token creation tool with zero annotation coverage, this leaves significant gaps.

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 states exactly what the tool does without any wasted words. It's appropriately sized for a creation tool and front-loads the core purpose immediately.

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?

For a token creation tool with no annotations and no output schema, the description is inadequate. It doesn't explain what happens after creation (e.g., returns token address, triggers transactions), doesn't mention SOL cost implications beyond the parameter name, and provides no error handling context. The combination of mutation operation + financial implications + no structured behavioral data requires more descriptive coverage.

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?

Schema description coverage is 100%, so the schema already documents all 6 parameters thoroughly. The description adds no additional parameter information beyond what's in the schema. This meets the baseline of 3 since the schema does the heavy lifting, but the description doesn't compensate with any extra context about parameter relationships or usage.

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 ('Create') and resource ('new Pump.fun token'), making the purpose immediately understandable. It distinguishes from siblings like 'buy-token' or 'sell-token' by focusing on creation rather than trading operations. However, it doesn't specify what kind of token creation this is (e.g., minting vs. deployment), which prevents a perfect 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. It doesn't mention prerequisites (e.g., needing SOL balance), when not to use it, or how it relates to sibling tools like 'buy-token' or 'get-token-info'. The agent must 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.

get-account-balanceC

Get the SOL and token balances for an account

ParametersJSON Schema
NameRequiredDescriptionDefault
accountNameNoName of the account to checkdefault
tokenAddressNoOptional token address to check balance for

TDQS

C2.9/5.0
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 what the tool does but lacks details on traits like whether it's read-only, requires authentication, has rate limits, or what the return format looks like. This is a significant gap for a tool that retrieves financial data.

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 wasted words. It is appropriately sized and front-loaded, making it easy to understand at a glance.

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 complexity of retrieving account balances (which may involve sensitive financial data), the lack of annotations and output schema means the description should do more to explain behavioral aspects. It doesn't cover return values, error conditions, or usage context, leaving gaps that could hinder an AI agent's ability to use the tool effectively.

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%, so the schema already documents both parameters ('accountName' and 'tokenAddress') with descriptions. The description adds no additional meaning beyond implying balances are retrieved, which is redundant with the tool name. Baseline 3 is appropriate as the schema does the heavy lifting.

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 verb 'Get' and the resources 'SOL and token balances for an account', making the purpose specific and understandable. However, it doesn't explicitly distinguish this tool from sibling tools like 'list-accounts' or 'get-token-info', which might also involve account or token information, so it doesn't fully differentiate from alternatives.

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. It doesn't mention when to choose 'get-account-balance' over 'list-accounts' for account-related queries or 'get-token-info' for token details, nor does it specify any prerequisites or exclusions for usage.

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

get-token-infoC

Get information about a Pump.fun token

ParametersJSON Schema
NameRequiredDescriptionDefault
tokenAddressYesThe token's mint address

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic action without disclosing behavioral traits. It doesn't mention whether this is a read-only operation, potential rate limits, authentication needs, error conditions, or what kind of information is returned, which are critical for a tool interacting with external services.

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, direct sentence with zero waste, efficiently conveying the core purpose without unnecessary elaboration. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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 complexity of interacting with a token system and the lack of annotations and output schema, the description is incomplete. It doesn't explain what information is returned, error handling, or behavioral context, leaving significant gaps for an agent to understand the tool's full 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?

Schema description coverage is 100%, with the parameter 'tokenAddress' well-documented in the schema. The description adds no additional meaning beyond what the schema provides, such as format examples or constraints, but the schema adequately covers the single parameter, meeting the baseline for high 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 resource ('about a Pump.fun token'), making the purpose immediately understandable. It doesn't specifically differentiate from siblings like 'get-account-balance' which might also retrieve information, but it's sufficiently clear about what information is being retrieved.

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. It doesn't mention prerequisites, context for usage, or how it differs from sibling tools like 'get-account-balance' or 'list-accounts', leaving the agent to infer usage scenarios.

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

list-accountsB

List all accounts in the keys folder

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'List' implies a read-only operation, it doesn't specify whether this requires authentication, what format the output takes, whether results are paginated, or any rate limits. The description is minimal and lacks important behavioral context.

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 states exactly what the tool does with zero wasted words. It's appropriately sized for a simple listing tool with no parameters and gets straight to the point without unnecessary elaboration.

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

Completeness3/5

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

For a zero-parameter listing tool with no output schema, the description provides the basic purpose but lacks important context about authentication requirements, output format, or behavioral characteristics. While simple tools need less documentation, the absence of annotations means the description should compensate more than it does.

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

Parameters4/5

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

The tool has 0 parameters with 100% schema description coverage, so the schema already fully documents the parameter situation. The description appropriately doesn't mention parameters since none exist, maintaining focus on the tool's purpose rather than parameter details.

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 ('List') and target resource ('all accounts in the keys folder'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'get-account-balance' which retrieves specific account information rather than listing all accounts.

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 other sibling tools. There's no mention of prerequisites, context for usage, or comparison with other listing/filtering tools that might exist.

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

sell-tokenC

Sell a Pump.fun token

ParametersJSON Schema
NameRequiredDescriptionDefault
tokenAddressYesThe token's mint address
sellAmountYesAmount of tokens to sell (0 for all)
accountNameNoName of the account to usedefault
slippageBasisPointsNoSlippage tolerance in basis points (1% = 100)

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. 'Sell' implies a destructive/mutative operation, but it doesn't disclose critical traits like authentication requirements, transaction costs, rate limits, irreversible nature, or what happens on failure. This leaves significant gaps for an agent to understand the tool's behavior safely.

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, direct sentence with zero wasted words. It front-loads the core action and resource, making it immediately scannable and efficient. Every word earns its place by conveying essential purpose without redundancy or fluff.

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?

For a financial transaction tool with 4 parameters, no annotations, and no output schema, the description is insufficient. It lacks context on safety (e.g., irreversible), expected outputs (e.g., transaction hash), error conditions, or integration with sibling tools like checking balances first. The high parameter count and mutation nature demand more completeness than provided.

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?

Schema description coverage is 100%, so parameters are well-documented in the schema itself. The description adds no additional meaning beyond implying 'tokenAddress' refers to a Pump.fun token and 'sellAmount' is for selling. This meets the baseline for high schema coverage but doesn't enhance understanding (e.g., explaining token standards or slippage implications).

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 ('sell') and resource ('a Pump.fun token'), making the purpose immediately understandable. It distinguishes from siblings like 'buy-token' and 'create-token' by specifying the opposite transaction type. However, it doesn't specify what 'sell' entails in this context (e.g., on-chain transaction, market order), which prevents a perfect 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. It doesn't mention prerequisites (e.g., needing tokens to sell), contrast with 'buy-token' for opposite actions, or indicate when other tools like 'get-account-balance' or 'get-token-info' should be consulted first. Usage is implied but not explicitly stated.

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

TDQS

B3.4/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose with no overlap: buying, selling, and creating tokens are separate actions, while getting token info, account balances, and listing accounts are distinct read operations. The descriptions make it unambiguous which tool to use for each task.

Naming Consistency4/5

The naming follows a consistent verb-noun pattern with hyphens (e.g., buy-token, create-token, get-token-info), except for 'list-accounts' which uses 'list' instead of 'get' like the other read operations. This minor deviation prevents a perfect score but maintains overall readability.

Tool Count5/5

With 6 tools, this server is well-scoped for interacting with Pump.fun tokens and accounts. Each tool serves a clear purpose (e.g., core token lifecycle operations and account management), and none feel redundant or missing given the domain.

Completeness4/5

The toolset covers the essential token lifecycle (create, buy, sell, get info) and account management (balance, list), but lacks update or delete operations for tokens or accounts, which might be minor gaps depending on the platform's capabilities. Overall, it supports core workflows effectively.

Maintenance

ActivityInactive
ResponsivenessSyncing

Related MCP Connectors

Related MCP Servers

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

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