A Crypto Portfolio MCP Server for AI Agents
How to give Claude, Codex or Gemini live on-chain portfolio data through an MCP server, and why token-only APIs make agents confidently wrong about wallets.

An AI agent asked to analyse a wallet is only as good as the data it can reach. Give it a token-only API and it will produce a fluent, well-structured, badly wrong answer — because it has no way to know that the lending, staking and perp positions were never in the response.
The Model Context Protocol is how you hand an agent a real data source. Octav ships an MCP server for exactly this.
What the MCP server exposes
Once connected, the agent can call the Octav API directly as tools — portfolio, transactions, NAV, historical snapshots and the rest of the endpoint surface — without you writing any glue code.
| Capability | What the agent can do |
|---|---|
| Portfolio | Resolve an address into decoded positions across chains |
| Transactions | Pull labelled transaction history with filters |
| NAV | Fetch a single net asset value figure |
| Historical | Ask what a portfolio looked like on a past date |
| Chains / protocols | Discover what is supported before querying |
Setup
The server is at github.com/Octav-Labs/octav-api-mcp. Add it to your MCP client configuration:
{
"mcpServers": {
"octav": {
"command": "npx",
"args": ["-y", "@octav/api-mcp"],
"env": { "OCTAV_API_KEY": "your-key" }
}
}
}Then ask in natural language:
What DeFi positions does 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 hold,
and what is the total exposure by chain?The agent calls the portfolio tool, receives decoded positions, and reasons over real data instead of guessing.
Why decoding matters more for agents than for humans
A human looking at a dashboard notices when a position is missing — they know they have a Kamino loan and can see it is absent. An agent has no prior. It treats the API response as the complete state of the world.
That makes silent omission uniquely dangerous in agent workflows. An API that returns 200 OK with half a portfolio does not produce a visible error; it produces a confident conclusion built on missing data. The mechanics of that failure are covered in Why Portfolio APIs Disagree About Net Worth.
The rest of the agent toolkit
The MCP server is one of four ways to give an agent portfolio access:
| Tool | Use it when |
|---|---|
| MCP server | The agent runs in Claude, Codex, Gemini or another MCP client |
| Agent skill | You want the agent to learn the API's shape and conventions |
| Rust CLI | The agent has shell access and you want terminal-native calls |
| x402 pay-per-call | The agent should pay per request without a provisioned key |
A note on rate limits and cost
Agents are enthusiastic. They will happily call an endpoint in a loop.
The API allows 360 requests per minute per key and bills in credits at roughly
$0.020–$0.025 each, with most endpoints costing one credit. Two practical
defences: pass multiple addresses in a single request rather than looping
(?addresses=0x123,0x456), and rely on the built-in caching — portfolio
responses cache for one minute, transactions for ten.
If you want hard spend limits per call rather than a shared key, that is what x402 is for.
Keep reading
AI AgentsAI Agent Tools for Crypto Portfolio Data
A survey of how AI agents get on-chain data — MCP servers, agent skills, CLIs and pay-per-call rails — and the failure modes specific to autonomous consumption.
2 min read
AI Agentsx402: Pay-Per-Call API Access for Agents
How the HTTP 402 status code lets an autonomous agent pay for an API request inline, removing the need to provision and manage a long-lived API key.
2 min read
AI AgentsA Rust CLI for Crypto Portfolio Data
Query multi-chain portfolios, transactions and NAV from the terminal with a single Rust binary — built for shell pipelines, CI jobs and sandboxed AI agents.
2 min read