quoteguard-mcp
Checks and prepares Solana token swaps: resolves SPL mints and decimals, uses Solana RPC token-supply data when needed, and decodes unsigned versioned Solana transactions before the user signs.
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.
QuoteGuard: pre-trade price check for Solana agents
An autonomous agent that swaps tokens trusts whatever quote it is handed. QuoteGuard is the check it runs first: it takes a Jupiter swap quote, compares it with CoinGecko's market price, and returns ALLOW, WARN or BLOCK with every figure and the CoinGecko endpoint it came from. It never signs and never holds keys.
It ships as three front ends over one core:
Front end | For |
MCP server ( | any MCP-capable agent (Claude, Cursor, Codex, ...) |
Solana Agent Kit plugin ( | Agent Kit agents |
CLI ( | scripts, CI, humans |
Demo video (1:52): https://youtu.be/LVAsdiwYZao (mp4 mirror: https://github.com/GBMRAFLI/quoteguard-solana/releases/download/v1.0.0/quoteguard-demo.mp4)

Built for the Superteam x CoinGecko "Long Tail: AI Agents with CoinGecko Data" hackathon track (idea 5, "price check for agent trades"). All code in this repository was written from 2 Dec 2026 onward, in a new repository. It is not an existing project.
Quick start (no API key needed)
git clone https://github.com/GBMRAFLI/quoteguard-solana && cd quoteguard-solana
npm install && npm run build
node dist/cli.js check --in SOL --out USDC --amount 10
node dist/cli.js check --in SOL --out BONK --amount 50000 # BLOCK: price impact and gap
node dist/cli.js check --in USDC --out WIF --amount 100 --max-gap-bps 5
bash demo/demo.sh # the full demo, against live APIs
npm test # 21 offline testsNeeds Node 20+. Exit code is 3 on BLOCK so shell scripts and CI can gate on it. Add --json for the full report.
Optional: copy .env.example to .env and export the values. A CoinGecko key is optional but recommended:
without one, QuoteGuard uses the keyless endpoints, which are heavily rate limited and only cover CoinGecko-listed tokens.
With COINGECKO_API_KEY (a hackathon Analyst key is a Pro-plan key, so keep COINGECKO_PLAN=pro) it also uses CoinGecko's
onchain price endpoint, which covers long-tail Solana tokens that CoinGecko does not list.
Use as an MCP server
{ "mcpServers": { "quoteguard": { "command": "node", "args": ["/path/to/quoteguard-solana/dist/mcp.js"],
"env": { "COINGECKO_API_KEY": "" } } } }demo/mcp-client.mjs is a minimal MCP client that does exactly what an agent runtime does (spawn over stdio, list tools, call check_swap).
Use with Solana Agent Kit
import { SolanaAgentKit } from "solana-agent-kit";
import TokenPlugin from "@solana-agent-kit/plugin-token";
import { createQuoteGuardPlugin } from "quoteguard-solana";
const agent = new SolanaAgentKit(wallet, RPC_URL, {}).use(TokenPlugin).use(createQuoteGuardPlugin());
const r = await agent.methods.guardedTrade(agent, { inputMint: "SOL", outputMint: "USDC", amount: "10", slippageBps: 50 });
// r.executed === false: blocked, r.report explains why. true: r.signature is from the kit's own trade().The plugin also registers a CHECK_SWAP_PRICE action for LLM tool calling. The plugin matches the published
Plugin interface of solana-agent-kit 2.x (name, methods, actions, initialize) and the token plugin's
trade(agent, outputMint: PublicKey, inputAmount, inputMint, slippageBps) signature; it is tested with a stand-in agent,
not with a funded wallet.
Related MCP server: @zendiq/mcp
What it checks
gap = (fairOut - quotedOut) / fairOut, where fairOut = amountIn x CoinGecko price(in) / CoinGecko price(out).
Code | Severity | Meaning (default) |
| block | quote is worse than CoinGecko market price by more than |
| warn | worse than half the limit |
| warn | quote is better than market by more than the limit: stale/wrong reference or a trap token |
| block | Jupiter price impact above |
| warn | CoinGecko price older than 600 s |
| warn | output token 24h volume under $100k, or trade above 1% of it |
| warn | with a key: CoinGecko onchain and aggregated prices differ by more than 100 bps |
| block | fail closed: if it cannot verify, it does not allow |
All limits are parameters (policy in the library, maxGapBps / maxPriceImpactBps in the MCP tools, --max-gap-bps in the CLI).
prepare_guarded_swap goes one step further: only when the verdict allows it, it asks Jupiter to build the swap, decodes the
unsigned versioned transaction with @solana/web3.js, checks the fee payer is the requested wallet, and returns the
unsigned base64 transaction for the user's wallet to sign. A transaction built for another wallet is discarded (TX_WALLET_MISMATCH).

How CoinGecko API is used
CoinGecko is the referee: the product has no opinion about price except CoinGecko's.
GET /simple/token_price/solana(keyless): USD price, 24h volume andlast_updated_atfor both mints, withprecision=fullso tiny prices (BONK at $0.0000021) are not rounded.GET /onchain/simple/networks/solana/token_price/{mint}(key): onchain DEX-derived price for tokens CoinGecko does not list; used as the primary reference when available and cross-checked against the aggregated price.GET /coins/solana/contract/{mint}(keyless): token decimals, needed to convert raw amounts exactly.Every report lists each CoinGecko price used with its endpoint, value, volume and timestamp. Nothing in a verdict is invented: figures come from CoinGecko or Jupiter, and the arithmetic is in
src/guard.ts.Attribution: every CLI/MCP output ends with "Price data powered by CoinGecko API" and a link, per the attribution guide.
Measured with the keyless API on 2 Dec 2026: /onchain/* returned HTTP 401 without a key, and the keyless limit is easy to hit when running several checks in a row; QuoteGuard caches prices for 20 s and retries 429s with backoff. Use a key for anything beyond a demo.
How Solana is used
Solana mints and amounts: tokens are Solana SPL mints; amounts are converted with exact integer math from each mint's decimals.
Jupiter on Solana: live swap quotes (routes across Solana DEXes, price impact) and swap-transaction building.
Solana transactions: the guarded flow returns an unsigned versioned transaction that is decoded with
@solana/web3.js(fee payer, signers, instruction count) before anyone is asked to sign it.Solana Agent Kit: a plugin that gates the kit's own
tradebehind the price check.Decimals fall back to a Solana RPC
getTokenSupplycall for tokens CoinGecko does not describe.
Tests
npm test runs 21 offline tests (no network, no keys): amount math, ALLOW / WARN / BLOCK for each reason code, key and demo-plan
request headers, decimals fallbacks, fail-closed behaviour when CoinGecko is down, has no price, or Jupiter has no route,
the unsigned-transaction checks, the Agent Kit plugin, and an end-to-end MCP test that starts the real server over stdio against local stand-ins for CoinGecko and Jupiter.
node scripts/live-check.mjs is an opt-in smoke test against the real APIs.
Limits, stated plainly
It checks price sanity, not token safety (no honeypot or authority checks). Pair it with a token-security check.
Keyless mode only knows CoinGecko-listed tokens; unlisted tokens are blocked, not guessed (a CoinGecko key unlocks onchain prices).
The default thresholds are starting points. CoinGecko's price is an aggregate, so tiny gaps against any DEX quote are normal.
It never signs or sends. Wiring a signer is the caller's job.
The Jupiter keyless endpoint rate-limits too; set
JUPITER_API_KEYfor heavier use.
Layout
src/guard.ts core check + guarded swap + report formatting
src/coingecko.ts CoinGecko client (keyless / demo / pro, onchain, decimals, cache)
src/jupiter.ts quote + unsigned swap build
src/mcp.ts MCP server src/cli.ts CLI src/plugin.ts Solana Agent Kit plugin
test/ 21 tests demo/ demo.sh + MCP clientMIT licensed.
Data: price data powered by CoinGecko API.
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
Crypto transaction firewall and risk tools for MCP agents.
Pre-sign Solana tx guard for agents: ALLOW/WARN/BLOCK verdict, x402 USDC pay-per-call.
Compliance MCP for AI agents: sanctions & KYT screening on 50+ chains, stablecoin-freeze, oracle.
Warden MCP lets AI agents find tokens, quote swaps and trade onchain on Base, BNB Chain, Robinhood Chain, Arc and Solana, within limits you set. Market tools need no credential: list_chains, search_tokens, trending_tokens, price_history, quote_swap and swap_status. Search by name, ticker or contract address, read USD price candles, and price a swap before committing to it, including cross-chain swaps. Wallet tools act for the wallet whose owner connected the agent, by OAuth sign-in or a wk_ key. agent_permissions shows what the agent may do and its daily limits. prepare_swap builds a trade and hands the owner a review link to sign. With request_session the owner turns on hands-free trading in one tap, and execute_swap then trades within the limits they set. swap_status tracks gasless and cross-chain trades. get_wallet shows holdings on every chain. Gasless trading is available on Base, BNB Chain and Robinhood Chain. Built by Warden Protocol, the team behind Warden Token Terminal.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables trading tokens on Solana through Jupiter while Dexra's token and swap checks gate every buy, with sells never blocked and dry-run mode by default. Exposes token checks, preflights, fresh launches, buys and sells as tools that any MCP client can call.5MIT

@zendiq/mcpofficial
AlicenseNot gradedqualityBmaintenanceEnables agents to screen Solana tokens, triage swaps before signing, and generate optimized unsigned swap transactions with payment and budget controls through MCP tools.188 npm1MIT- 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
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to vet crypto signing requests and addresses before a user approves them, returning allow, warn or block verdicts with plain-language reasons. It covers transactions, EIP-712 typed data and EIP-7702 authorizations, plus address inspection for delegation, proxies, source verification and sanctions.MIT