Skip to main content
Glama
noahgsolomon

Pump.fun MCP Server

by noahgsolomon

pumpfun-mcp

一个模型上下文协议 (MCP) 服务器,用于与 Solana 上的Pump.fun平台交互。该服务器使 AI 助手能够在 Pump.fun 平台上创建、购买和出售代币。

用法

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

要将此服务器与 Claude 或其他与 MCP 兼容的 AI 助手一起使用,请将以下配置添加到您的 MCP 客户端:

如果您使用的是 MacOS 并且想要在 Claude Desktop 中运行它,请在您的 ~/Library/Application \Support/Claude/claude_desktop_config.json 文件中写入以下内容:

{
  "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"
      }
    }
  }
}

将https://your-helius-rpc-url.com替换为您的Helius RPC URL 。

Related MCP server: AMOCA Solana MCP Server

安装

  1. 克隆此存储库:

    git clone https://github.com/noahgsolomon/pumpfun-mcp.git
    cd pumpfun-mcp
  2. 安装依赖项:

    npm install
  3. 使用您的 Solana RPC URL 创建一个.env文件:

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

    您可以从Helius获取免费的 RPC URL。

    要使用现有的 Solana 钱包,请将您的私钥添加到.env文件中:

    PRIVATE_KEY=your-base58-encoded-private-key

    然后运行转换脚本来创建密钥对文件:

    node convert-key.js

    这将使用您的密钥对在.keys文件夹中创建一个default.json文件。

  4. 构建项目:

    npm run build
  5. 运行 MCP 服务器:

    node build/index.js

成分

工具

  • 获取令牌信息

    • 获取有关 Pump.fun 代币的信息

    • 输入参数:

      • tokenAddress (字符串,必需):代币的铸造地址

  • 创建令牌

    • 创建一个新的 Pump.fun 代币

    • 输入参数:

      • name (字符串,必需):令牌名称

      • symbol (字符串,必需):代币符号

      • description (字符串,必需):令牌描述

      • imageUrl (字符串,可选):本地图像文件的路径

      • initialBuyAmount (数字,必需):SOL 中的初始购买金额(最小 0.0001)

      • accountName (字符串,可选):要使用的帐户名称(默认为“default”)

  • 购买代币

    • 购买 Pump.fun 代币

    • 输入参数:

      • tokenAddress (字符串,必需):代币的铸造地址

      • buyAmount (数字,必填):SOL 购买金额(最小 0.0001)

      • accountName (字符串,可选):要使用的帐户名称(默认为“default”)

      • slippageBasisPoints (数字,可选):基点的滑点容差(默认为 100)

  • 出售代币

    • 出售 Pump.fun 代币

    • 输入参数:

      • tokenAddress (字符串,必需):代币的铸造地址

      • sellAmount (数字,必需):要出售的代币数量(使用 0 表示全部出售)

      • accountName (字符串,可选):要使用的帐户名称(默认为“default”)

      • slippageBasisPoints (数字,可选):基点的滑点容差(默认为 100)

  • 列出账户

    • 列出密钥文件夹中的所有帐户

    • 无需输入参数

  • 获取账户余额

    • 获取帐户的 SOL 和代币余额

    • 输入参数:

      • accountName (字符串,可选):要检查的帐户名称(默认为“default”)

      • tokenAddress (字符串,可选):用于检查余额的代币地址

账户管理

MCP 自动在.keys文件夹中创建并管理 Solana 密钥对。每个密钥对都存储为一个 JSON 文件,文件名以账户名命名。

创建令牌时,mint 密钥对也会保存在.keys文件夹中,前缀为mint- 。

要使用您自己的帐户来使用 MCP,您需要:

  1. 将您的私钥添加到.env文件并运行node convert-key.js

  2. 钱包里有足够的 SOL

独立脚本

该项目包含几个可以直接运行的独立脚本:

  • 获取令牌信息: node build/get-token-info.js <token_address>

  • 创建令牌: node build/create-token.js <name> <symbol> <description> <initial_buy_amount> [account_name] [image_url]

  • 购买代币: node build/buy-token.js <token_address> <buy_amount_sol> [account_name] [slippage_basis_points]

  • 出售代币: node build/sell-token.js <token_address> <sell_amount> [account_name] [slippage_basis_points]

  • 列出帐户: node build/list-accounts.js

  • 获取账户余额: node build/get-token-balance.js <account_name> [token_address]

重要提示

  • 安全性:密钥对以未加密的形式存储在.keys文件夹中。请确保妥善保护此文件夹。

  • 费用:Solana 上的所有交易都需要 SOL 作为交易费。请确保您的账户有足够的 SOL。

  • 滑点:默认滑点容差为 1%(100 个基点)。您可以根据每笔交易进行调整。

  • 图片:使用图片创建令牌时,必须提供图片的本地文件路径。不支持远程 URL。

发展

项目结构

  • src/index.ts :主 MCP 服务器入口点

  • src/get-token-info.ts :获取token信息

  • src/create-token.ts :令牌创建功能

  • src/buy-token.ts :代币购买功能

  • src/sell-token.ts :代币销售功能

  • src/list-accounts.ts :帐户列表功能

  • src/get-token-balance.ts :账户余额检查

  • src/utils.ts :共享实用程序函数

  • convert-key.js :将 base58 私钥转换为密钥对 JSON 文件的实用程序

建筑

npm run build

Available Tools

6 tools
buy-tokenC

Buy a Pump.fun token

ParametersJSON Schema
NameRequiredDescriptionDefault
accountNameNoName of the account to usedefault
buyAmountYesAmount to buy in SOL
slippageBasisPointsNoSlippage tolerance in basis points (1% = 100)
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, the description carries full burden but only states the action without disclosing behavioral traits like required permissions, transaction costs, rate limits, or what happens on failure. 'Buy' implies a financial transaction, but critical details like confirmation steps or irreversible effects are missing.

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 with zero waste, front-loading the core action. It's appropriately sized for the tool's complexity, making it easy 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 no annotations, no output schema, and a financial transaction tool with 4 parameters, the description is incomplete. It lacks essential context like return values, error handling, or behavioral nuances, leaving significant gaps for safe and effective use.

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. The description adds no additional meaning beyond implying token purchase, which aligns with schema but doesn't enhance understanding of parameter interactions or usage context.

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 resource ('a Pump.fun token'), providing specific purpose. However, it doesn't differentiate from sibling 'sell-token' beyond the verb direction, missing explicit distinction about when each is appropriate.

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?

No guidance on when to use this tool versus alternatives like 'sell-token' or 'create-token' is provided. The description assumes context but offers no explicit usage context, prerequisites, or exclusions.

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
accountNameNoName of the account to use (will be created if it doesn't exist)default
descriptionYesToken description
imageUrlNoURL to token image (optional)
initialBuyAmountYesInitial buy amount in SOL
nameYesToken name
symbolYesToken symbol

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. 'Create' implies a write operation, but it doesn't disclose critical traits like authentication requirements, cost implications (SOL usage), whether the token becomes immediately tradable, or potential rate limits. The description fails to compensate for the lack of annotations.

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 unnecessary words. It's appropriately sized for a tool with comprehensive schema documentation and gets straight to the point with zero wasted content.

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 insufficient. It doesn't explain what happens after creation (e.g., token address returned, initialization state), doesn't mention SOL cost implications from 'initialBuyAmount', and provides no context about the creation process. The schema covers parameters well, but behavioral and outcome aspects are missing.

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%, providing good documentation for all parameters. The description adds no parameter-specific information beyond what's in the schema. This meets the baseline of 3 since the schema adequately covers parameter meanings, but the description doesn't enhance understanding of how parameters interact or their business significance.

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 'create' entails in this context (e.g., minting, deployment).

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 an account), differentiate from similar tools like 'get-token-info', or indicate when creation is appropriate versus buying existing tokens. The agent must infer usage from context 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 critical behavioral details such as whether this is a read-only operation (implied but not explicit), potential rate limits, authentication requirements, or error conditions. This is a significant gap for a tool that likely interacts with 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 fluff. It is front-loaded and appropriately sized, 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 financial balance retrieval, no annotations, and no output schema, the description is incomplete. It doesn't explain what the output looks like (e.g., balance values, formats), potential side effects, or error handling. This leaves the agent with insufficient context for reliable tool invocation.

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 clear descriptions. The description adds no additional semantic context beyond implying balance retrieval for SOL and tokens, which aligns with the schema but doesn't provide extra value like parameter interactions or examples.

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') and resources ('SOL and token balances for an account'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'list-accounts' or 'get-token-info', which could provide related information, so it falls short of 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. For example, it doesn't clarify if this is for checking balances of a specific account versus listing all accounts (as 'list-accounts' might do), or how it differs from 'get-token-info' in terms of balance retrieval. This lack of context leaves the agent to infer 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 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.

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. It states this is a list operation, implying it's likely read-only, but doesn't clarify permissions, rate limits, pagination, or what 'keys folder' represents. The description adds minimal behavioral context beyond the basic action.

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 unnecessary words. It's appropriately sized for a simple list operation and front-loads the essential information.

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 simple list tool with no parameters and no output schema, the description provides the basic purpose but lacks important context. Without annotations, it should ideally clarify what 'accounts' and 'keys folder' mean, the return format, and any behavioral constraints. The description is minimally adequate but leaves gaps.

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 discuss parameters, maintaining focus on the tool's purpose. Baseline for 0 parameters with full coverage is 4.

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 this tool from its siblings like 'get-account-balance', which might also retrieve account information but with different scope or detail.

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 'create-token'. It doesn't mention 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.

sell-tokenC

Sell a Pump.fun token

ParametersJSON Schema
NameRequiredDescriptionDefault
accountNameNoName of the account to usedefault
sellAmountYesAmount of tokens to sell (0 for all)
slippageBasisPointsNoSlippage tolerance in basis points (1% = 100)
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 for behavioral disclosure. 'Sell a Pump.fun token' implies a financial transaction with potential consequences, but doesn't disclose critical behaviors like whether this is irreversible, requires authentication, has rate limits, or what happens on failure. The description mentions no behavioral traits beyond the basic action, leaving significant gaps for a financial tool.

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 straightforward financial transaction tool and is perfectly front-loaded with the core action. Every word earns its place in conveying the essential purpose.

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 happens after selling (e.g., where funds go, confirmation process), error conditions, or return values. The combination of a potentially destructive financial operation with minimal contextual information creates significant gaps for safe and effective use.

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 fully documents all 4 parameters. The description adds no additional parameter semantics beyond what's in the schema - it doesn't explain parameter relationships, provide examples, or clarify edge cases. This meets the baseline for high schema coverage but doesn't add value beyond the structured data.

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 ('Pump.fun token'), making the purpose immediately understandable. It distinguishes this from sibling tools like 'buy-token' and 'create-token' by specifying the opposite financial transaction. However, it doesn't specify what type of token (e.g., cryptocurrency) or platform context beyond 'Pump.fun', which slightly limits specificity.

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 tokens to sell, account setup, or market conditions. While the tool name implies it's for selling tokens, there's no explicit context about when this operation is appropriate versus using 'buy-token' or other financial tools.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 6 tool updatesv1.0.0
    • First observedbuy-token
    • First observedcreate-token
    • First observedget-account-balance
    • First observedget-token-info
    • First observedlist-accounts
    • First observedsell-token

TDQS

B3.4/5.0

Scored across 6 tools

Disambiguation5/5

Each tool has a clearly distinct purpose with no overlap: buying, selling, creating tokens, getting token info, getting account balances, and listing accounts. The actions and targets are well-defined and unambiguous.

Naming Consistency4/5

Most tools follow a consistent verb_noun pattern (e.g., buy-token, create-token, get-token-info, sell-token). However, 'list-accounts' uses 'list' instead of 'get' for consistency with 'get-account-balance', and 'get-account-balance' includes a hyphenated compound noun, causing minor deviations.

Tool Count5/5

With 6 tools, this server is well-scoped for managing Pump.fun tokens and accounts. Each tool serves a clear, essential function, and the count is appropriate for the domain without being excessive or insufficient.

Completeness4/5

The toolset covers core token operations (create, buy, sell, get info) and account management (balance, listing), providing good coverage. A minor gap is the lack of update or delete operations for tokens or accounts, but agents can likely work around this for basic workflows.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server enabling AI agents to interact with the Solana blockchain for DeFi operations like checking balances, transferring tokens, executing swaps, and fetching price data.
    37 npm
    21
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that enables AI models to interact with the Solana blockchain, providing RPC methods, wallet management, DeFi trading capabilities, and Helius API integration for enhanced Solana development.
    5
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that enables Claude AI to interact with the Solana blockchain, allowing it to execute transactions, query accounts, manage wallets, get price predictions, trade tokens, and access various blockchain data sources.
    4
    -