MCP guide

Package crypto swaps as an MCP server

If you want AI agents to discover and trigger swap infrastructure, the cleanest approach is not a giant protocol wrapper. It is a compact tool surface around quote generation and transaction assembly.

What the MCP server should expose

Start with three tools only: health, quote, and assemble. Keep the surface area narrow so agent frameworks can reason about the workflow without guessing through extra options.

What stays outside the MCP server

API key storage, transaction signing, wallet prompts, and allowlists should stay in your application boundary. The MCP tool layer should be a controlled execution interface, not a secret manager or signer.

Why this is a real discovery channel

Agent builders look for installable tools they can trust. A narrow swap tool with clear docs and safe boundaries is far easier to adopt than a generic DeFi abstraction.

Suggested tool contract

swapifie.health checks service availability before an agent calls anything stateful.

swapifie.quote accepts validated swap parameters and returns a path ID plus route metadata.

swapifie.assemble converts an approved path ID into a transaction payload that your wallet layer can sign.