The 1inch MCP Server and AI Skills work with a wide range of AI coding assistants. This page covers setup instructions, authentication configuration, and troubleshooting for each supported client.
| Client | MCP Setup | AI Skills |
|---|---|---|
| Instructions | Install | |
| Instructions | Install | |
| OpenAI Codex | Instructions | Install |
| Gemini CLI | Instructions | Install |
| Instructions | Install | |
| Instructions | Install | |
| Instructions | Install | |
| JetBrains IDEs | Instructions | Install |
The following clients are also MCP-compatible and can connect using the generic setup below:
MCP is an open standard with rapidly growing adoption. Any MCP-compatible client can connect to the 1inch MCP Server.
Claude Code supports HTTP MCP servers natively:
Bash
12345
claude mcp add \
--transport http \
--scope user \
1inch-business \
https://api.1inch.com/mcp/protocol
Codex supports MCP servers in both the CLI and the VS Code extension:
Bash
1
codex --mcp-server "https://api.1inch.com/mcp/protocol"
For the VS Code extension, add the server in the Codex MCP settings panel with the same URL.
Gemini CLI supports HTTP MCP servers natively:
Bash
1234
gemini mcp add \
--transport http \
1inch-business \
https://api.1inch.com/mcp/protocol
Claude Desktop communicates via stdio, so you use supergateway to bridge to the HTTP server. This requires Node.js 18+.
Add the following to your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json
JSON
123456789101112131415161718
{
"mcpServers": {
"1inch-business": {
"command": "/absolute/path/to/node/bin/npx",
"args": [
"-y",
"supergateway",
"--streamableHttp",
"https://api.1inch.com/mcp/protocol",
"--outputTransport",
"stdio"
],
"env": {
"PATH": "/absolute/path/to/node/bin:/usr/bin:/bin"
}
}
}
}
Replace /absolute/path/to/node/bin with the path to your Node.js installation (e.g., /usr/local/bin or the output of dirname $(which node)).
The command and PATH fields require absolute paths because AI clients do not inherit your shell's PATH. Using npx -y ensures the latest version of supergateway is downloaded automatically.
Create or edit .cursor/mcp.json in your project root:
JSON
1234567
{
"mcpServers": {
"1inch-business": {
"url": "https://api.1inch.com/mcp/protocol"
}
}
}
Create or edit ~/.codeium/windsurf/mcp_config.json:
JSON
1234567
{
"mcpServers": {
"1inch-business": {
"serverUrl": "https://api.1inch.com/mcp/protocol"
}
}
}
Create or edit .vscode/mcp.json in your project root:
JSON
12345678
{
"servers": {
"1inch-business": {
"type": "http",
"url": "https://api.1inch.com/mcp/protocol"
}
}
}
VS Code also supports configuring MCP servers through settings.json under the "mcp" key. See the VS Code MCP documentation for additional options.
IntelliJ IDEA, WebStorm, PyCharm, and other JetBrains IDEs support MCP through the AI Assistant (2025.1+).
JSON
1234567
{
"mcpServers": {
"1inch-business": {
"url": "https://api.1inch.com/mcp/protocol"
}
}
}
The 1inch MCP tools will be available in the AI Assistant chat within your IDE.
Most MCP clients support HTTP transport and can connect directly to the server URL:
https://api.1inch.com/mcp/protocolFor clients that only support stdio transport, use supergateway to bridge to the HTTP server (requires Node.js 18+):
Bash
123
npx -y supergateway \
--streamableHttp https://api.1inch.com/mcp/protocol \
--outputTransport stdio
Configure your client to launch this as a subprocess and communicate over stdin/stdout.
Install the 1inch AI Skill so your agent knows the server URL, tools, and auth patterns automatically:
Bash
1
npx skills add 1inch/1inch-ai
No npm package required — distribution is git-based. For more details, see AI Skills.
For stdio-only clients (e.g. Claude Desktop), the skill documents the same URLs and auth patterns, but you still need the supergateway setup above for the actual MCP connection.
The public tools (search, list_examples, get_example) work without authentication. To use the execution tools (swap, orderbook, product_api, debug), pass your API key via the Authorization header. Get a key from the 1inch Business Portal.
For the conceptual overview of API key vs OAuth authentication, see Authentication.
Claude Code:
Bash
123456
claude mcp add \
--transport http \
--header "Authorization: Bearer YOUR_API_KEY" \
--scope user \
1inch-business \
https://api.1inch.com/mcp/protocol
Cursor (.cursor/mcp.json):
JSON
12345678910
{
"mcpServers": {
"1inch-business": {
"url": "https://api.1inch.com/mcp/protocol",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
VS Code Copilot (.vscode/mcp.json):
JSON
1234567891011
{
"servers": {
"1inch-business": {
"type": "http",
"url": "https://api.1inch.com/mcp/protocol",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
Claude Desktop (supergateway):
JSON
1234567891011121314151617181920
{
"mcpServers": {
"1inch-business": {
"command": "/absolute/path/to/node/bin/npx",
"args": [
"-y",
"supergateway",
"--streamableHttp",
"https://api.1inch.com/mcp/protocol",
"--header",
"Authorization: Bearer YOUR_API_KEY",
"--outputTransport",
"stdio"
],
"env": {
"PATH": "/absolute/path/to/node/bin:/usr/bin:/bin"
}
}
}
}
For other clients, consult the client's MCP documentation for how to set custom HTTP headers on the transport.
| Issue | Solution |
|---|---|
| Connection refused | Verify the command path is absolute. Check that https://api.1inch.com/mcp/protocol is reachable from your network |
| Server not appearing | Restart your AI client after modifying the configuration file. Check that the JSON is valid (no trailing commas) |
npx not found |
Ensure Node.js 18+ is installed. Use an absolute path to npx in the command field (e.g., /usr/local/bin/npx) |
| Too many sessions (429) | Each AI client window opens a separate session. Close windows you're not using, or wait 15 minutes for idle sessions to expire. This limit is specific to MCP sessions and does not affect your API usage |
| Tools not loading | Check the AI client's MCP logs for connection errors. In Cursor, use Developer: Open MCP Log from the command palette |
| Auth prompt not appearing | If using OAuth, ensure your MCP client supports OAuth flows. Alternatively, use an API key via the Authorization header (see Authentication setup). Some clients may require a restart after configuration changes |
| Stale results | Documentation indexes are updated periodically. If recently published content is missing, try again in a few minutes |