1inch offers two complementary ways to build with AI: the MCP server — a live protocol your AI assistant uses to execute swaps, place limit orders, query APIs, and search documentation — and AI Skills, reusable instruction packages that teach agents the setup patterns. Both are free to connect, work together, and share the same authentication.
For AI agents and automation that don't use MCP, the /llms.txt index provides a machine-readable map of all APIs following the llmstxt.org specification.
Where to start
- MCP server — what it is, capabilities, authentication, and agentic use
- Tools reference — full parameter reference for all eight MCP tools
- AI Skills — teach your agent the 1inch setup once
- Supported clients — setup for Cursor, Claude, VS Code, and more
What you can do
Once connected, you work through natural conversation. Your AI assistant calls the right tools behind the scenes.
Execute token swaps
Describe the swap you want ("swap 100 USDC to ETH on Base"), and the assistant automatically finds the best rate across all available routes, handles token resolution, allowance checks, and transaction building. You only need to sign the transaction. Supports same-chain swaps (classic and Fusion) and cross-chain swaps.
Place limit orders
Create limit orders without installing any SDK. Tell your AI "place a limit order to sell 100 USDC for 100 USDT on Ethereum", and the server builds the order server-side, returns the data for you to sign, and submits it to the orderbook.
Query any 1inch API
The product_api tool gives your AI access to all 1inch Business product APIs — Portfolio, Spot Price, Token, Gas Price, Web3 RPC, Balance, NFT, Charts, Transaction Gateway, and more. Ask "what's my portfolio value on Ethereum?" or "what's the current gas price on Base?" — every API endpoint available in the 1inch Business platform is accessible through this single tool.
Connect a non-custodial wallet
The walletconnect tool pairs your AI session with a real wallet via WalletConnect v2 so the assistant can request signatures and submit transactions for you — without ever seeing your private key. Ask "connect my wallet" and the assistant returns a pairing QR (or, on mobile, a tap-to-open deep link for supported wallets like MetaMask, Phantom, Coinbase Wallet, and 1inch Wallet). After you approve, follow-up requests like "now execute that swap" go straight to your wallet. Works for EVM and Solana.
The MCP server never holds private keys. Every signature and transaction request is shown to you in your own wallet app — you approve each one.
Search documentation and browse SDK examples
Ask any question about 1inch APIs, supported chains, error codes, or integration patterns. Your AI searches across all documentation, API references, and SDK guides — no manual browsing required. You can also pull complete, working code examples directly into your conversation in TypeScript, Go, or Python.
The examples are provided in TypeScript — but your AI assistant can translate them into any language. Just ask for "the swap example in Java" or "convert this to Rust".
Example prompts
The following show the kinds of requests that work well with the 1inch MCP server and AI Skills. Adapt them to your use case.
Executing swaps
"Swap 1000 USDC to ETH on Ethereum from my wallet 0x1234..."
"Find the best rate for swapping 0.5 ETH to USDT on Arbitrum."
"Swap 100 USDC from Base to Polygon."
Managing limit orders
"Place a limit order to sell 1000 USDC for 1000 USDT on Ethereum, expiring in 1 hour."
"List my active limit orders on Ethereum for wallet 0x1234..."
Querying portfolio and token data
"What's my portfolio P&L on Ethereum for wallet 0x1234...?"
"What's the current gas price on Base right now?"
Connecting a wallet (WalletConnect)
"Connect my wallet so you can execute swaps for me."
"Pair my Phantom wallet for Solana — I'll scan the QR."
Starting a new integration
"I'm building a swap feature on Base. Show me a complete TypeScript example for swapping ERC-20 tokens using the 1inch API."
"How do I call the 1inch swap API from Python?"
The assistant retrieves the relevant SDK example with full source code — including wallet setup, token approval, swap execution, and error handling — in the language you need.
Prompting tips
- Just say what you want done. "Swap 100 USDC to ETH on Base" — the assistant handles the rest.
- Mention your chain. "on Base", "on Arbitrum", or "cross-chain from Ethereum to Polygon" helps pick the right route.
- Combine execution with research. Ask "what's the best rate for this swap?" then "now execute it" — all in the same session.
- Ask for examples when building features. The examples are tested, complete implementations that give the AI better context.