agentfi-mcp-server
# AgentFi
[](#-archived-2026-05-17)
[](LICENSE)
[](https://www.npmjs.com/package/@agent_fi/mcp-server)
> ## 🗄️ Archived — 2026-05-17
>
> This project is archived. The code is functional and the npm package
> remains published, but the project is no longer maintained.
>
> **Honest postmortem.** AgentFi reached technical MVP early (agent
> registration → on-chain transaction with operator fee collection
> worked) and then accumulated breadth (4 chains, 31 MCP tools, A2A
> jobs, escrow v3, revenue sharing) without ever finding a user. Over
> ~50 days the surface area grew while real adoption stayed at zero.
>
> **Why archived.** The thesis (AI agents executing autonomous DeFi
> operations) remains directionally correct, but the market is ~2-3
> years early — confidence in LLM-driven financial autonomy is the
> bottleneck, not tooling. When the market opens, well-capitalized
> incumbents (Coinbase Agent Kit, Safe modules, Anthropic-native
> primitives) will move in. No defensible moat for a solo OSS
> protocol in that window.
>
> **What's still useful here.**
> - Reference implementation of an MCP server with 31 DeFi tools.
> - Working examples of Safe v7 protocol-kit integration, Uniswap
> Routing API v2 wrapper, Aave/Compound/GMX adapters.
> - Apache-2.0 — fork freely.
>
> Live infrastructure (Fly.io backend, Upstash Redis) was decommissioned
> on archive. The maintainer's smart contracts on Base Mainnet remain
> deployed but unused.
---
**The economic layer for non-human intelligence.**
AgentFi provides crypto transaction infrastructure for AI agents on Ethereum and EVM-compatible networks. It allows agents to execute DeFi transactions (swaps, yield farming, transfers) without handling private keys or managing gas, all within a secure on-chain policy framework.
> **Start here:**
> - **[VISION.md](VISION.md)** — *why* this project exists, where it's going, and the principles behind every technical decision.
> - **[STATE.md](STATE.md)** — *what* the project is today: purpose, full stack, capabilities, phase progress.
> - **[HANDOFF.md](HANDOFF.md)** — live pending tasks, credentials inventory, new-machine setup.
---
## 📚 Documentation
All project documentation is organized in our **[Documentation Hub](docs/README.md)**.
### Quick Links
- **[Vision](VISION.md)** (required reading): Why this project exists and where it's going.
- **[Dev Quickstart](docs/dev-quickstart.md)**: Zero-credential local stack — `docker compose up` and you're running in 3 minutes.
- **[Operator Setup](docs/operations/setup-checklist.md)**: Get a real instance of AgentFi running.
- **[Graphify Code Graph](docs/graphify.md)**: Queryable codebase map for agent-assisted development.
- **[Agent Quickstart](docs/agents/quickstart.md)**: Connect your agent in < 5 minutes.
- **[System Architecture](docs/architecture/overview.md)**: Understand the 4-layer stack.
---
## 🚀 Key Features
- **Turnkey MPC Wallets** — keys split across shards and never exposed.
- **Safe Smart Wallets** — per-agent on-chain policy enforcement (limits, whitelists, kill switch).
- **Model Context Protocol** — 31 tools in [`@agent_fi/mcp-server`](https://www.npmjs.com/package/@agent_fi/mcp-server): DeFi execution, GMX perpetuals, A2A collaboration, trust, and P&L.
- **DeFi coverage** — Uniswap V3 + Curve StableSwap (swaps); Aave V3, Compound V3, and any ERC-4626 vault (yield).
- **Agent-to-Agent economy** — job queue, atomic payments, DB-level escrow (v2), reputation scoring from real metrics with time-decay.
- **Agent P&L dashboard** — per-agent breakeven detection, including real gas costs (v2).
- **Persistent identity** — optional ENS subdomains (`alice-abc123.agentfi.eth`) wired into agent registration.
- **OpenAPI 3.0.3 spec** at [`docs/api/openapi.yaml`](docs/api/openapi.yaml) — machine-readable contract for SDK generation.
- **Cross-chain** — Ethereum, Base, Arbitrum, Polygon (Base Mainnet has maintainer-deployed contracts).
- **Protocol fee engine** — basis-point fee collected on-chain atomically via `AgentExecutor`.
---
## 🛠️ Getting Started
### For Operators
1. Follow the **[Operator Setup Checklist](docs/operations/setup-checklist.md)** to fill third-party accounts and local `.env`.
2. Deploy the **[Smart Contracts](docs/operations/contract-deployment.md)** to your target chain (or reuse the maintainer-deployed Base addresses in [STATE.md](STATE.md#3-supported-networks)).
3. Deploy the backend via **[Self-Hosted Production Guide](docs/operations/production-deploy.md)** — provider-agnostic, with Railway as the reference and Fly.io / Render / Docker documented as alternatives.
### For Developers
1. Start with the **[Dev Quickstart](docs/dev-quickstart.md)** — `docker compose up` → stack running in 3 minutes, zero external accounts.
2. Run the **[A2A Collaboration Example](examples/a2a-collab/README.md)** — two-agent end-to-end flow in one file.
3. Run the **[Claude Desktop MCP Demo](docs/demos/claude-desktop-mcp.md)** — two MCP identities, discovery, A2A job, trust, and P&L.
4. Review the **[Architecture Overview](docs/architecture/overview.md)**.
5. Use the **[MCP Server](packages/mcp-server/README.md)** to integrate your agents.
---
## 🛡️ Security
AgentFi is built for security-first autonomy.
- **Simulations**: Every transaction is simulated via Tenderly before submission.
- **Guardrails**: On-chain policies prevent agents from exceeding predefined limits.
- **Kill Switch**: Operators can pause any agent's transaction ability instantly.
Found a vulnerability? See **[SECURITY.md](SECURITY.md)** for our disclosure policy.
---
## 🤝 Community
- **[Code of Conduct](CODE_OF_CONDUCT.md)**: Our community standards.
- **[Contributing](CONTRIBUTING.md)**: How to contribute to AgentFi.
- **[Changelog](CHANGELOG.md)**: Release history and notable changes.
---
## 📄 License
AgentFi is open-source and licensed under the **[Apache 2.0 License](LICENSE)**.
TDQS
Scored across 31 tools
Each tool targets a unique action and domain (A2A jobs, peer discovery, wallet management, DeFi protocols). Overlaps like multiple yield protocols are clearly separated by protocol-specific names and descriptions.
All tools follow a consistent verb_noun pattern with underscores, e.g., `check_inbox`, `deposit_aave`, `get_agent_manifest`. No mixed conventions or unclear names.
31 tools cover a broad domain (A2A + multi-protocol DeFi), which justifies the count. Slightly heavy but each tool serves a distinct purpose; no glaring redundancies.
Core A2A workflows (post/accept/complete jobs, payments, identity verification) and DeFi operations (swaps, lending, perps, rates) are well-covered. Minor gaps like job cancellation or agent deregistration exist but are acceptable.