{"_id":"@0xprotovox/defi-mcp","_rev":"2-2543e1ee93d2745e35d6bc430c75ca00","name":"@0xprotovox/defi-mcp","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@0xprotovox/defi-mcp","version":"0.1.0","keywords":["mcp","defi","solana","crypto","token-analysis","claude-code","ai-tools"],"author":{"name":"0xprotovox"},"license":"MIT","_id":"@0xprotovox/defi-mcp@0.1.0","maintainers":[{"name":"0xprotovox","email":"beqa28282@gmail.com"}],"bin":{"defi-mcp":"dist/index.js"},"dist":{"shasum":"094c20900b211808d1160d35eb7cc6521ea76bec","tarball":"https://registry.npmjs.org/@0xprotovox/defi-mcp/-/defi-mcp-0.1.0.tgz","fileCount":59,"integrity":"sha512-/sMyJsVHVdbMQ2Y5IqFFlkjog8eq/n3gc2d/5eChKRRHPz/DcsoCGeIXflKeYMEfXy2lzTiycE52kMMMHgAQbA==","signatures":[{"sig":"MEUCIBxsKqxYcaAYqG6Z5IB09zIbS+iCZjG7V3YhphOynYHKAiEA8m1m+ggTgTODGqw7O1ZdfNUoKyt4lkcuP7BW3Rb/rUk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":188637},"main":"dist/server.js","type":"module","types":"./dist/server.d.ts","engines":{"node":">=18.0.0"},"gitHead":"9ed652695d2a0fbb62875491c04ba6b9ba4ec5f5","scripts":{"dev":"tsx src/index.ts","build":"tsc","start":"node dist/index.js"},"_npmUser":{"name":"0xprotovox","email":"beqa28282@gmail.com"},"_npmVersion":"11.6.2","description":"DeFi MCP Server for Claude Code — token analysis, prices, trending, holder intelligence","directories":{},"_nodeVersion":"24.11.1","dependencies":{"zod":"^3.23.0","@modelcontextprotocol/sdk":"^1.27.1"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","typescript":"^5.5.0","@types/node":"^22.0.0"},"peerDependencies":{"playwright":"^1.58.2"},"peerDependenciesMeta":{"playwright":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/defi-mcp_0.1.0_1774380743226_0.32289361982318754","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Renamed to @0xprotovox/deficlaw. Install: npm install -g @0xprotovox/deficlaw"}},"time":{"created":"2026-03-24T19:32:23.044Z","modified":"2026-03-27T07:29:54.812Z","0.1.0":"2026-03-24T19:32:23.372Z"},"author":{"name":"0xprotovox"},"license":"MIT","keywords":["mcp","defi","solana","crypto","token-analysis","claude-code","ai-tools"],"description":"DeFi MCP Server for Claude Code — token analysis, prices, trending, holder intelligence","maintainers":[{"name":"0xprotovox","email":"beqa28282@gmail.com"}],"readme":"# defi-mcp\n\n**The first open-source DeFi MCP server for Claude Code.**\n\nAnalyze any Solana token in seconds. Holder intelligence, risk scoring, smart money tracking, KOL detection. Zero API keys required.\n\n```\n> \"analyze token 3oQwNvAfZMuPWjVPC12ukY7RPA9JiGwLod6Pr4Lkpump\"\n\n═══ SUMMARY ═══\nPOKE6900 is a 9mo old PumpSwap token with $25.9K liquidity and $34.5K market cap.\n53 diamond hands (53.0%), strong holder conviction.\nOnly 18.0% of holders are in profit, most are underwater with avg loss of $844 per wallet.\nBuy pressure is strong at 3.3:1 ratio (1093 buys vs 395 sells), accumulation phase.\nContract looks safe: mint and freeze authorities revoked.\n🟢 Lower risk profile based on available data.\n```\n\n## Why defi-mcp?\n\nClaude Code can write code, fix bugs, deploy apps. But ask it \"what's the price of BONK?\" and it says *\"I don't have real-time data.\"*\n\n**defi-mcp fixes that.** It gives Claude Code real-time access to DeFi data across Solana and 10+ chains.\n\n- **Token Analysis** with holder intelligence, risk scoring, KOL tracking\n- **Real-time Prices** from DexScreener across all major chains\n- **Trending Tokens** with volume, liquidity, and boost data\n- **Top Traders** showing who made and lost money on any token\n- **Contract Security** checking mint/freeze authority on Solana\n- **1.5 second** full analysis (not 11 seconds like browser-based scrapers)\n- **Zero config** - no API keys, no wallets, no accounts needed\n\n## Quick Start\n\n```bash\n# Clone and build\ngit clone https://github.com/0xprotovox/defi-mcp.git\ncd defi-mcp\nnpm install && npm run build\n\n# Add to Claude Code\nclaude mcp add defi -- node /path/to/defi-mcp/dist/index.js\n```\n\nThen just ask Claude naturally:\n\n```\n> \"analyze this token: 3oQw...pump\"\n> \"what's the price of BONK?\"\n> \"show me trending tokens on solana\"\n> \"who made money on JUP token?\"\n```\n\n## Tools\n\n### `analyze_token`\n\nFull token analysis with holder intelligence, risk scoring, and human-readable summary.\n\n**Input:**\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `address` | string | required | Token contract address |\n| `chain` | string | `\"solana\"` | Blockchain (solana, ethereum, bsc, base, arbitrum) |\n| `include_holders` | boolean | `true` | Include GMGN holder analysis |\n\n**Output includes:**\n- Token info (name, symbol, age, socials)\n- Price with 5m/1h/6h/24h changes\n- Market data (mcap, fdv, volume, liquidity, vol/liq ratio)\n- Contract security (mint authority, freeze authority, supply)\n- Risk score (0-100) with detailed flags\n- Holder concentration (top 5/10/20)\n- Holder categories (diamond hands, snipers, KOLs, fresh wallets, insiders)\n- Buy/sell pressure ratio\n- Sentiment (profitable vs underwater holders, avg PnL)\n- Dev wallet detection and status\n- Top 20 holders table with PnL and tags\n- KOL list with Twitter handles\n- Human-readable summary with actionable insights\n\n### `get_price`\n\nQuick price lookup. Sub-second response.\n\n```\n> \"price of So11111112222...\"\n\nBONK — $0.000024 (+5.2% 24h)\nVolume: $142M | Liquidity: $12M | MCap: $1.8B\n```\n\n### `get_trending`\n\nTrending and boosted tokens on any chain.\n\n```\n> \"trending tokens on solana\"\n\n1. BONK — $0.000024 (+12%) — $142M volume\n2. WIF  — $0.89 (-2.1%)   — $89M volume\n3. JUP  — $0.94 (+3.5%)   — $45M volume\n...\n```\n\n### `get_top_traders`\n\nWho made and lost money on a token. Winners, losers, PnL, tags.\n\n```\n> \"who profited on this token?\"\n\n🏆 Top Winners:\n1. CR5N... — +$680 (+124%) 🟢 still holding\n2. EsRB... — +$166 (+16%) 💎 diamond hands\n\n💀 Top Losers:\n1. BgeeV... — -$7,548 (-65%) 💎 diamond hands (!)\n2. 5vqid... — -$5,420 (-50%) gmgn user\n```\n\n## Data Sources\n\nAll free, no API keys required:\n\n| Source | Data | Speed |\n|--------|------|-------|\n| **DexScreener** | Prices, volume, liquidity, pairs, trending | <0.5s |\n| **GMGN** | Holders, tags, KOLs, PnL, dev wallet, snipers | ~1s |\n| **Solana RPC** | Mint authority, freeze authority, supply | <0.5s |\n\n**Total analysis time: ~1.5 seconds**\n\n## Supported Chains\n\nPrices and trending work on all DexScreener chains:\n\nSolana, Ethereum, Base, BSC, Arbitrum, Polygon, Avalanche, Optimism, Fantom, and more.\n\nHolder analysis (GMGN) currently supports **Solana** tokens.\n\n## Risk Scoring\n\nThe risk scorer analyzes 6 dimensions to produce a 0-100 score:\n\n| Dimension | Weight | What it checks |\n|-----------|--------|----------------|\n| Liquidity | 25% | Pool depth in USD |\n| Token Age | 10% | Time since creation |\n| Holder Concentration | 20% | Top 10 holder % |\n| Dev Wallet | 20% | Dev holdings and selling behavior |\n| Fresh Wallets | 15% | New wallet % (possible wash/bundle) |\n| Sniper Activity | 10% | Bot/sniper wallets in top holders |\n\n**Levels:** 🟢 LOW (0-19) | 🟡 MEDIUM (20-44) | 🟠 HIGH (45-69) | 🔴 CRITICAL (70-100)\n\n## Architecture\n\n```\nClaude Code ←→ MCP stdio ←→ defi-mcp server\n                                 │\n                    ┌────────────┼────────────┐\n                    │            │            │\n              DexScreener    GMGN API    Solana RPC\n              (prices)     (holders)    (security)\n```\n\n- **MCP SDK** for Claude Code integration\n- **curl-based GMGN fetcher** bypasses Cloudflare (Playwright fallback if needed)\n- **In-memory TTL cache** prevents rate limiting\n- **Rate limiter** for DexScreener (150 req/min)\n- **TypeScript** with full type safety\n\n## Configuration\n\n### Environment Variables (all optional)\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `SOLANA_RPC_URL` | `https://api.mainnet-beta.solana.com` | Custom Solana RPC endpoint |\n\n### Claude Code Config\n\nAdd to your project's `.mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"defi\": {\n      \"command\": \"node\",\n      \"args\": [\"/path/to/defi-mcp/dist/index.js\"],\n      \"env\": {\n        \"SOLANA_RPC_URL\": \"https://your-rpc.com\"\n      }\n    }\n  }\n}\n```\n\n## Roadmap\n\n- [x] Token analysis with holder intelligence\n- [x] Risk scoring (6 dimensions)\n- [x] Contract security checks\n- [x] KOL detection with Twitter handles\n- [x] Human-readable AI summary\n- [x] Top traders (winners/losers)\n- [ ] Token search by name/symbol\n- [ ] Slippage estimation (Jupiter quotes)\n- [ ] Token comparison (side by side)\n- [ ] Multi-chain holder analysis\n- [ ] npm package (`npm install -g defi-mcp`)\n- [ ] Price alerts via MCP resources\n\n## Built With\n\n- [Model Context Protocol SDK](https://github.com/modelcontextprotocol/typescript-sdk) - MCP server framework\n- [DexScreener API](https://docs.dexscreener.com) - Price and market data\n- [GMGN](https://gmgn.ai) - Holder intelligence\n- TypeScript, Zod, Node.js 18+\n\n## License\n\nMIT\n\n## Author\n\n**@0xprotovox** - [Twitter](https://x.com/0xprotovox) | [GitHub](https://github.com/0xprotovox)\n\n20 years building software. Now building AI trading agents and DeFi tools.\n","readmeFilename":"README.md"}