SolGuard MCP
Reads live Solana mainnet-beta JSON-RPC account data to verify SPL and Token-2022 mints, authorities, and extensions, and anchors policy decisions and ledger entries to the current slot.
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.
SolGuard MCP — Fail-Closed Solana Agent Policy Gate, Red-Team Harness & Audit Ledger
Built from scratch starting December 2, 2026 for the Superteam Earn "Long Tail: Build on Solana with CoinGecko Data" hackathon (AI Agents track).
Live Web Observability Console: https://cocvn157.github.io/solguard-mcp-agent/
GitHub Repository: https://github.com/cocvn157/solguard-mcp-agent
Demo Video (
1280×720HD,44.0s,2.16 MB): Watch / Downloadsolguard-mcp-demo.mp4(mediabranch)
SolGuard MCP prevents autonomous AI trading agents and LLM MCP clients from executing unsafe Solana long-tail swaps or prompt-injected trades. Every trade proposal passes through a deterministic 7-invariant fail-closed policy gate, gets stamped with a SHA-256 policyDecisionHash, and commits into a cryptographically hash-chained audit ledger before any simulated or devnet execution can proceed.
Attribution & Scope Notice: Market prices, trending pool liquidity,
gt_score, and holder concentration telemetry are fetched live from CoinGecko (Data provided by CoinGecko). Policy verdicts (ALLOW/DENY), slippage curves, and audit ledger hashes are computed independently by SolGuard MCP (SolGuard Independent Policy Decision).
Screenshots
1. Live Autonomous Agent Cycle (ALLOW) & Policy Slippage Frontier

2. Adversarial Prompt-Injection Trap Blocked (DENY — Token-2022 Permanent Delegate)

3. Live MCP JSON-RPC 2.0 Tool Inspector & SHA-256 Hash-Chained Ledger

Related MCP server: pnllabs-mcp
Architecture: 6 Real MCP Tools (src/mcp/handlers.ts & src/mcp/server.ts)
Run the real Node stdio JSON-RPC 2.0 MCP server (protocolVersion: "2024-11-05"):
npm run mcpOr connect any MCP client (Claude Desktop, Cursor, Antigravity):
{
"mcpServers": {
"solguard": {
"command": "npx",
"args": ["tsx", "src/mcp/server.ts"]
}
}
}Tool Name | Purpose |
| Scans CoinGecko trending Solana pools under policy depth & volatility bounds |
| Runs 7-invariant Solana RPC + CoinGecko gate, returning |
| Computes portfolio drift and CoinGecko-priced rebalance legs capped at |
| Executes 3 prompt-injection red-team probes ( |
| Commits verified decisions into a SHA-256 hash-chained audit log ( |
| Verifies chain integrity, counts |
How Coingecko API is used
Trending Long-Tail Opportunity Feed (
GET /api/v2/networks/solana/trending_pools?page=1&include=base_token): Powerssolguard_scan_longtail,agent:cycle, and the live CoinGecko scanner panel in the web console.Pool Liquidity & 24h Flow (
GET /api/v2/networks/solana/tokens/{mint}?include=top_pools): Supplies top DEX reserves, pool creation age, 24h buys/sells, and volume USD to compute constant-product (x * y = k) swap price impact and round-trip cost, ensuring the agent stays insidemaxSlippageBpsand computes quantitativemaxSafeTradeUsdremediation.Holder & Honeypot Metadata (
GET /api/v2/networks/solana/tokens/{mint}/info): Evaluates top-10 concentration, developer holding %, andis_honeypotwhile distinguishing established protocol/custody vaults (reserve >= $500kandgt_score >= 75) from unvetted meme concentration.Portfolio Rebalance Pricing (
GET /api/v3/simple/token_price/solana): Powerssolguard_rebalance_planusing live USD spot prices acrossSOL,USDC,JUP, andBONK.Resilient Cross-Runtime Fetching (
src/services/coingecko.ts): Uses a1100mspacing queue,180sTTL cache (Mapin Node /sessionStoragein browser), exponential retry on rate limits, and optionalapi/cg.tsVercel serverless proxy (COINGECKO_API_KEY).
How Solana is used
Live Mainnet-Beta JSON-RPC Account Verification (
src/services/solanaRpc.ts): Callshttps://solana-rpc.publicnode.com(getAccountInfowithjsonParsedencoding +getSlot) in both Node CLI/MCP and the browser console to decode:Classic SPL (
TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA), Wrapped SOL native mint, and Token-2022 (TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb) accounts.Live
mintAuthority,freezeAuthority, supply, and all active Token-2022extensions[](permanentDelegate,transferHook,mintCloseAuthority,transferFeeConfigbasis points).
Adversarial Guardrails: Blocks prompt-injected allocations targeting mints with active freeze authorities, shallow AMM pools, or Token-2022
permanentDelegateoverrides (demonstrated live againstPYUSDToken-2022 on mainnet).Live Mainnet Slot Anchoring: Every policy decision and hash-chained ledger trace captures the current Solana mainnet slot for reproducible audit trails.
Local Setup, CLI Cycle & Verification
git clone https://github.com/cocvn157/solguard-mcp-agent.git
cd solguard-mcp-agent
cp .env.example .env
npm install
npm test
npm run build
npm run agent:cycleWindows PowerShell: Use
npm.cmd/npx.cmd. Runs$0capital out of the box with no API keys required (COINGECKO_API_KEY=optional in.env.examplefor Vercel proxy).
Vitest Suite (
npm test): 37 tests across 5 files (policyGate,hashLedger,mcpServerJSON-RPC 2.0 dispatch,parsers,rebalance).Live Autonomous Cycle (
npm run agent:cycle): Scans CoinGecko trending Solana pools, evaluates JUP & top trending mints against Solana RPC + CoinGecko, blocks all 3 prompt-injection red-team traps, and verifies the SHA-256 hash chain.
Attribution & License
Data provided by CoinGecko. Licensed under the MIT License.
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
Pre-trade risk gating and verifiable decision evidence for AI trading agents. Oracle-backed price/safety checks across Base, Solana, Hyperliquid and BNB, plus signed receipts and portable evidence bundles for any agent action.
Pre-trade token safety checks for AI agents on Solana and Base. x402 USDC per call, no key.
Compliance MCP for AI agents: sanctions & KYT screening on 50+ chains, stablecoin-freeze, oracle.
Safe Solana swaps for AI agents with risk checks, unsigned transactions, x402, and 3-bp fees.
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

pnllabs-mcpofficial
AlicenseNot gradedqualityCmaintenanceGives AI trading agents machine-readable trust and risk verdicts on Solana by checking whether a wallet's realized PnL makes it worth copying, where its funds came from, whether a token is structurally safe, and what a given trade size would really cost in slippage. Exposes these four checks as MCP tools callable against a hosted x402 pay-per-call API, so agents can hard-stop bad trades without RPC keys, signup, or local setup.1MIT- AlicenseNot gradedqualityCmaintenanceEnforces a policy ladder for Solana AI agents so on-chain actions are vetted before signing, checking whether an action is justified, recently repeated, or targets only known programs, and applying spend, daily, and slippage caps plus recipient allowlists. Also dry-runs candidate transactions on an RPC and exposes the policy rules as agent prompt instructions.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to perform DeFi safety checks over MCP, including pre-signing transaction simulation, sanctions and scam address screening, token rug checks, risk-scored launches, and liquidation-risk assessment.66 npmMIT