Rihsabmohd/TokenMCP
If you are the rightful owner of TokenMCP and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
TokenMCP is a Model Context Protocol server designed for querying token, wallet, and yield data on the Solana blockchain.
TokenMCP - Solana Blockchain MCP Server
TokenMCP is a Model Context Protocol (MCP) server that exposes powerful tools for querying token, wallet, and yield data on the Solana blockchain. It supports Claude and AI agents via the MCP standard.
π Features
- π Get Wallet Balance β Check any Solana walletβs SOL balance via Helius RPC
- π Get Solana Token Info β Lookup token price, FDV, and market cap via Dexscreener
- π Get Trending Tokens β Top Solana tokens by 24h volume using Birdeye API
- π Get Top Token Holders β Retrieve top holders of a token using Helius + Web3
- π§ͺ Get Best Yields β View best APYs from Solana protocols via DeFi Llama
- π¨ Fear & Greed Index β Check market sentiment via Alternative.me API
- π FNG Trend Analysis β Analyze Crypto Fear & Greed Index trends over time
- β Zod Schema Validation β All tools use strongly typed input validation
- π¦ MCP Compliant β Ready to connect with Claude apps using MCP SDK
π Tech Stack
- TypeScript β Type-safe backend code
- Zod β Input validation
- Solana Web3.js β Wallet and token data
- Dexscreener API β Token trading info
- Birdeye API β Trending token stats
- DeFi Llama API β Yield farming data
- Alternative.me API β Fear & Greed Index
- Helius RPC β High-quality Solana RPC
π Requirements
- Node.js v16+
- npm
- Birdeye API Key
- Helius RPC URL
Both the BIRDEYE_API_KEY and HELIUS_RPC_URL must be saved in your .env
file for the server to function properly.
βοΈ Tools & Descriptions
1. getBalance
- Description: Get the SOL balance of a given wallet.
- Inputs:
walletAddress
β Base58 Solana wallet address. - Example:
"What is the balance of wallet [walletAddress]?"
2. GetSolanaTokenInfo
- Description: Get token info (price, symbol, FDV, etc.) via Dexscreener.
- Inputs:
contractAddress
β Solana token address. - Example:
"Get token info for [contractAddress]"
3. getTrendingTokens
- Description: Top 10 Solana tokens by 24h volume via Birdeye.
- Inputs: None
- Example:
"Which Solana tokens are trending today?"
4. getTopTokenHolders
- Description: See the largest holders of a Solana token.
- Inputs:
tokenAddress
β Mint address
count
(optional) β Number of top holders (default: 5, max: 50) - Example:
"Show top holders for [tokenAddress]"
5. getBestYields
- Description: Top APY pools on Solana via DeFi Llama.
- Inputs: None
- Example:
"What are the best yield farming opportunities on Solana?"
6. getCurrentFearGreedIndex
- Description: Get the current crypto Fear & Greed Index.
- Inputs: None
- Example:
"What's the current market sentiment?"
7. analyzeFngTrend
- Description: Analyze Fear & Greed Index over time.
- Inputs:
days
β Number of days to analyze - Example:
"Analyze FNG trend over the last 7 days."
π¦ Getting Started
1. Clone the Repo
git clone https://github.com/your-username/TokenMCP.git
cd TokenMCP
2. Install Dependencies
Install the required dependencies using npm
:
npm install @modelcontextprotocol/sdk zod
npm install -D @types/node typescript
- Set Up Environment Variables π IMPORTANT: You must set both BIRDEYE_API_KEY and HELIUS_RPC_URL in a .env file. Without them, the server will fail to start.
Create a .env file in the root directory:
BIRDEYE_API_KEY=your_birdeye_api_key_here
HELIUS_RPC_URL=https://mainnet.helius-rpc.com/?api-key=your_helius_key_here
π¦ Get your Birdeye API key here
β‘ Get your Helius RPC URL here
π§ͺ Run & Inspect
1. Build the project
npm run build
2. Inspect the MCP Server
npx @modelcontextprotocol/inspector node path/to/build/index.js
Replace path/to/build/index.js with the actual path to your compiled entrypoint.
π€ Connect to Claude Desktop
To run TokenMCP tools from Claude, configure Claude Desktop with your MCP server.
Open your Claude config file:
code $env:AppData\\Claude\\claude_desktop_config.json
Add the following:
{
"mcpServers": {
"TOKENMCP": {
"command": "node",
"args": [
"C:\\Absolute\\Path\\To\\TokenMCP\\build\\index.js"
],
"env": {
"BIRDEYE_API_KEY": "your_birdeye_api_key_here",
"HELIUS_RPC_URL": "your_helius_rpc_url_here"
}
}
}
}
Save and restart Claude Desktop.
π‘οΈ Security Tips
.env is already gitignored β do not expose it!
Never hardcode private or API keys in your code
Use read-only public Solana wallets when querying balances
β Final Notes
You must set both BIRDEYE_API_KEY and HELIUS_RPC_URL in your environment.
This server will not boot without them.
Run the inspector before connecting to Claude to ensure everything works.
π€ Contributions
Want to extend the server or add new tools? PRs and feedback are welcome!