You signed in with another tab or window. Reload
to refresh your session. You signed out in another tab or window. Reload
to refresh your session. You switched accounts on another tab or window. Reload
to refresh your session. Dismiss alert
noahgsolomon / pumpfun-mcp-server Public
7 stars
2 forks
Branches
Tags
Activity
Notifications
You must be signed in to change notification settings
main
Go to file
Code
| Name | | Name | Last commit message | Last commit date |
| --- | --- | --- | --- |
| Latest commit
-------------
noahgsolomon
Update README.md
Mar 15, 2025
acda9d3
· Mar 15, 2025
History
-------
18 Commits
| | |
| .keys | | .keys | .keep | Mar 14, 2025 |
| build | | build | .keep | Mar 14, 2025 |
| images | | images | image assets | Mar 14, 2025 |
| src | | src | mcp server index | Mar 14, 2025 |
| .env.example | | .env.example | example env | Mar 14, 2025 |
| .gitignore | | .gitignore | gitignore | Mar 14, 2025 |
| README.md | | README.md | Update README.md | Mar 15, 2025 |
| bun.lockb | | bun.lockb | gitignore | Mar 14, 2025 |
| convert-key.js | | convert-key.js | script to convert keys | Mar 14, 2025 |
| package-lock.json | | package-lock.json | npm | Mar 14, 2025 |
| package.json | | package.json | npm | Mar 14, 2025 |
| tsconfig.json | | tsconfig.json | npm | Mar 14, 2025 |
| View all files | | |
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.
firstmcp.mp4
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
.
Clone this repository:
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
.
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.
Build the project:
npm run build
Run the MCP server:
node build/index.js
get-token-info
tokenAddress
(string, required): The token's mint addresscreate-token
Create a new Pump.fun token
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")buy-token
Buy a Pump.fun token
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)sell-token
Sell a Pump.fun token
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)list-accounts
List all accounts in the keys folder
get-account-balance
Get the SOL and token balances for an account
accountName
(string, optional): Name of the account to check (defaults to "default")tokenAddress
(string, optional): Token address to check balance forThe 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:
.env
file and run node convert-key.js
The project includes several standalone scripts that can be run directly:
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
folder. Make sure to secure this folder appropriately.src/index.ts
: Main MCP server entry pointsrc/get-token-info.ts
: Token information retrievalsrc/create-token.ts
: Token creation functionalitysrc/buy-token.ts
: Token buying functionalitysrc/sell-token.ts
: Token selling functionalitysrc/list-accounts.ts
: Account listing functionalitysrc/get-token-balance.ts
: Account balance checkingsrc/utils.ts
: Shared utility functionsconvert-key.js
: Utility to convert a base58 private key to a keypair JSON filenpm run build
No description, website, or topics provided.
No releases published
No packages published
You can’t perform that action at this time.