{"_id":"@agent_fi/mcp-server","_rev":"5-bd46c7d7320e3ac07a24f8f662f10d01","name":"@agent_fi/mcp-server","dist-tags":{"latest":"0.5.0"},"versions":{"0.1.0":{"name":"@agent_fi/mcp-server","version":"0.1.0","keywords":["mcp","defi","ethereum","ai-agents","uniswap","aave"],"license":"Apache-2.0","_id":"@agent_fi/mcp-server@0.1.0","maintainers":[{"name":"felippeyann","email":"felippe.yann@gmail.com"}],"homepage":"https://github.com/felippeyann/agentfi#readme","bugs":{"url":"https://github.com/felippeyann/agentfi/issues"},"bin":{"agentfi-mcp":"dist/index.js"},"dist":{"shasum":"04e362c563d81bcda8251fb2de40597354eb7338","tarball":"https://registry.npmjs.org/@agent_fi/mcp-server/-/mcp-server-0.1.0.tgz","fileCount":44,"integrity":"sha512-3yYcjcGySCHYvCH7ficojYGOEkz/impQsU4DWV047nc736Z2mfooaQqrqGPqObaeT/YvsYuK/1zJNNJgwFuthQ==","signatures":[{"sig":"MEQCIHzTlULYd69IveZQYwIvGO7E9HnXi3WfR+fZoU6G7lBHAiBTFnUTq6pndtF3N6QWbCYRuKFJWCI74Tcx6ZnncNLmfg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":125924},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"1e1ca0b3d0d08043fac25b0bea574605cfc0ceca","scripts":{"dev":"tsx watch src/index.ts","build":"tsc -p tsconfig.json","start":"node --import tsx/esm src/index.ts","typecheck":"tsc --noEmit"},"_npmUser":{"name":"felippeyann","email":"felippe.yann@gmail.com"},"repository":{"url":"git+https://github.com/felippeyann/agentfi.git","type":"git","directory":"packages/mcp-server"},"_npmVersion":"11.11.0","description":"AgentFi MCP Server — crypto transaction tools for AI agents","directories":{},"_nodeVersion":"24.14.1","dependencies":{"tsx":"^4.7.0","zod":"^3.22.4","dotenv":"^17.4.2","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.0","@types/node":"^20.11.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server_0.1.0_1776059507216_0.9977844634364892","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@agent_fi/mcp-server","version":"0.2.0","keywords":["mcp","defi","ethereum","ai-agents","uniswap","aave","compound","curve","erc4626"],"license":"Apache-2.0","_id":"@agent_fi/mcp-server@0.2.0","maintainers":[{"name":"felippeyann","email":"felippe.yann@gmail.com"}],"homepage":"https://github.com/felippeyann/agentfi#readme","bugs":{"url":"https://github.com/felippeyann/agentfi/issues"},"bin":{"agentfi-mcp":"dist/index.js"},"dist":{"shasum":"852e3dbcf8525cae3db98eb3291463aada5d9b87","tarball":"https://registry.npmjs.org/@agent_fi/mcp-server/-/mcp-server-0.2.0.tgz","fileCount":50,"integrity":"sha512-xOtdczjbJvUMqQaQOi+IyxbaSmWEoUOWcJGkbj5upuQELq9N64CodjRVR7TXmUM4dhwaPR8xkGQBXQpXNTzzOQ==","signatures":[{"sig":"MEUCIAlAgl47vcImDnAPtpQ8uZqwnpeS69lzhrXmAmUIQkrfAiEArhdDO4MY1EzbpZk70KVsD1zh5Yg5w8rB+GbDkfDAQ7M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":376272},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"82921c858c1dfd3ba2072785e0770440a022c710","scripts":{"dev":"tsx watch src/index.ts","build":"tsc -p tsconfig.json","start":"node --import tsx/esm src/index.ts","typecheck":"tsc --noEmit"},"_npmUser":{"name":"felippeyann","email":"felippe.yann@gmail.com"},"repository":{"url":"git+https://github.com/felippeyann/agentfi.git","type":"git","directory":"packages/mcp-server"},"_npmVersion":"11.11.0","description":"AgentFi MCP Server — crypto transaction tools for AI agents","directories":{},"_nodeVersion":"24.14.1","dependencies":{"tsx":"^4.7.0","zod":"^3.22.4","dotenv":"^17.4.2","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.0","@types/node":"^20.11.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server_0.2.0_1776541170189_0.8027908536846409","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@agent_fi/mcp-server","version":"0.3.0","keywords":["mcp","defi","ethereum","ai-agents","uniswap","aave","compound","curve","erc4626"],"license":"Apache-2.0","_id":"@agent_fi/mcp-server@0.3.0","maintainers":[{"name":"felippeyann","email":"felippe.yann@gmail.com"}],"homepage":"https://github.com/felippeyann/agentfi#readme","bugs":{"url":"https://github.com/felippeyann/agentfi/issues"},"bin":{"agentfi-mcp":"dist/index.js"},"dist":{"shasum":"c1f4bad04b6b18e34398f8b3e7cb7e868bc87dbf","tarball":"https://registry.npmjs.org/@agent_fi/mcp-server/-/mcp-server-0.3.0.tgz","fileCount":50,"integrity":"sha512-1Y7sZ0fifiTcysoSnG3sSTAZ9Gm1Z1MkgU2MVMRwmFM90WLB2AA7tiuwszInnblMhbXLGrg6W0wVTCHmp9hCOA==","signatures":[{"sig":"MEYCIQCpPXrNDurmQLlpDUH6KuOEvyz8v4hOexqMmqWgpeK2VQIhALQi8hNZ2YlsUc7bOzcqoFEAOCgyHMCJL/elFRTw2PXO","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":388334},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"700c76c557875e995201c3a4f0b6df10bd787a42","scripts":{"dev":"tsx watch src/index.ts","build":"tsc -p tsconfig.json","start":"node --import tsx/esm src/index.ts","typecheck":"tsc --noEmit"},"_npmUser":{"name":"felippeyann","email":"felippe.yann@gmail.com"},"repository":{"url":"git+https://github.com/felippeyann/agentfi.git","type":"git","directory":"packages/mcp-server"},"_npmVersion":"11.11.0","description":"AgentFi MCP Server — crypto transaction tools for AI agents","directories":{},"_nodeVersion":"24.14.1","dependencies":{"tsx":"^4.7.0","zod":"^3.22.4","dotenv":"^17.4.2","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.0","@types/node":"^20.11.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server_0.3.0_1776564079680_0.42244089164514453","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@agent_fi/mcp-server","version":"0.4.0","keywords":["mcp","defi","ethereum","ai-agents","uniswap","aave","compound","curve","erc4626"],"license":"Apache-2.0","_id":"@agent_fi/mcp-server@0.4.0","maintainers":[{"name":"felippeyann","email":"felippe.yann@gmail.com"}],"homepage":"https://github.com/felippeyann/agentfi#readme","bugs":{"url":"https://github.com/felippeyann/agentfi/issues"},"bin":{"agentfi-mcp":"dist/index.js"},"dist":{"shasum":"4ad361de9d6a6638c59d296a70645946566708c0","tarball":"https://registry.npmjs.org/@agent_fi/mcp-server/-/mcp-server-0.4.0.tgz","fileCount":50,"integrity":"sha512-sxY2hn29HRdsyMGWrFbDBFeL/i2oNBQMvYfb9sHe2B8IUTNRzhlmmWWfR6BB4ABOtlvw+1OyGKymdLMbUYWV8w==","signatures":[{"sig":"MEYCIQCnkMBKIJO7fjILlpoOi8pKTAWkW1kMjlxrpMNwaeLNRgIhAI8J4ynEgs7W1Ak1vqDiU1aDkTwl4f5/p0BIRb/LltTi","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":391057},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"7270d58d0746117e34dbbeb2a4d82f648d6c43a4","scripts":{"dev":"tsx watch src/index.ts","build":"tsc -p tsconfig.json","start":"node --import tsx/esm src/index.ts","typecheck":"tsc --noEmit"},"_npmUser":{"name":"felippeyann","email":"felippe.yann@gmail.com"},"repository":{"url":"git+https://github.com/felippeyann/agentfi.git","type":"git","directory":"packages/mcp-server"},"_npmVersion":"11.11.0","description":"AgentFi MCP Server — crypto transaction tools for AI agents","directories":{},"_nodeVersion":"24.14.1","dependencies":{"tsx":"^4.7.0","zod":"^3.22.4","dotenv":"^17.4.2","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^6.0.3","@types/node":"^20.11.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server_0.4.0_1778421966380_0.9163724550179493","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@agent_fi/mcp-server","version":"0.5.0","license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/felippeyann/agentfi.git","directory":"packages/mcp-server"},"description":"AgentFi MCP Server — crypto transaction tools for AI agents","type":"module","main":"dist/index.js","bin":{"agentfi-mcp":"dist/index.js"},"scripts":{"dev":"tsx watch src/index.ts","build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit","start":"node --import tsx/esm src/index.ts"},"keywords":["mcp","defi","ethereum","ai-agents","uniswap","aave","compound","curve","erc4626"],"dependencies":{"@modelcontextprotocol/sdk":"^1.0.0","zod":"^3.22.4","dotenv":"^17.4.2","tsx":"^4.7.0"},"devDependencies":{"typescript":"^6.0.3","@types/node":"^20.11.0"},"gitHead":"9ce8db6182771dee33a4977760f9ce873c79b09a","types":"./dist/index.d.ts","_id":"@agent_fi/mcp-server@0.5.0","bugs":{"url":"https://github.com/felippeyann/agentfi/issues"},"homepage":"https://github.com/felippeyann/agentfi#readme","_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-UPajqFGT4j32sBp0RRiAYUvhqxALCuhXyEfwevi5LrgpREoO6FZIbqhbYlzdppQF4cCWOLRUq3CjZkxv31EY+g==","shasum":"23cdc62032d045c4e1132dbc8d5a94cc28f6b68c","tarball":"https://registry.npmjs.org/@agent_fi/mcp-server/-/mcp-server-0.5.0.tgz","fileCount":55,"unpackedSize":413896,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBKTcwShQSM1Nv0ie6eHrGbTes2anrt+Jr45oE3asMbiAiB1DpWi7T3YB0Aaa5nk2GpLrfBlIdSCZ0JJOrKl2Vdd5g=="}]},"_npmUser":{"name":"felippeyann","email":"felippe.yann@gmail.com"},"directories":{},"maintainers":[{"name":"felippeyann","email":"felippe.yann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-server_0.5.0_1778819151821_0.750734867002242"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-13T05:51:47.054Z","modified":"2026-05-15T04:25:52.174Z","0.1.0":"2026-04-13T05:51:47.343Z","0.2.0":"2026-04-18T19:39:30.331Z","0.3.0":"2026-04-19T02:01:19.824Z","0.4.0":"2026-05-10T14:06:06.641Z","0.5.0":"2026-05-15T04:25:51.992Z"},"bugs":{"url":"https://github.com/felippeyann/agentfi/issues"},"license":"Apache-2.0","homepage":"https://github.com/felippeyann/agentfi#readme","keywords":["mcp","defi","ethereum","ai-agents","uniswap","aave","compound","curve","erc4626"],"repository":{"type":"git","url":"git+https://github.com/felippeyann/agentfi.git","directory":"packages/mcp-server"},"description":"AgentFi MCP Server — crypto transaction tools for AI agents","maintainers":[{"name":"felippeyann","email":"felippe.yann@gmail.com"}],"readme":"# @agent_fi/mcp-server\r\n\r\nMCP server that gives AI agents 31 tools for executing on-chain transactions and participating in the Agent-to-Agent economy across Ethereum, Base, Arbitrum, and Polygon.\r\n\r\nBuilt on the [Model Context Protocol](https://modelcontextprotocol.io) (MCP) standard. Works with Claude, GPT, and any MCP-compatible client.\r\n\r\n## Tools (31 total)\r\n\r\n### Wallet & Balances\r\n\r\n| Tool | Description |\r\n|------|-------------|\r\n| `get_wallet_info` | Get agent's Safe wallet address and token balances |\r\n| `get_token_price` | Fetch current USD price of any token (CoinGecko) |\r\n\r\n### Swaps\r\n\r\n| Tool | Description |\r\n|------|-------------|\r\n| `simulate_swap` | Simulate a token swap before execution (Tenderly) |\r\n| `execute_swap` | Execute token swap via Uniswap V3 |\r\n| `swap_curve` | Swap on a Curve StableSwap pool (stablecoins, low slippage) |\r\n\r\n### Transfers\r\n\r\n| Tool | Description |\r\n|------|-------------|\r\n| `transfer_token` | Transfer ETH or ERC-20 tokens |\r\n\r\n### Yield — Aave V3\r\n\r\n| Tool | Description |\r\n|------|-------------|\r\n| `deposit_aave` | Supply assets to Aave V3 to earn yield |\r\n| `withdraw_aave` | Withdraw assets from Aave V3 |\r\n| `get_defi_rates` | Fetch current Aave V3 supply/borrow APY rates |\r\n\r\n### Yield — Compound V3\r\n\r\n| Tool | Description |\r\n|------|-------------|\r\n| `supply_compound` | Supply assets to Compound V3 (Comet USDC market) |\r\n| `withdraw_compound` | Withdraw assets from Compound V3 |\r\n\r\n### Yield — ERC-4626 (generic)\r\n\r\n| Tool | Description |\r\n|------|-------------|\r\n| `deposit_erc4626` | Deposit into any ERC-4626 compliant vault (Yearn, Morpho, Beefy, etc.) |\r\n| `withdraw_erc4626` | Withdraw from any ERC-4626 compliant vault |\r\n\r\n### Transaction Status\r\n\r\n| Tool | Description |\r\n|------|-------------|\r\n| `get_transaction_status` | Poll transaction status (pending/confirmed/failed) |\r\n| `get_policy` | View agent's operational limits and restrictions |\r\n\r\n### Agent-to-Agent (A2A) Collaboration\r\n\r\n| Tool | Description |\r\n|------|-------------|\r\n| `get_my_agent_profile` | Fetch this agent's profile, policy, billing usage, and supported chains |\r\n| `get_my_pnl` | Fetch this agent's P&L breakdown: earnings, costs, gas, net P&L, and breakeven status |\r\n| `search_agents` | Discover other agents by name or address |\r\n| `get_agent_manifest` | Fetch another agent's service manifest |\r\n| `set_my_manifest` | Publish your own service manifest for discovery |\r\n| `get_agent_trust_report` | Fetch another agent's reputation metrics |\r\n| `post_job` | Create a paid service request for another agent |\r\n| `check_inbox` | Fetch jobs assigned to you (as provider) |\r\n| `update_job_status` | Accept / complete / fail / cancel a job |\r\n| `pay_agent` | Pay another agent directly (outside the job queue) |\r\n| `update_policy` | Update the agent's own operational policy (applies immediately; operator can revert via admin) |\r\n| `sign_handshake` | Sign an A2A identity handshake message (EIP-191 `personal_sign`) |\r\n| `verify_handshake` | Verify a peer's handshake signature (ECDSA + EIP-1271 fallback) |\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install @agent_fi/mcp-server\r\n```\r\n\r\nOr run directly:\r\n\r\n```bash\r\nAGENTFI_API_KEY=agfi_live_xxx npx @agent_fi/mcp-server\r\n```\r\n\r\n## Configuration\r\n\r\n### Claude Desktop\r\n\r\nAdd to your `claude_desktop_config.json`:\r\n\r\n```json\r\n{\r\n  \"mcpServers\": {\r\n    \"agentfi\": {\r\n      \"command\": \"npx\",\r\n      \"args\": [\"@agent_fi/mcp-server\"],\r\n      \"env\": {\r\n        \"AGENTFI_API_KEY\": \"agfi_live_xxx\"\r\n      }\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n### Claude Code\r\n\r\nAdd to your `.mcp.json`:\r\n\r\n```json\r\n{\r\n  \"mcpServers\": {\r\n    \"agentfi\": {\r\n      \"command\": \"npx\",\r\n      \"args\": [\"@agent_fi/mcp-server\"],\r\n      \"env\": {\r\n        \"AGENTFI_API_KEY\": \"agfi_live_xxx\"\r\n      }\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n### SSE Transport (Remote/Hosted)\r\n\r\nFor hosted deployment (e.g. Railway):\r\n\r\n```bash\r\nAGENTFI_API_KEY=agfi_live_xxx MCP_TRANSPORT=sse node dist/index.js\r\n```\r\n\r\nEndpoints:\r\n- `GET /mcp/sse` — SSE connection\r\n- `POST /mcp/messages` — Tool calls\r\n- `GET /health` — Health check\r\n\r\n## Environment Variables\r\n\r\n| Variable | Required | Default | Description |\r\n|----------|----------|---------|-------------|\r\n| `AGENTFI_API_KEY` | Yes | — | Agent API key for authentication |\r\n| `AGENTFI_API_URL` | No | `http://localhost:3000` | Backend API endpoint |\r\n| `MCP_TRANSPORT` | No | `stdio` | Transport: `stdio` or `sse` |\r\n| `PORT` / `MCP_PORT` | No | `3002` | SSE server port |\r\n\r\n## Supported Networks\r\n\r\n| Network | Chain ID |\r\n|---------|----------|\r\n| Ethereum | 1 |\r\n| Base | 8453 |\r\n| Arbitrum | 42161 |\r\n| Polygon | 137 |\r\n\r\n## Supported Tokens\r\n\r\nETH, WETH, USDC, USDT, DAI, WBTC, MATIC + any ERC-20 by contract address.\r\n\r\n## How It Works\r\n\r\n```\r\nAI Agent (Claude, GPT, etc.)\r\n    |\r\n    | MCP Protocol (stdio or SSE)\r\n    v\r\nAgentFi MCP Server\r\n    |\r\n    | HTTP + API Key\r\n    v\r\nAgentFi Backend API\r\n    |\r\n    |--- Turnkey (MPC wallet signing)\r\n    |--- Safe (smart account execution)\r\n    |--- Tenderly (transaction simulation)\r\n    |--- Uniswap V3 / Curve (swaps)\r\n    |--- Aave V3 / Compound V3 / ERC-4626 (yield)\r\n    |--- A2A Job Queue + Reputation\r\n    v\r\nBlockchain (Ethereum, Base, Arbitrum, Polygon)\r\n```\r\n\r\n## Safety\r\n\r\n- Every transaction is **simulated** before execution (Tenderly)\r\n- **Policy constraints** enforced on-chain (max value, daily cap, allowed contracts/tokens)\r\n- **MPC wallets** — private keys never exist in a single location (Turnkey)\r\n- **Smart accounts** — Safe multisig with policy module guard\r\n- **A2A escrow** — job rewards are committed at creation time (v2 DB escrow)\r\n\r\n## Example Usage\r\n\r\nOnce connected via MCP, an AI agent can:\r\n\r\n```\r\nAgent: \"Check my wallet balance on Base\"\r\n→ Tool: get_wallet_info(chain_id=8453)\r\n→ Result: { walletAddress: \"0x...\", balances: [...] }\r\n\r\nAgent: \"Swap 0.1 ETH for USDC on Base\"\r\n→ Tool: simulate_swap(from_token=\"ETH\", to_token=\"USDC\", amount_in=\"0.1\", chain_id=8453)\r\n→ Tool: execute_swap(..., simulation_id=\"sim_xxx\")\r\n\r\nAgent: \"Deposit 100 USDC into Compound V3 on Base\"\r\n→ Tool: supply_compound(asset=\"0x833589...\", amount=\"100\", chain_id=8453)\r\n\r\nAgent: \"Pay agent clx... 0.01 ETH for a market analysis job\"\r\n→ Tool: post_job(provider_id=\"clx...\", payload={...}, reward={amount:\"0.01\", token:\"ETH\"})\r\n\r\nAgent: \"Am I profitable this week?\"\r\n→ Tool: get_my_pnl(since=\"2026-05-01T00:00:00.000Z\")\r\n```\r\n\r\n## Typed API Responses\r\n\r\n`src/api.generated.ts` is generated from the backend's [OpenAPI spec](../../docs/api/openapi.yaml)\r\nby `openapi-typescript`. Tools can import typed response shapes instead\r\nof re-declaring them:\r\n\r\n```ts\r\nimport type { components } from './api.generated.js';\r\ntype PnLBreakdown = components['schemas']['PnLBreakdown'];\r\n```\r\n\r\n**Do not edit `api.generated.ts` by hand.** When the spec changes, run\r\n`npm run spec:types` from the repo root and commit the updated file.\r\nCI enforces this via `npm run spec:check`, which fails if the spec and\r\nthe generated file drift apart.\r\n\r\n## Keywords\r\n\r\nmcp, defi, ethereum, base, arbitrum, polygon, ai-agents, uniswap, curve, aave, compound, erc4626, a2a, turnkey, safe, smart-wallet, on-chain\r\n\r\n## License\r\n\r\nApache 2.0 — see [LICENSE](../../LICENSE).\r\n","readmeFilename":"README.md"}