AgentData - Executable Liquidity / Exit-Cost
RemoteAbout AgentData - Executable Liquidity / Exit-Cost
AgentData is a liquidity data endpoint for AI agents that computes size-aware exit costs, depeg risk, and liquidity fragility for Base tokens. It offers tiered results; the local endpoint is complete, while x402 testnet payments remain a planned phase.
Key features
- 01Estimate exit cost for a given trade size
- 02Assess liquidity fragility and depeg risk
- 03Choose quote, risk, or deep result tiers
- 04Compare cost curves and limits across sizes
Use cases
- 01Assess a token position's exit cost before trading
- 02Check depeg risk for pegged assets
- 03Compare slippage across different trade sizes
Configuration
Remote servers need no local install. Pick your client, then copy the config or install in one click.
https://agentdata-liquidity-exit-cost.onrender.com/mcp/claude mcp add --transport http phenicea-agentdata-liquidity-exit-cost https://agentdata-liquidity-exit-cost.onrender.com/mcp/{"mcpServers":{"phenicea-agentdata-liquidity-exit-cost":{"type":"http","url":"https://agentdata-liquidity-exit-cost.onrender.com/mcp/"}}}Open in Cursor{"servers":{"phenicea-agentdata-liquidity-exit-cost":{"type":"http","url":"https://agentdata-liquidity-exit-cost.onrender.com/mcp/"}}}Open in VS Code{"mcpServers":{"phenicea-agentdata-liquidity-exit-cost":{"type":"http","url":"https://agentdata-liquidity-exit-cost.onrender.com/mcp/"}}}{"mcpServers":{"phenicea-agentdata-liquidity-exit-cost":{"serverUrl":"https://agentdata-liquidity-exit-cost.onrender.com/mcp/"}}}Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.
Tools
1| Parameter | Type | Required | Description |
|---|---|---|---|
| pool | any | No | Optional: restrict the computation to a single pool id. |
| size | number | Yes | Sell size in human token units (> 0). |
| tier | enum | No | Pricing/compute tier. 'quote' = best-route exit cost only; 'risk' (default) adds fragility + depeg; 'deep' adds a multi-size exit-cost curve and cross-check.quote | risk | deep |
| token | string | Yes | Token symbol/address to exit (sell), e.g. 'WETH'. |
Details
From the project READMEAgentData — Executable Liquidity (endpoint #1)
A pay-per-call data endpoint for AI agents: size-aware exit cost, depeg risk, and liquidity fragility for a token on Base. Not raw prices — computed, normalized, decision-grade intelligence an agent needs before it acts. Settled in USDC via x402 (Phase 2). Sourced on-chain, so the derived data is cleanly redistributable.
Strategy, values, and roadmap live in
CLAUDE.md. Decisions are logged indecisions/DECISION_LOG.mdanddecisions/adr/.
What it answers
"If I try to exit this position right now, what does it actually cost me, how much can I move before slippage blows past X bps, and how fragile is that liquidity?"
Three priced tiers (single source of truth in agentdata/api/pricing.py):
| Tier | Contents | Mainnet price |
|---|---|---|
| quote | best-route exit cost for one size | $0.008 |
| risk | exit cost + fragility (+ depeg for pegged assets) — default | $0.02 |
| deep | risk + multi-size exit-cost curve + max-size-before-cost ladder | $0.04 |
Testnet forces every price to $0 (the 402 flow is still exercised end-to-end).
Layout
src/agentdata/
config.py # env-driven; NETWORK_MODE testnet|mainnet (testnet default)
compute/ # the value-add: pure, deterministic, unit-tested math
amm.py # constant-product + Solidly stable curve, exit cost
routing.py # cheapest-venue selection
depeg.py # depeg deviation / dispersion / score
fragility.py # depth + concentration + convexity -> fragility score
tiers.py # quote / risk / deep orchestration
chain/ # on-chain Base reads (Aerodrome / Uniswap), web3 lazy
provider.py # FixturePoolProvider (default) + factory
onchain.py # OnChainPoolProvider (env-gated, no guessed addresses)
api/ # FastAPI JSON layer + pricing + stable schema
monitoring/ # uptime, latency p50/p95, error rate, calls per tier
tests/ # unittest (stdlib for compute; fastapi for api)
Run it (local, no funds, no network)
pip install -e . # or: pip install fastapi pydantic 'uvicorn[standard]'
uvicorn agentdata.api.app:app --reload
# then:
curl 'http://127.0.0.1:8000/v1/liquidity/exit-cost?token=WETH&size=10&tier=risk'
curl 'http://127.0.0.1:8000/pricing'
curl 'http://127.0.0.1:8000/metrics'
Defaults: NETWORK_MODE=testnet, POOL_SOURCE=fixture (deterministic demo pools
WETH, THIN, USDX). See .env.example.
Test
# compute core needs no dependencies:
PYTHONPATH=src python -m unittest discover -s tests
Status
- Phase 1 (local endpoint): done. compute + chain seam + API + monitoring, 42 tests green.
- Phase 2 (x402 testnet): next. Payment middleware in front of the API, free testnet facilitator on Base Sepolia. No real USDC; mainnet is an escalated human decision (CLAUDE.md §0/§14).
- On-chain mode requires a verified pool registry before use (ADR-001) — the code refuses to run on guessed contract addresses rather than fake data.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.