Skip to content

Commit f76b97b

Browse files
Merge branch 'NomicFoundation/hardhat' into hardhat-v-next
2 parents 697125f + 7d375f9 commit f76b97b

10,518 files changed

Lines changed: 2444137 additions & 30842 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/.skill-lock.json

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"version": 3,
3+
"skills": {
4+
"workflow-init": {
5+
"source": "vercel/workflow",
6+
"sourceType": "github",
7+
"sourceUrl": "https://github.com/vercel/workflow.git",
8+
"skillPath": "skills/workflow-init/SKILL.md",
9+
"skillFolderHash": "51e8190b4abf978532dac4e9705225c75652b9b3",
10+
"installedAt": "2026-02-22T13:21:44.400Z",
11+
"updatedAt": "2026-02-24T06:29:38.279Z"
12+
},
13+
"find-skills": {
14+
"source": "vercel-labs/skills",
15+
"sourceType": "github",
16+
"sourceUrl": "https://github.com/vercel-labs/skills.git",
17+
"skillPath": "skills/find-skills/SKILL.md",
18+
"skillFolderHash": "c2f31172b6f256272305a5e6e7228b258446899f",
19+
"installedAt": "2026-02-22T13:21:51.443Z",
20+
"updatedAt": "2026-02-22T13:21:51.443Z"
21+
},
22+
"gemini-api-dev": {
23+
"source": "google-gemini/gemini-skills",
24+
"sourceType": "github",
25+
"sourceUrl": "https://github.com/google-gemini/gemini-skills.git",
26+
"skillPath": "skills/gemini-api-dev/SKILL.md",
27+
"skillFolderHash": "5c9c6bc8cf2ef3e3b11d784a97281d721fdac0ca",
28+
"installedAt": "2026-02-25T04:16:08.363Z",
29+
"updatedAt": "2026-02-25T04:16:08.363Z"
30+
},
31+
"1inch-mcp-server": {
32+
"source": "1inch/1inch-ai",
33+
"sourceType": "github",
34+
"sourceUrl": "https://github.com/1inch/1inch-ai.git",
35+
"skillPath": "skills/1inch-mcp-server/SKILL.md",
36+
"skillFolderHash": "4dc601b333912ea9fbf39ae6a091de5378c38cd2",
37+
"installedAt": "2026-05-13T00:43:47.009Z",
38+
"updatedAt": "2026-05-13T00:43:47.009Z"
39+
},
40+
"appkit": {
41+
"source": "reown-com/skills",
42+
"sourceType": "github",
43+
"sourceUrl": "https://github.com/reown-com/skills.git",
44+
"skillPath": "skills/appkit/SKILL.md",
45+
"skillFolderHash": "69cb3fa2213f1b4f93b9b3e27b4c56052d2825b6",
46+
"installedAt": "2026-05-16T07:40:04.402Z",
47+
"updatedAt": "2026-05-16T07:40:04.402Z"
48+
}
49+
},
50+
"dismissed": {
51+
"findSkillsPrompt": true
52+
},
53+
"lastSelectedAgents": [
54+
"amp",
55+
"antigravity",
56+
"antigravity-cli",
57+
"cline",
58+
"codex",
59+
"cursor",
60+
"deepagents",
61+
"gemini-cli",
62+
"github-copilot",
63+
"kimi-code-cli",
64+
"opencode",
65+
"warp",
66+
"zed",
67+
"claude-code"
68+
]
69+
}
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
---
2+
name: 1inch-mcp-server
3+
description: >-
4+
Connect to the 1inch MCP server for documentation search, SDK examples, token swaps,
5+
limit orders, authenticated product API access, and (when registered) org-scoped log lookup. Use when the user asks about 1inch integration,
6+
DeFi swaps, classic or Fusion or cross-chain flows, orderbook, portfolio, gas or spot price APIs, API keys, MCP or IDE setup, or blockchain development with 1inch.
7+
license: MIT
8+
compatibility: Requires an MCP-capable client with HTTP transport (preferred) or stdio plus Node.js 18+ for supergateway bridging.
9+
metadata:
10+
mcp_url_production: https://api.1inch.com/mcp/protocol
11+
documentation: https://business.1inch.com/portal/documentation/ai-integration/ecosystem
12+
---
13+
14+
# 1inch MCP Server
15+
16+
This skill teaches agents how to wire and use the **1inch MCP server** so users get docs, examples, and (with auth) swaps and APIs without re-explaining setup each session.
17+
18+
## When to use this skill
19+
20+
Load this skill whenever the user’s goal depends on the **1inch MCP server** (tools, URL, or auth) or on **1inch Business** product APIs from an AI-assisted workflow.
21+
22+
**Documentation and discovery** (`search`)
23+
24+
- Explain or find behavior in 1inch docs: APIs, slippage, supported chains, rate limits, error codes, SDK usage.
25+
- Compare approaches (e.g. classic vs Fusion vs cross-chain) or look up parameters before coding.
26+
27+
**SDK examples** (`list_examples`, `get_example`)
28+
29+
- Show runnable example code: swap flows, limit orders, chain-specific snippets.
30+
- Pull source from a named example package for copy-paste or review.
31+
32+
**MCP resources** (server `resources` / `read`, if the client lists them)
33+
34+
- Use bundled guides: **swap workflow**, **classic / Fusion / cross-chain** swap guides, **quote** guide, **orderbook workflow**, and the **API index**; plus **SDK examples** as a resource—when the user wants a single structured document instead of or alongside `search`.
35+
36+
**Swaps and routing** (`swap` — requires auth)
37+
38+
- The tool does the heavy work server-side: routing, quotes, and assembling **ready-to-use** data (e.g. unsigned transaction parameters, typed data, or follow-up steps for Fusion/cross-chain). The user or wallet only **signs** and **submits** what the tool returns—no hand-built calldata in the client for normal flows. Supports **classic**, **Fusion (intent)**, and **cross-chain**; `quoteOnly` for inspection without execution.
39+
40+
**Limit orders** (`orderbook` — requires auth)
41+
42+
- Same idea: `build` runs server-side order construction; the response is **EIP-712 (or similar) data ready to sign**—then `create` with the signature, or `list` / `cancel` for lifecycle. The tool carries the orderbook API complexity; the user supplies signing and on-chain follow-through.
43+
44+
**Other product HTTP APIs** (`product_api` — requires auth)
45+
46+
- Call 1inch product endpoints exposed via the gateway: e.g. **portfolio**, **spot price**, **gas price**, **token** metadata, and other [documented](https://business.1inch.com/portal/llms.txt) paths—without re-inventing base URLs and auth for each call.
47+
48+
**Operations and support** (`debug` — requires auth, **optional** tool)
49+
50+
- Look up **organization-scoped** application logs (e.g. by `x-request-id` or time window) when the server exposes this tool and the user is debugging production or API behavior for their org.
51+
52+
**Client setup and configuration**
53+
54+
- Wire **MCP in Cursor, VS Code, Claude Desktop, Claude Code, Codex, Gemini CLI**, or other HTTP/stdio clients; set **`https://api.1inch.com/mcp/protocol`**, headers, or supergateway.
55+
- Use **API keys**, **OAuth**, or understand **which tools are public vs authenticated**.
56+
57+
**General triggers**
58+
59+
- “Connect 1inch to my IDE / agent / MCP” or “how do I authenticate for 1inch MCP.”
60+
- Building or integrating a **dapp, bot, or backend** that uses 1inch Business APIs with AI help.
61+
62+
If the question is only **unrelated off-chain** topics with no 1inch API or MCP angle, you do not need this skill.
63+
64+
## Server URL (production)
65+
66+
`https://api.1inch.com/mcp/protocol` (Streamable HTTP)
67+
68+
## Client setup (summary)
69+
70+
| Client | Transport | Config pattern |
71+
| -------------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------- |
72+
| Cursor | HTTP | `.cursor/mcp.json` -> `"url": "https://api.1inch.com/mcp/protocol"` |
73+
| VS Code Copilot | HTTP | `.vscode/mcp.json` -> `type: "http"`, same URL |
74+
| Claude Code / Codex / Gemini CLI | HTTP | CLI `mcp add` with `--transport http` and the URL |
75+
| Claude Desktop | stdio | Launch `npx -y supergateway --streamableHttp <URL> --outputTransport stdio` (see [references/AUTH.md](references/AUTH.md)) |
76+
77+
Prefer **HTTP** when the client supports it; use **supergateway** only for stdio-only clients.
78+
79+
## Tools overview
80+
81+
| Tool | Auth | Purpose |
82+
| --------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
83+
| `search` | Public | Search 1inch docs and API reference |
84+
| `list_examples` | Public | List SDK example packages |
85+
| `get_example` | Public | Fetch example source files |
86+
| `swap` | Authenticated | Quotes and swap execution flows |
87+
| `orderbook` | Authenticated | Build/create/list/cancel limit orders |
88+
| `product_api` | Authenticated | Call other 1inch product APIs |
89+
| `debug` | Authenticated | Organization-scoped request log lookup (Grafana Loki) — **optional**; only appears in `tools/list` when the deployment registers it. |
90+
91+
Full parameters: [references/TOOLS.md](references/TOOLS.md).
92+
93+
## Authentication
94+
95+
- **API key:** `Authorization: Bearer <key>` on the HTTP transport where the client allows headers.
96+
- **OAuth:** Supported by the server for interactive login when no API key is set.
97+
98+
Details and client-specific snippets: [references/AUTH.md](references/AUTH.md).
99+
100+
## Example prompts (for the user)
101+
102+
- "Search 1inch docs for how to set slippage on Base."
103+
- "Show the TypeScript swap example for Fusion on Ethereum."
104+
- "Quote swapping 100 USDC to ETH on Arbitrum" (requires auth for execution tools).
105+
- "List my open limit orders on Ethereum" / "Build a limit order to sell 1 WETH for USDC" (auth).
106+
- "What's my portfolio value on Arbitrum?" or "Fetch spot price for this token" via `product_api` (auth).
107+
- "Find logs for request id … in the last hour" when `debug` is available (auth).
108+
109+
## Progressive disclosure
110+
111+
- Load [references/TOOLS.md](references/TOOLS.md) when you need exact tool arguments or edge cases.
112+
- Load [references/AUTH.md](references/AUTH.md) when configuring headers, OAuth, or Claude Desktop bridging.
113+
114+
## Legal
115+
116+
Use of the MCP server is subject to 1inch Business Portal terms linked from the [product documentation](https://business.1inch.com/portal/documentation/ai-integration/mcp-server).
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Authentication -- 1inch MCP
2+
3+
## API key
4+
5+
Obtain a key from the [1inch Business Portal](https://business.1inch.com/portal).
6+
7+
Pass it as:
8+
9+
`Authorization: Bearer <YOUR_API_KEY>`
10+
11+
How you set this depends on the client:
12+
13+
- **Cursor** (`.cursor/mcp.json`): `headers.Authorization`
14+
- **VS Code** (`.vscode/mcp.json`): `headers.Authorization`
15+
- **Claude Code**: `claude mcp add --header "Authorization: Bearer ..."`
16+
- **Claude Desktop** (stdio via supergateway): add `--header` `Authorization: Bearer ...` to the supergateway args **after** `--streamableHttp` and URL (see product docs).
17+
18+
## OAuth
19+
20+
If the user calls an authenticated tool without a key, MCP clients that support OAuth can start a browser login against the 1inch Business Portal. After login, tools work for that session.
21+
22+
Protected tools (including the optional `debug` log lookup) need a **non-anonymous** session: a **Bearer API key** and/or **OAuth** as supported by the gateway, plus (for `debug`) organization context for log scoping. The `debug` tool is only available when the server registers it; see [TOOLS.md](TOOLS.md).
23+
24+
## Stdio bridging (Claude Desktop and similar)
25+
26+
When the client only supports stdio:
27+
28+
```bash
29+
npx -y supergateway \
30+
--streamableHttp https://api.1inch.com/mcp/protocol \
31+
--outputTransport stdio
32+
```
33+
34+
With API key:
35+
36+
```bash
37+
npx -y supergateway \
38+
--streamableHttp https://api.1inch.com/mcp/protocol \
39+
--header "Authorization: Bearer YOUR_API_KEY" \
40+
--outputTransport stdio
41+
```
42+
43+
Use **absolute paths** to `npx` and ensure `PATH` in the MCP server `env` includes your Node binary directory.
44+
45+
## Security
46+
47+
- Never commit API keys to repositories or skills.
48+
- Treat skills that mention keys as **user-supplied configuration**, not embedded secrets.
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# 1inch MCP tools -- reference
2+
3+
Production endpoint: `https://api.1inch.com/mcp/protocol`.
4+
5+
Tools expose **safety hints** to clients: read-only tools use `readOnlyHint`; tools that can change on-chain or remote state use `destructiveHint`.
6+
7+
## Public tools
8+
9+
### `search`
10+
11+
Search documentation, API references, and SDK guides.
12+
13+
| Parameter | Type | Required | Notes |
14+
| -------------- | ------- | -------- | -------------------------- |
15+
| `query` | string | Yes | Search string |
16+
| `limit` | number | No | 1-100, page size |
17+
| `page` | number | No | 1-based pagination |
18+
| `include_body` | boolean | No | Include full document body |
19+
20+
### `list_examples`
21+
22+
No parameters. Returns available SDK example identifiers.
23+
24+
### `get_example`
25+
26+
| Parameter | Type | Required | Notes |
27+
| --------- | ------ | -------- | ------------------------------------- |
28+
| `name` | string | Yes | Example id from `list_examples` |
29+
| `file` | string | No | Specific file path inside the example |
30+
31+
## Authenticated tools
32+
33+
Require API key or OAuth session. See [AUTH.md](AUTH.md).
34+
35+
### `swap`
36+
37+
Token swaps (classic, Fusion, cross-chain). Supports quote-only mode (`quoteOnly: true`), execution (returns txs or typed data to sign), and submission (`signedOrder` / `orderHash` for Fusion/cross-chain).
38+
39+
Key parameters: `src`, `dst`, `amount`, `chain`, `from`, optional `quoteOnly`, `preferredType`, `dstChain`, `slippage`, `signedOrder`, `orderHash`.
40+
41+
Prefer the product docs for the full parameter matrix and flows.
42+
43+
### `orderbook`
44+
45+
Limit orders via Orderbook API v4.1. **action** is required: `build` | `create` | `list` | `cancel`.
46+
47+
Typical flow: `build` -> user signs typed data -> `create` with signature.
48+
49+
### `product_api`
50+
51+
Proxy to 1inch product REST APIs.
52+
53+
| Parameter | Type | Required | Notes |
54+
| --------- | ----------------- | -------- | ------------------------------------- |
55+
| `method` | `"GET"` or `"POST"` | No | Default `GET` |
56+
| `path` | string | Yes | API path (e.g. portfolio, price, gas) |
57+
| `query` | object | No | Query string map |
58+
| `body` | object | No | JSON body for POST |
59+
60+
Because the tool can perform writes via POST, it is marked **destructive** at the MCP layer even when `method` is GET.
61+
62+
### `debug`
63+
64+
**Optional** — the server only registers this tool when Grafana Loki integration is enabled. It does not appear in `tools/list` otherwise.
65+
66+
Org-scoped production debugging: look up application logs in Loki. Requires the same **authenticated** access as other protected tools (Bearer and/or OAuth per gateway); organization scope comes from the gateway context.
67+
68+
**Modes:** (1) pass `requestId` (e.g. `x-request-id`) with optional `startTime` / `endTime` (defaults: 24h lookback to `endTime` or now). (2) omit `requestId` and pass `startTime` and `endTime` (RFC3339), with optional `logLevel` (`info` | `warn` | `error`) and `limit` (1–100, default 50).
69+
70+
## Machine-readable API index
71+
72+
For discovering `product_api` paths: `https://business.1inch.com/portal/llms.txt`.

0 commit comments

Comments
 (0)