coingecko-longtail-agent MCP Server
Queries Solana JSON-RPC to validate SPL mints (mint/freeze authorities, supply, holder concentration), simulates Jupiter exit liquidity against USDC, and prepares Solana Memo v2 attestation payloads; the x402 paywall accepts native Solana USDC.
Solana Long-Tail Alpha & Risk Sentinel
Data by CoinGecko API - Superteam x CoinGecko "Long Tail" Hackathon, AI Agents track.
Live Demo & Agent Terminal UI: https://coingecko-longtail-agent.yan8925298.workers.dev (supports both live Solana queries and
?demo=1fixture mode)x402 Discovery: https://coingecko-longtail-agent.yan8925298.workers.dev/.well-known/x402
Screenshots (Live Agent Terminal UI)

An autonomous agent that discovers emerging Solana pools via CoinGecko Onchain (GeckoTerminal) API, scores them with a deterministic risk + wash-trade anomaly model, cross-checks the SPL mint on Solana JSON-RPC (mint/freeze authority, holder concentration), and produces a JSON + Markdown due-diligence dossier. Exposed as CLI, HTTP API and MCP server (/mcp), with a Solana USDC x402 paywall on the premium dossier.
Related MCP server: TailGuard MCP Server
How Coingecko API is used
Discovery & Market Telemetry (
src/coingecko.ts): Queries CoinGecko Onchain endpoints (/networks/solana/new_pools,/networks/solana/trending_pools,/networks/solana/tokens/{mint}/pools, and/search/pools?network=solana) to retrieve real-time token price, FDV, market cap, liquidity depth (reserve_in_usd), 24h volume, buyer/seller counts, and 1h/24h price deltas.Plan & Key Support: Supports both Demo (
x-cg-demo-api-key) and Pro (x-cg-pro-api-key) plans viaCOINGECKO_API_KEY+COINGECKO_PLANenv vars, with graceful keyless fallback and deterministic offline fixtures (--offline/?demo=1) for zero-key testing.Attribution: Every UI header/footer, Markdown dossier, JSON API response, and MCP tool output prominently displays
Data by CoinGecko API.
How Solana is used
SPL Mint & Holder Inspection (
src/solana.ts): Calls Solana JSON-RPC (getAccountInfowithjsonParsed+getTokenLargestAccounts) to verify token existence, decimals, supply, activemintAuthority/freezeAuthorityrug risks, and top-1 / top-10 holder concentration.Jupiter Exit-Liquidity Simulation (
src/jupiter.ts): Queries read-only Jupiter swap quotes against Solana USDC (EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v) for$500and$2,500simulated exits to flag paper liquidity vs. real exit slippage (EXIT_SLIPPAGE/NO_EXIT_ROUTE).Verifiable Solana Memo v2 Attestation (
src/memo.ts): Hashes each audit decision (SHA-256) into an unsigned Solana Memo Program v2 (MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr) instruction payload so any wallet can anchor the audit trail on-chain without the agent holding private keys.Solana USDC x402 Paywall (
src/x402.ts): Gates/premium/analyzebehind an HTTP402challenge accepting native Solana USDC (network: "solana").
Hackathon track mapping
Requirement | Where |
Solana-native | SPL mint validation + authority/holder checks ( |
CoinGecko API | Onchain endpoints: |
AI agent | Autonomous discover -> score -> verify -> report pipeline ( |
Attribution |
|
Architecture
flowchart LR
CG[CoinGecko Onchain API] --> D[Discover: new/trending/search pools]
D --> R[Risk + Anomaly scoring]
RPC[Solana JSON-RPC] --> V[SPL mint verify: authorities, top holders]
V --> R
R --> DOS[Dossier JSON + Markdown]
DOS --> CLI[CLI]
DOS --> HTTP["HTTP /analyze (free)"]
DOS --> PAY["/premium/analyze (x402 Solana USDC)"]
DOS --> MCP["MCP /mcp"]Scoring (deterministic, pure function in src/risk.ts)
Liquidity depth, liquidity/FDV, volume/liquidity turnover (wash), trades-per-unique-trader (bots), buy/sell imbalance, parabolic moves, pool age, mint & freeze authority, top-1/top-10 holder share. Output: score 0-100, level LOW/MEDIUM/HIGH/CRITICAL, anomalyScore, and itemized flags.
Setup
npm install
cp .env.example .env # optional: COINGECKO_API_KEY, SOLANA_RPC_URL, X402_*
npm test && npm run typecheck
npm run demo # offline deterministic dossierOffline fixture mode (--offline) uses built-in mocks for CoinGecko + Solana RPC; fixture mints are printed by running npx tsx src/cli.ts.
CLI
npx tsx src/cli.ts analyze <mint|query> [--premium] [--json] [--offline]
npx tsx src/cli.ts scan [limit] [--json]
npx tsx src/cli.ts serve [--offline] # HTTP + MCP on $PORT (8787)HTTP
GET /analyze?q=<mint|query>- free summaryGET /scan?limit=10GET /premium/analyze?q=<mint>- returns 402 with Solana USDC requirements (accepts[0].network = "solana"); passX-PAYMENTverified throughX402_FACILITATOR_URL.X402_DEV_MODE=1acceptsdev-paidfor local demos only.POST /mcp- JSON-RPC:initialize,tools/list,tools/call(analyze_token,scan_longtail)
Security
No keys in repo. .env is git-ignored; only a public receiving address is configured (X402_PAY_TO). Heuristics only - not financial advice.
Live smoke test
LIVE=1 npx vitest run test/live.smoke.test.ts
Built Dec 2026 for the Superteam x CoinGecko Long Tail Hackathon (AI Agents track).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Solana + pump.fun intel for agents: launch verdicts, token risk, dev/wallet records, smart money.
Solana + pump.fun intel for agents: launch verdicts, token risk, dev/wallet records, smart money.
Memecoin safety scanner for Solana, BNB and Robinhood Chain with an onchain track record
Solana token safety for AI agents — rug-pull, honeypot & Token-2022 trap detection before you buy.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables AI agents to run read-only Solana token rug and scam risk checks, producing a 0–100 score with plain-English red flags from on-chain, RugCheck, Jupiter, and DexScreener data, plus wallet and URL scans and token monitoring. It supports a hosted Streamable HTTP endpoint and a stdio bridge, with free usage limits and an agent-purchasable Pro tier.9MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to scan Solana long-tail pools, audit SPL/Token-2022 mint authorities, evaluate pre-trade swap guard verdicts, and run deterministic rug drills through four stdio tools grounded in CoinGecko on-chain data and live Solana RPC state.MIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP-compatible agents to run grounded Solana long-tail token due-diligence, pre-trade swap safety gating against CoinGecko benchmarks, autonomous pool screening, and wallet/treasury policy checks using live CoinGecko data and Solana Mainnet RPC verification. Exposes four tools (token audit, swap guard, pool scout, wallet treasury) with citation trails and ALLOW/WARN/BLOCK verdicts.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents and Blink clients to run Solana token due-diligence with traceable evidence, gate swaps by comparing live Jupiter quotes against CoinGecko benchmarks, scout DEX pools 24/7, analyze price catalysts, and audit wallet risk. Every price, liquidity, and onchain authority figure is tied to a provenance ledger entry or Solana RPC response.MIT