This MCP server allows AI assistants to interact with the Pump.fun platform on Solana, enabling token creation, buying, and selling operations directly from your AI tools.
Clone the repository and navigate to the project folder:
git clone https://github.com/noahgsolomon/pumpfun-mcp.git
cd pumpfun-mcp
Install dependencies:
npm install
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.
(Optional) 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:
node convert-key.js
This creates a default.json
file in the .keys
folder with your keypair.
Build the project:
npm run build
Run the MCP server:
node build/index.js
If you're using Claude Desktop on MacOS, add the following configuration to your ~/Library/Application Support/Claude/claude_desktop_config.json
file:
{
"mcpServers": {
"pumpfun": {
"command": "node",
"args": ["/path/to/your/pumpfun-mcp/build/index.js"],
"env": {
"HELIUS_RPC_URL": "https://your-helius-rpc-url.com"
}
}
}
}
Replace /path/to/your/pumpfun-mcp/build/index.js
with the absolute path to the index.js file on your system, and use your actual Helius RPC URL.
Retrieves details about a specific Pump.fun token.
Parameters:
tokenAddress
(string, required): The token's mint addressCreates a new Pump.fun token.
Parameters:
name
(string, required): Token namesymbol
(string, required): Token symboldescription
(string, required): Token descriptionimageUrl
(string, optional): Path to local image fileinitialBuyAmount
(number, required): Initial buy amount in SOL (min 0.0001)accountName
(string, optional): Name of the account to use (defaults to "default")Purchases a Pump.fun token.
Parameters:
tokenAddress
(string, required): The token's mint addressbuyAmount
(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)Sells a Pump.fun token.
Parameters:
tokenAddress
(string, required): The token's mint addresssellAmount
(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)Lists all accounts in the keys folder.
Parameters: None
Checks the SOL and token balances for an account.
Parameters:
accountName
(string, optional): Name of the account to check (defaults to "default")tokenAddress
(string, optional): Token address to check balance forYou can also use the tools directly as standalone scripts:
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]
.keys
folder. Secure this folder appropriately.To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "pumpfun" '{"command":"node","args":["build/index.js"],"env":{"HELIUS_RPC_URL":"https://your-helius-rpc-url.com"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"pumpfun": {
"command": "node",
"args": [
"build/index.js"
],
"env": {
"HELIUS_RPC_URL": "https://your-helius-rpc-url.com"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"pumpfun": {
"command": "node",
"args": [
"build/index.js"
],
"env": {
"HELIUS_RPC_URL": "https://your-helius-rpc-url.com"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect