solana-perps-funding-guard
Reads Solana Mainnet-Beta L1 RPC state to verify Jupiter JLP pool AUM, custody SPL vault reserves, and Jupiter/Drift program liveness, and audits Solana perpetual market funding, basis, and open interest for pre-trade risk.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Solana Perps Funding Guard
Live Terminal: https://xgbtxy.github.io/solana-perps-funding-guard/
Live Snapshot JSON: https://xgbtxy.github.io/solana-perps-funding-guard/data/snapshot.json
Daily Brief: docs/data/daily-brief.md
Zero-dependency, read-only, keyless pre-trade risk engine, live web terminal, and JSON-RPC 2.0 MCP server for Solana Perpetuals & Prediction Markets.
It combines Solana Mainnet-Beta L1 RPC state verification (Jupiter Perps JLP Pool on-chain AUM + 6 custody SPL vault reserves + Jupiter/Drift program liveness), live Solana perp DEX funding & mark-vs-index basis feeds (Pacifica & GMX Perpetuals V2 Solana), and live Polymarket Gamma prediction-market probabilities to flag crowded leverage, extreme basis dislocation, and cross-market event-risk divergence before an agent or trader opens a position.
Live Verified Snapshot Metrics
Solana Mainnet-Beta L1 Slot:
478,308,666(Epoch1107)Jupiter JLP Pool On-Chain AUM:
$587,167,895.93(decoded directly from Anchor account bytes on5BUwFW4nRbftYTDMbgxykoFWqWHPzahFSNAaaaJtVKsq, 6 verified custodies + live SPL token vault balances)Executable Perp Programs Verified: Jupiter Perps (
PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu) & Drift Protocol V2 (dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH+ State PDA)Tracked Live Solana Perp Markets:
172perpetual pairs across2Solana venues ($179.09MOpen Interest,$426.51M24h Volume)Linked Live Prediction Markets:
12active crypto & macro Polymarket Gamma contracts
Related MCP server: Sol MCP — Solana Token Risk & Signals
Architecture
flowchart LR
A[Solana Mainnet L1 RPC\nJLP Pool + 6 Custodies + Programs] --> D[scripts/collect.mjs\nFail-Closed Validator + Atomic Write]
B[CoinGecko Derivatives API\nSolana Perps Funding/Basis/OI] --> D
C[Polymarket Gamma API\nActive Crypto & Macro Probabilities] --> D
D --> E[docs/data/snapshot.json\n+ daily-brief.md]
E --> F[lib/guard.mjs\nDeterministic 0-100 Risk Engine]
F --> G[mcp/server.mjs\n4-Tool JSON-RPC 2.0 Stdio MCP]
F --> H[bin/perps-guard.mjs\nZero-Dep CLI]
E --> I[docs/index.html\nDark Quant Static Terminal]Deterministic Pre-Trade Risk Scoring (0–100)
Every Solana perpetual market is scored transparently across 4 factors:
Funding Crowding (
0–45): Annualized funding APR (8h rate × 1095).Basis Dislocation (
0–30): Mark-vs-index spread((last - index) / index) × 100.Liquidity & Spread Fragility (
0–15): Open interest depth and bid-ask spread.Sticky Crowding Turnover (
0–10): Open interest relative to 24h volume.
Verdicts: SAFE (0–34), CAUTION (35–64), BLOCK (65–100).
Quickstart (Zero npm install Required)
Requires Node.js 20+.
# 1. Refresh live Solana L1 + Perps + Polymarket snapshot
npm run collect
# 2. Run syntax checks & 17 unit + MCP E2E tests
npm run check
npm test
# 3. CLI pre-trade checks
node bin/perps-guard.mjs audit SOL --side LONG
node bin/perps-guard.mjs alerts --limit 10 --min-oi 10000
node bin/perps-guard.mjs hedge BTC
node bin/perps-guard.mjs healthMCP Server Integration (4 Keyless Read-Only Tools)
Add to Claude Desktop, Cursor, or any MCP stdio client:
{
"mcpServers": {
"solana-perps-funding-guard": {
"command": "node",
"args": ["mcp/server.mjs"]
}
}
}Tool | Purpose |
| Audit funding APR, basis %, OI, risk score (0–100), |
| Rank top Solana perp contracts by squeeze risk, funding APR, or basis dislocation |
| Detect cross-market event-risk divergence between Solana perps and live Polymarket probabilities |
| Return live Solana Mainnet L1 slot, JLP Pool AUM, program liveness, and snapshot freshness age |
On-Chain Decode Honesty & Fail-Closed Design
Jupiter JLP Pool (
5BUwFW4nRbftYTDMbgxykoFWqWHPzahFSNAaaaJtVKsq) and its 6 Custody accounts are decoded directly from verified Solana Mainnet account offsets (name,custodies,aum_usd,mint,decimals,is_stable, and SPL Token Accountamountat byte 64). Internal fee/borrowing curves are intentionally left undecoded rather than guessed.validateSnapshot()runs fail-closed before any atomic write: if RPC slot<= 0or live markets are empty, the collector exits non-zero and preserves the last known good snapshot.
License
MIT © 2026 xgbtxy
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
Parallel Solana token risk and transaction safety for AI agents. Paid MCP tools inspect tokens and unsigned transactions; the HTTP risk panel queries compatible advisors in parallel and returns an indicative consensus. x402-compatible clients pay USDC automatically, with no signup or API key.
Pay-per-call ($0.005-$0.03 USDC) market, on-chain, and prediction-market data API for AI agents and trading bots via x402 — no signup, no API key. Remote MCP server, 28 tools: token security (honeypot/liquidity/counterfeit checks), Hyperliquid oracle-gap risk, kimchi premium, funding APR, DEX slippage, Polymarket arbitrage/liquidity audits, Hyperliquid HIP-4 odds.
Read-only crypto MCP: markets, funding, spreads, DeFi, prediction markets, explorer & RPC.
Solana address risk grades and token scans for AI agents. Pay-per-call via x402 (USDC on Base).
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server for real-time Solana token risk analysis. Cross-references RugCheck.xyz, DexScreener, and GoPlus Security to generate three-layer reports: machine verdict → LLM analysis → raw on-chain evidence. Live on Solana mainnet with USDC micropayments ($0.02/audit). Give any AI agent the ability to check if a token is safe before trading.2MIT
- AlicenseAqualityDmaintenanceReal-time Solana token risk scoring, momentum signals, and graduation alerts via MCP. Free tier with 4 tools (no auth), PRO tier with 6 tools + batch analysis ($0.01/call via x402).61MIT
- AlicenseAqualityCmaintenanceOn-chain Solana cabal & rug detection as an MCP server. Scans any Solana token mint before your agent buys and returns an Exit-Liquidity Risk verdict.169 npm2MIT
- AlicenseAqualityBmaintenanceTrace hidden insider wallet clusters behind Solana tokens before you ape — safety score, honeypot & LP-lock check, no signup for first 5 calls/day.3MIT