poollens-mcp
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., "@poollens-mcp check if my WETH/USDC LP position 123456 on Base is in range"
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.
poollens-mcp
MCP server for the BABA Labs PoolLens API. It gives an AI agent three tools for
concentrated-liquidity pools and LP positions on Base (Aerodrome Slipstream,
Uniswap v3-style) and HyperEVM. Every answer is read from chain in one call at
one block and carries a proof: the block number and the exact eth_call that
reproduces it. Data only: no advice, no signals, no custody.
Tool | What it answers | Cost |
| Tokens, fee, tick, price, liquidity, staked liquidity, gauge | Free |
| One position: in range or not, distance to each edge, amounts, uncollected fees | 0.005 USDC |
| All unstaked positions of an address (20 per call) and how many are out of range | 0.005 USDC |
get_pool is free. get_position and list_positions cost 0.005 USDC per call,
paid with x402 in USDC on Base at https://x402.babacapital.app/lens. No account
and no API key.
Install and run
Node 20 or newer. No install step is needed with npx:
npx -y github:babaanalytix-commits/poollens-mcpMCP client config (Claude Desktop, Cursor, and others that take this shape):
{
"mcpServers": {
"poollens": {
"command": "npx",
"args": ["-y", "github:babaanalytix-commits/poollens-mcp"],
"env": { "POOLLENS_PRIVATE_KEY": "0x..." }
}
}
}Leave out env to use the free tool only; the paid tools then return the
payment offer instead of data.
From a clone:
npm install
npm test # no money is spent; OFFLINE=1 skips the live checks
node src/server.jsRelated MCP server: dyoe-agent-tools-mcp
Paying
Without POOLLENS_PRIVATE_KEY the paid tools return the x402 offer (price,
asset, payTo, URL) instead of data, so an agent that already has an x402 wallet
tool can pay the URL itself.
With POOLLENS_PRIVATE_KEY the server pays for you. Use a small dedicated
wallet holding a little USDC on Base; no ETH is needed (the facilitator pays
gas). Before it signs anything the server checks the offer and refuses unless
all of these hold:
scheme
exact, network Base (eip155:8453), asset USDC0x8335...2913payTo is the PoolLens address
0x6C831dc0abc1aAbd9491969f72832C949b620D71the price is at or below the per-call cap
the session budget is not used up
The payee is pinned in the code. One payment per call, capped per call and per session. A failed paid call is reported and never retried. The key is read from the environment variable only and is never logged or written to disk.
Variable | Default | Meaning |
| none | Payer wallet key. Read from the environment only; never logged. |
|
| Highest price the server will sign for one call |
|
| Total the server will sign until it is restarted |
| pinned address | Only change if PoolLens announces a new payTo |
|
| Paid route |
|
| Free pool sample |
Answers
Tools return the API JSON unchanged (data, proof), plus payment on paid
calls (price, payer, transaction hash, session spend) and warnings when the
proof block was not honoured, a decimals read came back empty, or an item has
a status other than OK. NO_DATA means a read failed; it is never a zero.
Check a payment
paid-test/ makes one real paid get_position call and then checks the USDC
transfer on Base. node paid-test/verify.mjs <txHash> <payerAddress> checks any
payment without a key.
License
MIT, see LICENSE.
Available Tools
3 toolsget_poolPool state (free)ARead-only
One concentrated-liquidity pool on Base or HyperEVM: tokens, fee, current tick and price, liquidity, staked liquidity and gauge. Free. The answer is read from chain in one call at one block and comes with proof: the block number and the exact eth_call that reproduces it. Read-only data: no advice, no signals.
Inputs: pool (required), chain.
get_positionOne LP position (paid, x402)A
One LP position NFT: in range or not, distance to each range edge, token amounts, and uncollected fees exactly as collect() would pay. Costs 0.005 USDC on Base per call, paid by x402 (cap for this server: 0.005 USDC per call). Without a payer wallet it returns the payment offer instead of data. Staked positions are found by tokenId here. The answer is read from chain in one call at one block and comes with proof: the block number and the exact eth_call that reproduces it. Read-only data: no advice, no signals.
Inputs: tokenId (required), npm, chain.
list_positionsAll LP positions of an address (paid, x402)A
All unstaked LP positions an address holds on one position manager (up to 20 per call, use offset for more), with a count of how many are out of range. Staked positions are held by the gauge: query them with get_position by tokenId. Costs 0.005 USDC on Base per call, paid by x402 (cap for this server: 0.005 USDC per call). Without a payer wallet it returns the payment offer instead of data. The answer is read from chain in one call at one block and comes with proof: the block number and the exact eth_call that reproduces it. Read-only data: no advice, no signals.
Inputs: owner (required), npm, chain, limit, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
get_pool targets pool state while get_position and list_positions target LP position NFTs, so purposes are largely distinct. The split between list_positions (unstaked only, by owner) and get_position (by tokenId, includes staked) is a real boundary an agent could trip on, though the descriptions explicitly call it out.
get_pool, get_position, list_positions follow a single verb_noun snake_case pattern with the noun matching the resource being returned. No mixed conventions or vague verbs.
Three tools is on the thin side but each covers a genuinely different query shape (single pool, single position, positions by owner) and none is redundant. Slightly under-scoped for a full analytics surface rather than padded or bloated.
Pool and position reads are covered with reproducible proofs and payment handling, but there is no way to discover or list pools (an agent must already know a pool address) and no way to enumerate staked positions for an address, which the description admits is a dead end requiring per-tokenId calls.
Maintenance
Related MCP Connectors
Pay-per-call onchain reads (Base, Ethereum, Gnosis), token verdicts and LLM chat over x402 USDC
Pay-per-call onchain reads (Base, Ethereum, Gnosis), token verdicts and LLM chat over x402 USDC
Pay-per-call crypto market intelligence for AI agents. USDC on Base via x402.
Market data and web intelligence for AI agents, paid per call in USDC on Base via x402.
Related MCP Servers
AlicenseAqualityDmaintenancePre-trade DeFi intelligence for AI agents. 20 paid x402 endpoints, USDC on Base.2369 npm1MIT- AlicenseAqualityCmaintenanceTrust layer for AI agents: 22 pay-per-call x402 tools for scam and fraud checks, payment pre-flight, wallet screening, policy approvals, contact extraction and company research. Free preview with no wallet; paid calls settle in USDC on Base.2280 npmMIT
- AlicenseAqualityCmaintenanceEnables AI agents to access pay-per-call Base and Polygon onchain data (balances, tokens, transactions, gas, blocks, and trending pairs) settled in USDC via x402, with no API key required.18MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to look up token risk verdicts and ERC20 facts, wallet snapshots, gas prices, transaction summaries, and Basename resolution on the Base network. Each call is paid in USDC over x402 from a dedicated wallet the user controls, with per-call price caps and a session budget.51 npmMIT