Solana MCP Server
# š Solana MCP Server
[](https://opensource.org/licenses/MIT)
[](https://www.typescriptlang.org/)
[](https://modelcontextprotocol.io/)
> Let AI agents interact with the Solana blockchain. Query wallets, track tokens, analyze trades, and assess risk ā all through natural language.
<p align="center">
<img src="assets/demo.gif" alt="Solana MCP Demo" width="600">
</p>
## š¤ What is this?
**MCP (Model Context Protocol)** is the "USB-C for AI" ā a standard that lets AI models (Claude, GPT, etc.) connect to external tools. This server exposes Solana blockchain data to any MCP-compatible AI.
Instead of manually checking Solscan or writing scripts, just ask your AI:
- *"What's my wallet balance?"*
- *"Show me trending Solana tokens"*
- *"Is this token safe to buy?"*
## ⨠Features
| Tool | Description |
|------|-------------|
| `get_wallet_balance` | Get SOL and token balances for any wallet |
| `get_token_info` | Full token details with price history, socials, DEX liquidity |
| `get_recent_trades` | Recent swaps/trades from a wallet (buy/sell history) |
| `get_trending_tokens` | Currently trending Solana tokens from DexScreener |
| `get_new_pairs` | Find newly launched tokens (just listed!) |
| `analyze_token` | **Full risk analysis** ā see below |
| `check_bundled_launch` | šÆ Detect sniper/insider bundled buys at launch |
| `get_creator_tokens` | šµļø Find other tokens by same creator (rug history) |
| `get_whale_transactions` | š Track large buy/sell transactions |
| `get_swap_quote` | š± Get Jupiter swap quotes |
### š Enhanced Token Info
The `get_token_info` tool now includes:
- **Price Changes** ā 5m, 1h, 6h, 24h price movements
- **Token Age** ā How old is this token?
- **Pump.fun Detection** ā Is this from pump.fun?
- **Social Links** ā Twitter, Telegram, Website
- **DEX Liquidity** ā Breakdown per DEX
### š”ļø Token Risk Analysis
The `analyze_token` tool performs comprehensive safety checks:
- **Mint Authority** ā Can the creator mint more tokens? (rug risk)
- **Freeze Authority** ā Can the creator freeze your tokens?
- **LP Status** ā Is liquidity burned or locked?
- **Token Age** ā Newer tokens = higher risk
- **Holder Distribution** ā Who owns what percentage?
- **Concentration Risk** ā Top holder & top 10 analysis
- **Social Presence** ā Does it have Twitter/Telegram?
## š Quick Start
### 1. Clone & Install
```bash
git clone https://github.com/miftarohmann/solana-mcp.git
cd solana-mcp
npm install
```
### 2. Configure
```bash
cp .env.example .env
```
Edit `.env` and add your Helius API key:
```
HELIUS_API_KEY=your-helius-api-key-here
```
> š” Get a free API key at [helius.dev](https://helius.dev) ā free tier is plenty for personal use.
### 3. Build
```bash
npm run build
```
## š Integration
### Claude Desktop
Add to your `claude_desktop_config.json`:
```json
{
"mcpServers": {
"solana": {
"command": "node",
"args": ["/path/to/solana-mcp/dist/index.js"],
"env": {
"HELIUS_API_KEY": "your-helius-api-key"
}
}
}
}
```
### Cursor / VS Code
Add to your MCP settings:
```json
{
"mcp": {
"servers": {
"solana": {
"command": "node",
"args": ["dist/index.js"],
"cwd": "/path/to/solana-mcp"
}
}
}
}
```
### Clawdbot
Add to your Clawdbot config (`~/.clawdbot/config.yml`):
```yaml
mcp:
servers:
- name: solana
command: node
args: [/path/to/solana-mcp/dist/index.js]
env:
HELIUS_API_KEY: your-key
```
### Test Standalone
```bash
# Run with MCP Inspector
npx @modelcontextprotocol/inspector node dist/index.js
```
## š¬ Example Conversations
Once connected, you can ask your AI:
**Wallet Queries:**
> "Check the balance of wallet `7xKXtg...`"
> "What tokens does this wallet hold?"
**Token Research:**
> "Get info on token `BONK`"
> "What's the price and market cap of `JUP`?"
**Trading Analysis:**
> "Show me recent trades from wallet `abc123...`"
> "Is this wallet buying or selling more?"
**Trending & Discovery:**
> "What tokens are trending on Solana right now?"
> "Show me the top 5 movers"
**Risk Assessment:**
> "Analyze this token for risk: `[mint address]`"
> "Is this token safe? Check holder distribution"
## š”ļø Risk Analysis
The `analyze_token` tool checks for red flags:
**š Authority Checks:**
- **Mint Authority** ā If NOT revoked, creator can mint infinite tokens
- **Freeze Authority** ā If NOT revoked, creator can freeze your holdings
**š§ Liquidity Checks:**
- **LP Burned** ā Safest option, liquidity can't be pulled
- **LP Locked** ā Good, but check lock duration
- **LP Unlocked** ā Risky, potential rug pull
**š„ Holder Analysis:**
- **Top Holder %** ā >50% = very risky, >20% = moderate risk
- **Top 10 Total** ā >80% = concentrated
- **Holder Count** ā <100 = low distribution
Returns a risk score (0-100) with detailed explanations and safety checklist.
## š” APIs Used
| API | Purpose | Cost |
|-----|---------|------|
| [Helius](https://helius.dev) | Solana RPC, transactions, token data | Free tier available |
| [DexScreener](https://dexscreener.com) | Prices, trending tokens | Free, no key needed |
## š ļø Development
```bash
# Run in development mode (auto-reload)
npm run dev
# Build for production
npm run build
# Start production server
npm start
```
## š Project Structure
```
solana-mcp/
āāā src/
ā āāā index.ts # MCP server entry point
ā āāā solana-api.ts # Solana/Helius API functions
āāā dist/ # Compiled JavaScript
āāā .env.example # Environment template
āāā package.json
āāā README.md
```
## š¤ Contributing
Contributions welcome! Feel free to:
- Report bugs
- Suggest features
- Submit PRs
## š License
MIT ā do whatever you want with it.
---
<p align="center">
Built with ā by <a href="https://twitter.com/callmedinamo">Dynamo</a>
</p>
TDQS
Scored across 10 tools
Most tools target clearly distinct objects: wallet balance, token info, trending tokens, new pairs, swap quote, and risk/insider checks each have a unique angle. Minor overlap exists between get_recent_trades (wallet-centric) and get_whale_transactions (token-centric, size-filtered), and between get_token_info and analyze_token, but descriptions make the boundaries reasonably clear.
Nine of ten tools follow a clean get_<noun> snake_case pattern (get_wallet_balance, get_token_info, get_new_pairs, etc.). The single outlier, analyze_token, drops the get_ prefix but remains readable and semantically appropriate for an analysis action.
Ten tools is well within the ideal 3-15 range and each covers a distinct Solana analytics need (balance, token metadata, discovery, risk, whale activity, quoting). No tool feels redundant or filler.
The surface covers wallet inspection, token discovery, risk/rug analysis, whale tracking, and swap quoting ā a coherent read-only analytics domain. Gaps remain at the edges: no swap execution or transaction submission, no price/OHLC history, and no direct holder-list or token-search endpoint, but agents can work around these for most analysis workflows.