{
  "markdown": "# ATV — DeFi Yield Vault MCP Server\n\n[![npm version](https://img.shields.io/npm/v/@aarna-ai/mcp-server-atv)](https://www.npmjs.com/package/@aarna-ai/mcp-server-atv)\n[![npm downloads](https://img.shields.io/npm/dm/@aarna-ai/mcp-server-atv?logo=npm&color=CB3837)](https://www.npmjs.com/package/@aarna-ai/mcp-server-atv)\n[![smithery badge](https://smithery.ai/badge/aarna-ai/atv)](https://smithery.ai/servers/aarna-ai/atv)\n[![MCP Registry](https://img.shields.io/badge/MCP_Registry-io.github.aarna--ai%2Fatv-blue)](https://registry.modelcontextprotocol.io/servers/io.github.aarna-ai/atv)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.x-blue?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)\n[![GitHub](https://img.shields.io/github/stars/aarna-ai/atv-sdk?style=social)](https://github.com/aarna-ai/atv-sdk)\n\nAI-native access to Aarna's tokenized yield vaults on Ethereum and Base. 20 tools for vault discovery, performance metrics, transaction building, and portfolio tracking.\n\n**API Base URL:** `https://atv-api.aarna.ai`\n**MCP Endpoint:** `https://atv-api.aarna.ai/mcp` (Streamable HTTP)\n**API Docs:** `https://atv-api.aarna.ai/docs`\n\n## API Access\n\nThe hosted API at `https://atv-api.aarna.ai` is available to anyone with a valid API key. All requests require an `x-api-key` header.\n\nTo get an API key, reach out to us at **dev@aarnalab.dev**.\n\n## Quick Start (30 seconds)\n\nOnce you have your API key, add the config to your client:\n\n### Claude Desktop\n\nEdit `~/Library/Application Support/Claude/claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"atv\": {\n      \"url\": \"https://atv-api.aarna.ai/mcp\",\n      \"headers\": { \"x-api-key\": \"YOUR_API_KEY\" }\n    }\n  }\n}\n```\n\n### Claude Code\n\n```bash\nclaude mcp add atv --transport http https://atv-api.aarna.ai/mcp --header \"x-api-key: YOUR_API_KEY\"\n```\n\n### Cursor\n\nCreate `.cursor/mcp.json` in your project root:\n\n```json\n{\n  \"mcpServers\": {\n    \"atv\": {\n      \"url\": \"https://atv-api.aarna.ai/mcp\",\n      \"headers\": { \"x-api-key\": \"YOUR_API_KEY\" }\n    }\n  }\n}\n```\n\n### VS Code (Copilot)\n\nAdd to `.vscode/settings.json`:\n\n```json\n{\n  \"mcp\": {\n    \"servers\": {\n      \"atv\": {\n        \"url\": \"https://atv-api.aarna.ai/mcp\",\n        \"headers\": { \"x-api-key\": \"YOUR_API_KEY\" }\n      }\n    }\n  }\n}\n```\n\n### mcp-remote (fallback for stdio-only clients)\n\n```json\n{\n  \"mcpServers\": {\n    \"atv\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"mcp-remote\", \"https://atv-api.aarna.ai/mcp\", \"--header\", \"x-api-key:YOUR_API_KEY\"]\n    }\n  }\n}\n```\n\n## Available Tools (19)\n\n### Discovery & Metadata\n| Tool | Description |\n|------|-------------|\n| `list_vaults` | List all vaults, optionally filter by chain |\n| `get_vault` | Get metadata for a specific vault by address |\n\n### Performance Metrics\n| Tool | Description |\n|------|-------------|\n| `get_vault_nav` | Current NAV (Net Asset Value) in USD |\n| `get_vault_tvl` | Current TVL (Total Value Locked) in USD |\n| `get_vault_apy` | APY breakdown: base + reward + total |\n\n### Operational Status\n| Tool | Description |\n|------|-------------|\n| `get_deposit_status` | Whether deposits are paused |\n| `get_withdraw_status` | Whether withdrawals are paused |\n| `get_queue_withdraw_status` | Whether queued withdrawals are paused |\n\n### Transaction Builders (Instant)\n| Tool | Description |\n|------|-------------|\n| `build_deposit_tx` | Build approve + deposit transaction steps |\n| `build_withdraw_tx` | Build withdrawal transaction steps |\n| `build_stake_tx` | Build approve + stake steps (timelock vaults) |\n| `build_unstake_tx` | Build unstake step (timelock vaults) |\n\n### Transaction Builders (Queued)\n| Tool | Description |\n|------|-------------|\n| `build_queue_withdraw_tx` | Initiate a queued withdrawal |\n| `build_unqueue_withdraw_tx` | Cancel a pending queued withdrawal |\n| `build_redeem_withdraw_tx` | Claim a completed queued withdrawal |\n\n### Analytics\n| Tool | Description |\n|------|-------------|\n| `get_vault_portfolio` | Underlying token portfolio |\n| `get_historical_nav` | NAV data points over a period (7, 30, 60, 360, max) |\n| `get_historical_tvl` | TVL data points over a period (7, 30, 60, 360, max) |\n| `get_total_tvl` | Platform-wide or per-vault TVL |\n| `get_user_investments` | User portfolio and positions |\n\n## Example Prompts\n\n- \"What DeFi vaults are available on Base?\"\n- \"What's the current APY for vault 0x...?\"\n- \"Build a deposit of 1000 USDC into vault 0x...\"\n- \"Show my portfolio across all Aarna vaults\"\n- \"Is the queue-withdraw paused on vault 0x...?\"\n\n## REST API\n\nAll endpoints require `x-api-key` header and are prefixed with `/v1`.\n\n### Vault Endpoints\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | `/v1/vaults` | List all available vaults |\n| GET | `/v1/vaults/tvl` | Platform-wide TVL |\n| GET | `/v1/vaults/:address` | Vault metadata |\n| GET | `/v1/vaults/:address/nav` | NAV price |\n| GET | `/v1/vaults/:address/tvl` | Vault TVL |\n| GET | `/v1/vaults/:address/apy` | APY breakdown |\n| GET | `/v1/vaults/:address/deposit-status` | Deposit pause status |\n| GET | `/v1/vaults/:address/withdraw-status` | Withdraw pause status |\n| GET | `/v1/vaults/:address/queue-withdraw-status` | Queue-withdraw pause status |\n| GET | `/v1/vaults/:address/portfolio` | Token portfolio |\n| GET | `/v1/vaults/:address/historical-nav` | Historical NAV (days: 7,30,60,360,max) |\n| GET | `/v1/vaults/:address/historical-tvl` | Historical TVL (days: 7,30,60,360,max) |\n\n### Transaction Endpoints\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | `/v1/deposit-tx` | Build deposit calldata |\n| GET | `/v1/withdraw-tx` | Build withdraw calldata |\n| GET | `/v1/stake-tx` | Build stake calldata |\n| GET | `/v1/unstake-tx` | Build unstake calldata |\n| GET | `/v1/queue-withdraw-tx` | Build queue-withdraw calldata |\n| GET | `/v1/unqueue-withdraw-tx` | Build unqueue-withdraw calldata |\n| GET | `/v1/redeem-withdraw-tx` | Build redeem-withdraw calldata |\n\n### Other Endpoints\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | `/v1/user-investments` | User portfolio data |\n| ALL | `/mcp` | MCP server (Streamable HTTP) |\n\n### Unauthenticated\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | `/health` | Health check |\n| GET | `/openapi.json` | OpenAPI 3.1 spec |\n| GET | `/docs` | Interactive API reference |\n| GET | `/llms.txt` | LLM-friendly documentation ([llms.txt spec](https://llmstxt.org/)) |\n| GET | `/.well-known/agent.json` | A2A agent card |\n\n## TypeScript SDK\n\n```ts\nimport { AtvClient } from '@atv/sdk';\n\nconst client = new AtvClient({\n  apiKey: 'atv_...',\n  baseUrl: 'https://atv-api.aarna.ai',\n});\n\nconst vaults = await client.vaults.list({ chain: 'base' });\nconst nav = await client.vaults.nav('0xVaultAddress');\n```\n\n## Self-Hosting\n\n```bash\ndocker build -t atv-api \\\n  --build-arg AWS_ACCESS_KEY_ID=... \\\n  --build-arg AWS_SECRET_ACCESS_KEY=... \\\n  --build-arg AWS_DEFAULT_REGION=us-east-1 .\n\ndocker run -p 3000:3000 atv-api\n```\n\nRequired environment variables (set in AWS Secrets Manager under `atv-sdk`):\n- `DATABASE_URL` — PostgreSQL connection string\n- `REDIS_URL` — Redis host:port\n- `RPC_URL_ETHEREUM` — Ethereum JSON-RPC endpoint\n- `RPC_URL_BASE` — Base JSON-RPC endpoint\n- `STRAPI_URL` — CMS URL\n- `STRAPI_API_TOKEN` — CMS API token\n- `ENGINE_BASE_URL` — Aarna engine API\n\n## Development\n\n### Prerequisites\n- Node.js 20+\n- pnpm\n- PostgreSQL\n- Redis\n\n### Setup\n\n```bash\npnpm install\ncp .env.example apps/api/.env\n# Fill in environment variables\npnpm migrate\npnpm dev\n```\n\nAPI: `http://localhost:3000` | Docs: `http://localhost:3000/docs`\n\n### Repository Structure\n\n```\natv-sdk/\n├── apps/api/              # Express API server + MCP server\n├── packages/sdk/          # TypeScript SDK (@atv/sdk)\n├── packages/mcp-server/   # npm connector package (@aarna-ai/mcp-server-atv)\n├── server.json            # MCP registry manifest\n└── docs/                  # Guides\n```\n\n### Build\n\n```bash\npnpm build\n# API: apps/api/dist/\n# SDK: packages/sdk/dist/ (CJS + ESM)\n```\n\n## Customer Onboarding\n\nSee [docs/customer-onboarding.md](docs/customer-onboarding.md) for how to generate API keys, manage tiers, revoke access, and run admin queries.\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n",
  "bytes": 8331,
  "sha": "2c3262b3565dcf3b83a95c7f58968f4a519d64a206c1c1b54bccbfcf59d7f9a4",
  "repo_slug": "aarna-ai/atv-sdk",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_aarna_ai_atv_4ab8d096/readme"
}