keel-mcp
Use Keel's read-only MCP server to inspect Stellar liquidity-risk data and compare collateral/trade sizes against published safe limits.
Check Keel health, latest scanned ledger, monitored asset count, and methodology version (
keel_status).List monitored assets, filtering by risk band or fired flag (
list_assets).Resolve a ticker/code to all matching
CODE:ISSUERasset ids, without picking an issuer (find_asset).Get one asset's full risk reading: band/confidence, flags, ±2/5/10% depth, max safe collateral, concentration, and provenance; optional historical ledger (
get_asset_risk).Check a proposed collateral amount against Keel's max safe size:
within,exceeds, orunknown, and which limit binds (check_collateral_size).Bracket a buy/sell amount against measured 2/5/10% depth rungs (
estimate_trade_depth).Retrieve risk history over a ledger window or stored source, with band changes (
get_risk_history).Compare 2–10 assets side by side (
compare_assets).Get methodology version and all thresholds, noting they are chosen, not calibrated (
get_methodology).All tools are read-only, idempotent, and return provenance; they do not sign transactions or make credit decisions. README also mentions
audit_blend_pool, resources, and a prompt, but the provided schema does not list them.
Provides Keel's liquidity risk readings for Stellar assets: monitored assets with band, confidence, max safe collateral and flags; executable depth from the SDEX order book and AMM pools at +/-2%, 5% and 10%; historical band/depth/collateral over a ledger window; and collateral-size checks (within/exceeds/unknown, the binding manipulation or liquidation limit, and the ratio). Every figure carries provenance (ledger sequence, close time, methodology version) and assets are addressed as CODE:ISSUER.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@keel-mcp Is USTRY safe as collateral for a 500,000 USDC loan on Blend?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
keel-mcp
A Model Context Protocol server for Keel, the liquidity risk engine for Stellar. It lets an AI agent (Claude Desktop, Claude Code, Cursor, or any MCP client) answer questions like these with Keel's own numbers:
"Is USTRY safe as collateral for a 500,000 USDC loan?"
"How much AQUA can I sell before the price drops more than 5%?"
"Which monitored assets are CRITICAL right now, and why?"
"What did Keel see at ledger 61340263, the Blend exploit?"
An oracle answers what is the price. Keel answers what volume can that price actually
support: executable depth from the SDEX order book and AMM pools at +/-2%, 5% and 10%, and the
largest collateral position that liquidity can safely back. This server exposes those figures
to agents. It reads the public API at https://api.keels.app/v1; the dashboard is at
keels.app.
Install
Requires Node.js 20 or newer.
Claude Code
claude mcp add keel -- npx -y @keel-official/mcpClaude Desktop (claude_desktop_config.json) and Cursor (.cursor/mcp.json)
{
"mcpServers": {
"keel": {
"command": "npx",
"args": ["-y", "@keel-official/mcp"]
}
}
}From a checkout, before the package is published:
npm install && npm run build
claude mcp add keel -- node /absolute/path/to/keel-mcp/dist/index.jsConfiguration
Variable | Default | Purpose |
|
| Point at another deployment, or at the contract mock ( |
|
| Per request timeout |
|
| Cache for the asset list and methodology. Scans run every 15 minutes |
|
| Soroban RPC used by |
Related MCP server: @xrpl-utilities/mcp
Tools
Every tool is read-only and returns two things: a short text answer for the model, and the exact figures as structured JSON. Every answer carries its provenance: ledger sequence, ledger close time, data source, methodology version, and how far behind the latest ledger the data is.
Tool | Answers |
| Is the engine healthy, which ledger was scanned last, how many assets are monitored |
| Monitored assets with band, confidence, max safe collateral and flags. Filter by |
| Resolves a code ( |
| The full reading for one asset, or a historical reconstruction with |
|
|
| Which measured rung (2%, 5%, 10%) absorbs a buy or sell size, or that it exceeds them all |
| Band, depth and collateral over a ledger window or every stored reading of one source, with band changes |
| 2 to 10 assets side by side |
| Methodology version, every threshold, and the calibration note |
| A Blend lending pool's collateral caps and current supply set beside Keel's safe size for each asset (see below) |
Resources: keel://methodology (JSON) and keel://report/blend-february-2026, the open
backtest report on the February 2026 Blend incident.
Prompt: assess_collateral(assetId, amount, protocol?) runs the tools in order and
asks for an answer that states the verdict, the binding limit, the band and its confidence,
every unevaluated flag, and the provenance.
Blend Pool Cap Audit
audit_blend_pool (and npm run audit:blend, which writes a markdown and a JSON report to
reports/) reads a Blend V2 lending pool from Stellar: every reserve's collateral factor,
supply cap, total supplied and total borrowed, and the pool oracle's price. For each reserve
that can back a loan it converts the supply cap (what the pool is configured to accept)
and the total supplied (what it holds now) to USDC at Keel's executable price, and sets
both beside Keel's maxSafeCollateral.
Per reserve it answers supplied_exceeds, cap_exceeds, within, unknown,
not_monitored or not_collateral (collateral factor 0 or disabled), plus the gap between
the Blend oracle price and Keel's executable price.
Three things to know when reading it, and every report prints them:
Keel's safe size is defined for ONE collateral position. Reading a whole reserve against it is the natural reading for liquidations (they all sell into the same book) and a conservative one for manipulation (an attacker controls one position).
Keel measures liquidity on Stellar only. XLM, with deep centralized-exchange markets, reads as far riskier here than its whole market is. "Exceeds" means "exceeds what Stellar itself can absorb", which is what an on-chain liquidation depends on.
It is a comparison with published figures, not a recommended cap. Keel computes no cap of its own.
Known pools: YieldBlox and Fixed (Blend V2 mainnet). Any other pool can be passed by
contract id.
Example
You: Is USTRY safe as collateral for a 500,000 USDC loan on Blend?
Agent (calls
find_asset,get_asset_risk,check_collateral_size): No. 500,000 USDC is 7.23x Keel's recommended maximum of 69,120.49 USDC forUSTRY:GCRY...MYWC. The binding limit is manipulation: pushing the price to the critical level through the order book caps the size well below the liquidation limit (133,252.90). USTRY is in band HIGH with partial confidence, so the band is a floor: HOLDER_CONCENTRATION_EXTREME fired (the largest holder has 91.46%), and NO_GENUINE_TRADE_30D, NO_GENUINE_TRADE_7D and WASH_TRADE_SUSPECTED could not be evaluated. Ledger 64657818, methodology 1.0.8-draft. Keel's thresholds are chosen, not calibrated.
(Figures from the live API on 28 September 2026. Yours will differ.)
How it keeps answers honest
These rules come from Keel's engine and are enforced here as well:
An asset is
CODE:ISSUER, never a ticker. Several issuers publishUSDY.find_assetreturns all of them and the agent is told to ask.Provenance on every answer. Ledger and methodology version travel with every number, so anything an agent says can be checked against the API.
Unknown is not safe. A figure the engine could not compute is reported with the reason Keel gives, never as zero.
check_collateral_sizeanswersunknownrather than guessing.Unevaluated is not clear. Flags that could not be checked are listed as such, and a
partialband is described as a floor.No new methodology. The server compares an amount with figures the engine published.
estimate_trade_depthgives a bracket between measured rungs, not an interpolated point, because the methodology defines no interpolation.Exact decimals. Every monetary comparison uses
decimal.js, never floating point.
What this server will never do
Sign or submit a transaction, or hold a key. Keel is permanently read-only. The Keel API is read with GET only, and the test suite fails if
src/issues anything else. Blend pools are read through Soroban RPC withgetLedgerEntries, and oracle prices withsimulateTransactionon an unsigned, never-submitted transaction, which is how a Soroban contract is read.Publish a price feed or act as an oracle.
Send alerts, webhooks or notifications.
Make a credit or investment decision. It reports liquidity; the lender decides.
Development
npm install
npm run typecheck
npm test
npm run build
npm run inspect # MCP Inspector against the built serverThe API types in src/api/schema.d.ts are generated from openapi/keel-openapi.yaml, a copy of
the contract in keel-backend. Refresh both with
npm run sync:contract (it expects ../keel-backend, or pass a path). A test fails when the
copied contract's version differs from keel.contractVersion in package.json, so drift is
visible rather than silent.
Releasing
Releases run in GitHub Actions (.github/workflows/publish.yml), which publishes the npm
package with provenance and then publishes server.json to the MCP Registry through GitHub
OIDC. The registry grants io.github.Keel-Official/* to workflows in this repository, so no
personal login or OAuth approval is involved.
Bump
versioninpackage.json, bothversionfields inserver.json, andSERVER_VERSIONinsrc/server.ts. A test fails if they disagree.Commit, then
git tag vX.Y.Z && git push origin vX.Y.Z.
The workflow needs a repository secret NPM_TOKEN (granular token, publish access to
@keel-official). Both publish steps skip a version that already exists, so a manual
Run workflow is always safe to repeat.
License
MIT
Available Tools
9 toolscheck_collateral_sizeCheck a collateral size against KeelARead-onlyIdempotent
Compares a proposed collateral amount with Keel's recommended maximum safe collateral size for the asset, and says which limit binds: liquidation (the book cannot absorb a forced sale) or manipulation (pushing the price up is cheaper than the loan it would unlock). Answers within, exceeds, or unknown. Unknown is not safe and not unsafe. This is a comparison with published figures, not a credit decision.
Inputs: amount (required), assetId (required), quote.
compare_assetsCompare Stellar assets side by sideARead-onlyIdempotent
Side-by-side comparison of 2 to 10 assets: band and confidence, max safe collateral, depth at 5% on both sides, and fired flags, each with its own ledger. Useful for choosing between collateral candidates. Figures are all in USDC.
Inputs: assetIds (required).
estimate_trade_depthPrice impact bracket for a trade sizeARead-onlyIdempotent
For traders and market makers: places a buy or sell size (in the quote asset, USDC) between the measured rungs of Keel's depth ladder, answering 'this moves the price by at most 2% / 5% / 10%' or 'this exceeds the measured depth'. It is a bracket, never a point estimate, because the methodology defines no interpolation between rungs. Depth combines the SDEX order book and AMM pools.
Inputs: side (required), amount (required), assetId (required), quote.
find_assetFind a Keel asset id by codeARead-onlyIdempotent
Resolves an asset code such as USDY or AQUA to the full CODE:ISSUER ids Keel monitors. When one code has several issuers, ALL of them are returned and none is chosen: ask the user which issuer they mean rather than picking one, because the same ticker from a different issuer is a different asset.
Inputs: code (required), issuer.
get_asset_riskLiquidity risk of a Stellar assetARead-onlyIdempotent
The full Keel risk reading for one asset: risk band and its confidence, fired and unevaluated flags, executable depth at +/-2%, 5% and 10% (SDEX order book plus AMM pools), recommended maximum safe collateral size with its liquidation and manipulation terms, holder concentration, volume to supply, and the last genuine trade. Pass ledger to read a historical reconstruction instead of the latest scan. Always quote the provenance line with the numbers.
Inputs: assetId (required), quote, ledger.
get_methodologyKeel methodology and thresholdsARead-onlyIdempotent
The methodology version and every threshold Keel uses to fire flags and size collateral, with the link to the full documentation. The thresholds are chosen, not calibrated against a set of incidents; mention that when explaining why an asset got its band.
Inputs: no named parameters.
get_risk_historyRisk history of a Stellar assetARead-onlyIdempotent
A time series of band, flags, depth and max safe collateral for one asset, from ONE data source. Give from and to (ledger sequences, at most 90 days apart) for a window, or omit both to list every stored reading of that source. Reconstructions such as the February 2026 USTRY series live under source offers-implied and are reachable only with both bounds omitted. Band changes are summarised.
Inputs: assetId (required), to, from, limit, +3 more.
keel_statusKeel service statusARead-onlyIdempotent
Whether the Keel engine is healthy, the ledger of its latest scan, how many Stellar assets it monitors, and the methodology version its numbers follow. Call this first when freshness matters.
Inputs: no named parameters.
list_assetsList monitored Stellar assetsARead-onlyIdempotent
Lists the Stellar assets Keel monitors with their risk band, band confidence, recommended maximum safe collateral size (USDC) and fired flags. Filter by band (e.g. CRITICAL) or by a single flag (e.g. MANIPULATION_CHEAP) to find risky collateral.
Inputs: band, limit, offset, hasFlag.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool targets a distinct query: engine status, asset inventory, code resolution, per-asset risk, collateral comparison, trade depth, history, comparison, and methodology. The only mild overlap is between get_asset_risk (full reading including depth rungs) and estimate_trade_depth (bracket for a given size), but their stated purposes differ enough to guide selection.
Nearly all names follow a verb_noun pattern (list_assets, find_asset, get_asset_risk, check_collateral_size, estimate_trade_depth, get_risk_history, compare_assets, get_methodology). The lone exception is keel_status, which uses a server-name prefix instead of a verb, a minor deviation.
Nine tools is well-scoped for a read-only risk analytics server, with each tool covering a distinct query type (inventory, detail, history, comparison, methodology). No redundant or filler tools.
The surface covers the full read lifecycle for the domain: health, asset discovery, resolution, risk readings, historical reconstruction, comparison, collateral sizing, depth estimation, and methodology. There is no alert/watchlist or portfolio-level monitoring capability, but for a query-oriented analytics server the coverage is strong.
Maintenance
Related MCP Connectors
XRPL token rug-checks, issuer reputation & AMM data for AI agents. Pay-per-call USDC via x402.
Read-only XRP Ledger token-risk, issuer-authenticity and wallet-security checks.
Smart-contract risk reports for AI agents on 20 EVM chains, paid per call via x402 ($0.02 USDC).
Compliance-gated stablecoin settlement + x402 macro/ESG/climate intelligence for agents. 115 tools.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to access real-time crypto risk intelligence with two tools: Flare for precursor detection and Core for overall risk environment assessment.4-
- AlicenseBqualityBmaintenanceExposes 17 read-only tools from six XRPL-Utilities services so AI agents can access XRPL wallet analysis, signal feeds, macro telemetry, permissioned asset stacks, RWA tracking, and ETF flow data.41176 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to check DeFi liquidation risk levels for lending protocols like Aave, Compound, and Morpho, including at-risk positions, liquidation prices, current prices, and aggregate exposure. Access is pay-per-call via x402 micropayments with USDC on Base, requiring no API key or signup.MIT
- AlicenseAqualityCmaintenanceRead-only XRPL token and wallet checks with issuer-aware explanations, impersonation checks and spoken summaries. Built for Zach Riehn's XRP Ledger Trading Lab by AI coding agents under Zach's direction. Never signs or sends transactions; findings describe observed ledger evidence, not a guarantee of safety or investment advice. Try it: https://cocoeatsai.com/trading-lab/token-guard/3MIT