1inch MCP Server

What is an MCP server?

An MCP server exposes tools and data to AI assistants over the Model Context Protocol (MCP) — an open standard that lets editors and agents (Cursor, Claude, VS Code Copilot, and others) call external services through natural conversation instead of hand-written API glue. The client runs the model; the MCP server provides the capabilities.

The 1inch MCP server is an AI-native integration for DeFi: your editor or CLI agent speaks to 1inch over MCP so it can execute token swaps, place limit orders, query portfolio and price data, connect a wallet, analyze Aqua liquidity, and search documentation — all through natural language.

The server is hosted at:

https://api.1inch.com/mcp/protocol

The server is listed on the official MCP Registry as com.1inch.business/mcp, so registry-aware clients (including VS Code and GitHub Copilot) can discover and install it without manually pasting the URL.

To connect it to your editor, see Supported clients.

For AI agents and automation that don't use MCP, see the LLM-optimized documentation — a machine-readable index of all APIs following the llmstxt.org specification.

Cost and access

There is no separate charge to connect to the MCP server. Swap, Orderbook, Business API access, the debug tool, and walletconnect use the same authentication and API entitlements as the rest of the 1inch Business / developer stack (standard API terms apply to those calls). Aqua strategy analytics, documentation search, the example catalog, and example source work without authentication, so you can start exploring immediately.

Non-custodial by design

The walletconnect tool relays signing requests to the user's own wallet via WalletConnect v2. The MCP server never holds private keys — the user always approves each signature or transaction in their own wallet app.

Capabilities

The MCP server exposes nine tools. The last four are public; the rest require authentication. Full parameter reference: Tools reference.

Tool Auth Description
swap Required Build quotes and execution steps for classic (Pro), intent (Fusion), and cross-chain swaps
orderbook Required Build, sign, submit, list, and cancel limit orders via the 1inch Orderbook API
product_api Required Call 1inch Business product APIs (Portfolio, Spot Price, Token, Gas Price, Web3 RPC, and more)
walletconnect Required Pair an EVM and/or Solana wallet via WalletConnect v2; sign messages and send transactions
debug Required Debug production issues: look up request logs by correlation id or time window
aqua Public Read-only 1inch Aqua strategy analytics: maker stats, strategy lists, overview, activity, volume
search Public Search documentation and API reference
list_examples Public List available SDK code examples
get_example Public Retrieve full example source (TypeScript, Go, Python, etc.)

Authentication

The public tools (aqua, search, list_examples, get_example) work without authentication. The execution tools (swap, orderbook, product_api, walletconnect, debug) require authentication via either an API key or OAuth.

API key

Pass your 1inch API key via the Authorization: Bearer <apikey> header. Get a key from the 1inch Business Portal. How to set the header depends on your MCP client — see Authentication setup for client-specific configuration.

OAuth

When you call an authenticated tool without an API key, MCP clients that support OAuth automatically prompt you to log in via the 1inch Business Portal. After authentication, all tools become available for the session. For all supported OAuth flows including client_credentials for server-to-server use, see OAuth 2.1.

Agentic use

"Agentic" here means your client runs a tool loop: the model decides which MCP tools to call, uses the results, and may call again until the task is done. You describe the outcome; the agent plans steps.

Typical tool chains

Goal How the agent usually proceeds
Swap or quote exploration Swap tool for quotes / steps; combine with doc search for mode differences (classic vs Fusion vs cross-chain)
Place a limit order Orderbook tool to build the order server-side → sign the returned typed data → submit back via orderbook
Operational checks Business API tool for token metadata, gas, spot price, portfolio P&L, etc., then map results back into your code
Connect a wallet walletconnect connect to get a pairing QR / link → user approves in their wallet → poll status → use sign / send_transaction
Debug production issues debug with a request id from API responses or a time window to retrieve logs for your account
Analyze Aqua liquidity aqua maker_stats or list_opened to find strategies → strategy_overviewstrategy_activity / strategy_volume to drill in
New feature in your repo Documentation search → example catalog → example source → apply or refactor code in your project

You do not need to name each tool: a capable client exposes them to the model; prompts like "swap 100 USDC to ETH on Base" or "find the official swap example" are enough.

Prompt patterns that work well for agents

  • Direct execution: "Swap 100 USDC to ETH on Base from my wallet 0x1234…"
  • Multi-step flows: "Place a limit order to sell 1000 USDC for 1000 USDT on Ethereum, expiring in 1 hour."
  • Outcome first: "Implement ERC-20 → USDC swap on Base in TypeScript; use 1inch MCP for docs and examples, then wire it into src/swap.ts."
  • Operational queries: "What's my portfolio P&L on Ethereum?" or "What's the current gas price on Base?"

MCP vs llms.txt for agents

MCP /llms.txt
Best for Agentic execution (swaps, orders, APIs) + interactive coding assistants Bulk context, custom RAG, CI jobs, clients without MCP
Freshness Live API access + server-side search (periodically indexed) Snapshot index you fetch and chunk yourself
Authenticated APIs Yes — swaps, orderbook, portfolio, gas, spot price, debugging, and more No — static links and summaries only

Use both if you split work: llms.txt in a pipeline for broad grounding, MCP in the IDE for grounded examples and tool-backed answers.

Limits and responsibility

  • Sessions: each client window may count as a session; agents should avoid spawning unbounded parallel MCP connections. See Too many sessions (429).
  • Approvals: your client may ask you to approve tool calls, especially OAuth or API writes. The MCP server does not bypass your org's access rules.
  • Secrets: pass API keys or headers only as documented for your client; never commit credentials.

Use of the 1inch MCP Server is subject to the 1inch Business Portal Terms of Service and the applicable Software Legal Notice. Users are responsible for ensuring compliance with applicable regulations.

Did you find what you need?