@arcadia-finance/mcp-server 0.6.1 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +249 -248
- package/README.md +152 -95
- package/dist/clients/chain.js +3 -3
- package/dist/config/cache-hints.js +10 -0
- package/dist/index.js +2 -1
- package/dist/prompts/workflows.js +2 -2
- package/dist/tools/dev/send.js +5 -19
- package/dist/tools/read/asset-managers.js +3 -8
- package/dist/tools/read/assets.js +1 -1
- package/dist/tools/read/strategy.js +3 -3
- package/dist/tools/read/wallet.js +1 -1
- package/llms-full.txt +5 -5
- package/llms.txt +3 -3
- package/package.json +21 -18
- package/server.json +9 -2
- package/skills/clamm-liquidity/SKILL.md +45 -43
- package/skills/clamm-liquidity/selection.md +24 -27
- package/skills/clamm-liquidity/strategies.md +29 -30
- package/skills/openclaw/SKILL.md +0 -104
- package/skills/openclaw/arcadia.sh +0 -80
- package/skills/openclaw/contracts.md +0 -66
- package/skills/openclaw/wallet-signing.md +0 -11
package/README.md
CHANGED
|
@@ -3,20 +3,137 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/@arcadia-finance/mcp-server)
|
|
4
4
|
[](https://www.npmjs.com/package/@arcadia-finance/mcp-server)
|
|
5
5
|
[](LICENSE.md)
|
|
6
|
-
[](https://smithery.ai/servers/arcadia-finance/mcp-server)
|
|
6
|
+
[](https://www.typescriptlang.org/)
|
|
7
|
+
[](https://modelcontextprotocol.io/)
|
|
9
8
|
[](https://lobehub.com/mcp/arcadia-finance-mcp-server)
|
|
10
9
|
[](https://glama.ai/mcp/servers/arcadia-finance/mcp-server)
|
|
10
|
+
[](https://mcptry.com/servers/io.github.arcadia-finance/mcp-server)
|
|
11
|
+
[](https://mcprush.com/to/arcadia-finance-mcp?ref=badge)
|
|
11
12
|
|
|
12
|
-
MCP server for [Arcadia Finance](https://arcadia.finance), a platform for concentrated liquidity on Uniswap and Aero with automated rebalancing, compounding, yield optimization, and leverage, or single-sided liquidity into lending pools. Read protocol data and build unsigned transactions for LP management, borrowing
|
|
13
|
+
MCP server for [Arcadia Finance](https://arcadia.finance), a platform for concentrated liquidity on Uniswap and Aero with automated rebalancing, compounding, yield optimization, and leverage, or single-sided liquidity into lending pools. Read protocol data and build unsigned transactions for LP management, borrowing and deposits. Live on Base, Optimism, Unichain and Robinhood.
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
## Quick start
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
The hosted server needs no install and no API key:
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
```
|
|
20
|
+
https://mcp.arcadia.finance/mcp
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
[](https://insiders.vscode.dev/redirect/mcp/install?name=arcadia-finance&config=%7B%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fmcp.arcadia.finance%2Fmcp%22%7D)
|
|
24
|
+
[](https://cursor.com/en/install-mcp?name=arcadia-finance&config=eyJ1cmwiOiJodHRwczovL21jcC5hcmNhZGlhLmZpbmFuY2UvbWNwIn0%3D)
|
|
25
|
+
|
|
26
|
+
Most clients accept this config:
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"mcpServers": {
|
|
31
|
+
"arcadia-finance": {
|
|
32
|
+
"url": "https://mcp.arcadia.finance/mcp"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
<details>
|
|
39
|
+
<summary>Claude Code</summary>
|
|
40
|
+
|
|
41
|
+
Install the plugin, which adds the server and the `clamm-liquidity` skill:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
/plugin install arcadia --marketplace arcadia-finance/mcp-server
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
On Claude Code older than 2.1.275, run `/plugin marketplace add arcadia-finance/mcp-server`, then `/plugin install arcadia@arcadia-finance`. To add only the server:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
claude mcp add --transport http arcadia-finance https://mcp.arcadia.finance/mcp
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
</details>
|
|
54
|
+
|
|
55
|
+
<details>
|
|
56
|
+
<summary>Claude Desktop and claude.ai</summary>
|
|
57
|
+
|
|
58
|
+
Go to **Customize > Connectors > + Add > Add custom connector**, then enter `Arcadia Finance` and `https://mcp.arcadia.finance/mcp`. The Free plan allows one custom connector. On Team and Enterprise plans, an owner adds it under **Organization settings > Connectors**.
|
|
59
|
+
|
|
60
|
+
</details>
|
|
61
|
+
|
|
62
|
+
<details>
|
|
63
|
+
<summary>ChatGPT</summary>
|
|
64
|
+
|
|
65
|
+
Add `https://mcp.arcadia.finance/mcp` as a custom MCP app. Availability depends on your plan and workspace settings, see [OpenAI's guide](https://help.openai.com/en/articles/12584461).
|
|
66
|
+
|
|
67
|
+
</details>
|
|
68
|
+
|
|
69
|
+
<details>
|
|
70
|
+
<summary>Codex CLI</summary>
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
codex mcp add arcadia-finance --url https://mcp.arcadia.finance/mcp
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
</details>
|
|
77
|
+
|
|
78
|
+
<details>
|
|
79
|
+
<summary>Gemini CLI</summary>
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
gemini mcp add --transport http arcadia-finance https://mcp.arcadia.finance/mcp
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
</details>
|
|
86
|
+
|
|
87
|
+
<details>
|
|
88
|
+
<summary>Cursor</summary>
|
|
89
|
+
|
|
90
|
+
Use the button above, or add the config above to `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (global).
|
|
91
|
+
|
|
92
|
+
</details>
|
|
93
|
+
|
|
94
|
+
<details>
|
|
95
|
+
<summary>VS Code (GitHub Copilot)</summary>
|
|
96
|
+
|
|
97
|
+
Use the button above, or add this to `.vscode/mcp.json`:
|
|
98
|
+
|
|
99
|
+
```json
|
|
100
|
+
{
|
|
101
|
+
"servers": {
|
|
102
|
+
"arcadia-finance": {
|
|
103
|
+
"type": "http",
|
|
104
|
+
"url": "https://mcp.arcadia.finance/mcp"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
</details>
|
|
111
|
+
|
|
112
|
+
### Run it locally
|
|
113
|
+
|
|
114
|
+
To run the server as a local process instead (Node.js 22 or newer):
|
|
115
|
+
|
|
116
|
+
```json
|
|
117
|
+
{
|
|
118
|
+
"mcpServers": {
|
|
119
|
+
"arcadia-finance": {
|
|
120
|
+
"command": "npx",
|
|
121
|
+
"args": ["-y", "@arcadia-finance/mcp-server"]
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
In Claude Code: `claude mcp add arcadia-finance -- npx -y @arcadia-finance/mcp-server`. Optional environment variables are listed under [Configuration](#configuration).
|
|
128
|
+
|
|
129
|
+
### Try it
|
|
130
|
+
|
|
131
|
+
- "Which Arcadia strategies on Base have the highest APY right now?"
|
|
132
|
+
- "Show the health factor and positions of Arcadia account 0x..."
|
|
133
|
+
- "Open the top WETH/USDC strategy with 1,000 USDC and turn on compounding."
|
|
134
|
+
- "What do the Arcadia lending pools pay lenders?"
|
|
135
|
+
|
|
136
|
+
Write tools return unsigned transactions. Your wallet signs them, see [Transaction Signing](#transaction-signing).
|
|
20
137
|
|
|
21
138
|
## Tools
|
|
22
139
|
|
|
@@ -46,8 +163,6 @@ Designed for AI agents (Claude, Cursor, etc.) to interact with Arcadia onchain.
|
|
|
46
163
|
|
|
47
164
|
### Write Tools
|
|
48
165
|
|
|
49
|
-
All write tools return unsigned transactions as `{ to, data, value, chainId }`.
|
|
50
|
-
|
|
51
166
|
| Tool | Description |
|
|
52
167
|
| --------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
53
168
|
| `write_wallet_approve` | Approve an ERC20 token for spending. Required before depositing into an account. Call `read_wallet_allowances` first to check if already approved. |
|
|
@@ -71,7 +186,7 @@ All write tools return unsigned transactions as `{ to, data, value, chainId }`.
|
|
|
71
186
|
|
|
72
187
|
### Dev Tools
|
|
73
188
|
|
|
74
|
-
|
|
189
|
+
Registered only when the `PK` env var is set.
|
|
75
190
|
|
|
76
191
|
| Tool | Description |
|
|
77
192
|
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
@@ -79,12 +194,11 @@ Always registered but requires `PK` env var to function.
|
|
|
79
194
|
|
|
80
195
|
## Transaction Signing
|
|
81
196
|
|
|
82
|
-
All write tools return **unsigned transactions** as `{ to, data, value, chainId }`. This server does
|
|
197
|
+
All write tools return **unsigned transactions** as `{ to, data, value, chainId }`. This server does not sign or broadcast them; your agent or application does.
|
|
83
198
|
|
|
84
199
|
### Options
|
|
85
200
|
|
|
86
|
-
**Wallet MCP servers (recommended for production)
|
|
87
|
-
Pair this server with a wallet MCP server that handles signing:
|
|
201
|
+
**Wallet MCP servers** (recommended for production):
|
|
88
202
|
|
|
89
203
|
| Wallet MCP | Provider | Model |
|
|
90
204
|
| ----------------------------------------------------------------- | --------- | --------------------------------------------------------- |
|
|
@@ -114,25 +228,16 @@ const hash = await client.sendTransaction(tx);
|
|
|
114
228
|
The server includes a dev-only signing tool that reads a private key from the `PK` environment variable. Set `PK` via a `.env` file or your MCP client config:
|
|
115
229
|
|
|
116
230
|
```bash
|
|
117
|
-
# .env in the server directory (never commit
|
|
231
|
+
# .env in the server directory (gitignored, never commit it)
|
|
118
232
|
PK=0xYourPrivateKeyHex
|
|
119
233
|
RPC_URL_BASE=https://base-mainnet.g.alchemy.com/v2/your-key
|
|
120
234
|
```
|
|
121
235
|
|
|
122
|
-
The server loads `.env`
|
|
236
|
+
The server loads `.env` on startup. Values in the MCP client `env` block take precedence.
|
|
123
237
|
|
|
124
|
-
|
|
238
|
+
## Configuration
|
|
125
239
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
**Prerequisites:** Node.js >= 22
|
|
129
|
-
|
|
130
|
-
```bash
|
|
131
|
-
yarn install
|
|
132
|
-
yarn build
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
**Environment variables:**
|
|
240
|
+
All environment variables are optional.
|
|
136
241
|
|
|
137
242
|
| Variable | Required | Default | Transport | Description |
|
|
138
243
|
| ------------------- | -------- | ----------------------------- | --------- | -------------------------------------------------------------- |
|
|
@@ -141,89 +246,30 @@ yarn build
|
|
|
141
246
|
| `RPC_URL_OPTIMISM` | No | Public RPC | Both | RPC URL for Optimism (10). |
|
|
142
247
|
| `RPC_URL_ROBINHOOD` | No | Public RPC | Both | RPC URL for Robinhood (4663). |
|
|
143
248
|
| `PK` | No | none | Both | Private key (hex) for dev-only `dev_send` tool. |
|
|
144
|
-
| `TRANSPORT` | No | `stdio` |
|
|
249
|
+
| `TRANSPORT` | No | `stdio` | n/a | Transport mode: `stdio` or `http`. |
|
|
145
250
|
| `PORT` | No | `3000` | HTTP | Listen port for HTTP transport. |
|
|
146
251
|
| `ALLOWED_ORIGINS` | No | `https://mcp.arcadia.finance` | HTTP | Comma-separated allowed Origin headers (CORS / DNS rebinding). |
|
|
147
252
|
| `RATE_LIMIT_RPM` | No | `600` | HTTP | Max requests per minute per client IP. |
|
|
148
253
|
| `POSTHOG_KEY` | No | none | HTTP | PostHog project key. Unset = no analytics are sent. |
|
|
149
254
|
| `POSTHOG_HOST` | No | `https://eu.i.posthog.com` | HTTP | PostHog ingestion host. |
|
|
150
255
|
|
|
151
|
-
**Supported chains:** Base (8453), Unichain (130), Optimism (10), Robinhood (4663)
|
|
152
|
-
|
|
153
|
-
## MCP Client Configuration
|
|
154
|
-
|
|
155
|
-
**Remote (no install needed):**
|
|
156
|
-
|
|
157
|
-
```json
|
|
158
|
-
{
|
|
159
|
-
"mcpServers": {
|
|
160
|
-
"arcadia-finance": {
|
|
161
|
-
"url": "https://mcp.arcadia.finance/mcp"
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
**Via npx** (local stdio):
|
|
168
|
-
|
|
169
|
-
```json
|
|
170
|
-
{
|
|
171
|
-
"mcpServers": {
|
|
172
|
-
"arcadia-finance": {
|
|
173
|
-
"command": "npx",
|
|
174
|
-
"args": ["-y", "@arcadia-finance/mcp-server"],
|
|
175
|
-
"env": {
|
|
176
|
-
"RPC_URL_BASE": "https://base-mainnet.g.alchemy.com/v2/your-key"
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
**Claude Code:**
|
|
184
|
-
|
|
185
|
-
```bash
|
|
186
|
-
# Remote
|
|
187
|
-
claude mcp add arcadia-finance --transport http https://mcp.arcadia.finance/mcp
|
|
188
|
-
|
|
189
|
-
# Local
|
|
190
|
-
claude mcp add arcadia-finance -- npx -y @arcadia-finance/mcp-server
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
**From source** (local development):
|
|
194
|
-
|
|
195
|
-
```json
|
|
196
|
-
{
|
|
197
|
-
"mcpServers": {
|
|
198
|
-
"arcadia-finance": {
|
|
199
|
-
"command": "node",
|
|
200
|
-
"args": ["/absolute/path/to/mcp-server/dist/index.js"],
|
|
201
|
-
"env": {
|
|
202
|
-
"RPC_URL_BASE": "https://base-mainnet.g.alchemy.com/v2/your-key"
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
```
|
|
208
|
-
|
|
209
256
|
## Skills
|
|
210
257
|
|
|
211
|
-
The `skills/` directory contains
|
|
258
|
+
The `skills/` directory contains skills that teach AI agents how to use this MCP server. The Claude Code plugin (see [Quick start](#quick-start)) installs them together with the server. To install a skill on its own, symlink it into your skills directory:
|
|
212
259
|
|
|
213
260
|
```bash
|
|
214
261
|
ln -s /path/to/mcp-server/skills/clamm-liquidity ~/.claude/skills/clamm-liquidity
|
|
215
262
|
```
|
|
216
263
|
|
|
217
|
-
Available skills:
|
|
218
|
-
|
|
219
264
|
| Skill | Description |
|
|
220
265
|
| ----------------- | ------------------------------------------------------------------------------------------------- |
|
|
221
266
|
| `clamm-liquidity` | Concentrated liquidity management: concepts, intent-based automation, and step-by-step workflows. |
|
|
222
267
|
|
|
268
|
+
The [OpenClaw](https://clawhub.ai/skills/arcadia-finance) skill in `openclaw/` calls the hosted server through a curl script, for agents without MCP support.
|
|
269
|
+
|
|
223
270
|
## Reporting Issues
|
|
224
271
|
|
|
225
|
-
|
|
226
|
-
Open an issue: https://github.com/arcadia-finance/mcp-server/issues
|
|
272
|
+
Open an issue for bugs, missing features or unclear documentation: https://github.com/arcadia-finance/mcp-server/issues
|
|
227
273
|
|
|
228
274
|
**For AI agents:** If you hit a gap during task execution, open an issue with:
|
|
229
275
|
|
|
@@ -231,26 +277,37 @@ Open an issue: https://github.com/arcadia-finance/mcp-server/issues
|
|
|
231
277
|
- What you expected vs what happened
|
|
232
278
|
- The strategy or goal you were trying to execute
|
|
233
279
|
|
|
234
|
-
Pull requests for documentation fixes are welcome
|
|
280
|
+
Pull requests for documentation fixes are welcome. Every PR needs a human review before merging.
|
|
235
281
|
|
|
236
282
|
## Where to Find Us
|
|
237
283
|
|
|
238
284
|
- **npm:** [@arcadia-finance/mcp-server](https://www.npmjs.com/package/@arcadia-finance/mcp-server)
|
|
239
285
|
- **MCP Registry:** [registry.modelcontextprotocol.io](https://registry.modelcontextprotocol.io/?q=arcadia)
|
|
240
|
-
- **Smithery:** [smithery.ai](https://smithery.ai/servers/arcadia-finance/mcp-server)
|
|
241
286
|
- **MCP Servers:** [mcpservers.org](https://mcpservers.org/en/servers/arcadia-finance/mcp-server)
|
|
242
287
|
- **LobeHub:** [lobehub.com](https://lobehub.com/mcp/arcadia-finance-mcp-server)
|
|
243
288
|
- **PulseMCP:** [pulsemcp.com](https://www.pulsemcp.com/servers/arcadia-finance)
|
|
244
289
|
- **MCP Market:** [mcpmarket.com](https://mcpmarket.com/server/arcadia-finance)
|
|
245
290
|
- **Glama:** [glama.ai](https://glama.ai/mcp/servers/arcadia-finance/mcp-server)
|
|
246
|
-
- **
|
|
291
|
+
- **mcp.so:** [mcp.so](https://mcp.so/server/arcadia-finance/mcp-server)
|
|
292
|
+
- **awesome-mcp-servers:** [github.com/punkpeye/awesome-mcp-servers](https://github.com/punkpeye/awesome-mcp-servers)
|
|
247
293
|
|
|
248
294
|
## Development
|
|
249
295
|
|
|
250
296
|
```bash
|
|
251
|
-
yarn
|
|
297
|
+
yarn install
|
|
252
298
|
yarn build # Compile TypeScript
|
|
299
|
+
yarn dev # Run with tsx (hot reload)
|
|
253
300
|
yarn test # Run tests
|
|
254
301
|
yarn lint # Lint with ESLint
|
|
255
302
|
yarn format # Check formatting with Prettier
|
|
256
303
|
```
|
|
304
|
+
|
|
305
|
+
To point a client at your build, use `"command": "node"` with `"args": ["/absolute/path/to/mcp-server/dist/index.js"]`.
|
|
306
|
+
|
|
307
|
+
## Privacy
|
|
308
|
+
|
|
309
|
+
When `POSTHOG_KEY` is set on an HTTP deployment, the server records one analytics event per tool call in PostHog (EU ingestion host by default): the tool name, its arguments (which can include public wallet and account addresses), whether the call failed, the duration, and the client name and version. Events carry no person profile. Running the server locally over stdio sends no analytics, and neither does an HTTP deployment without `POSTHOG_KEY`. Tool calls never carry private keys. The development-only `dev_send` tool signs with a `PK` set in the server's own environment; the hosted server has none. Questions: legal@arcadia.finance.
|
|
310
|
+
|
|
311
|
+
## License
|
|
312
|
+
|
|
313
|
+
Copyright (C) 2026 Pragma Labs. Licensed under the [GNU Affero General Public License v3.0](LICENSE.md).
|
package/dist/clients/chain.js
CHANGED
|
@@ -14,8 +14,8 @@ const unichain = defineChain({
|
|
|
14
14
|
multicall3: { address: "0xcA11bde05977b3631167028862bE2a173976CA11" },
|
|
15
15
|
},
|
|
16
16
|
});
|
|
17
|
-
//
|
|
18
|
-
//
|
|
17
|
+
// multicall3 sits at the canonical address (3808 bytes on chain) and is declared with no
|
|
18
|
+
// blockCreated, so no historical gating applies.
|
|
19
19
|
const robinhood = defineChain({
|
|
20
20
|
id: 4663,
|
|
21
21
|
name: "Robinhood",
|
|
@@ -27,7 +27,7 @@ const robinhood = defineChain({
|
|
|
27
27
|
multicall3: { address: "0xcA11bde05977b3631167028862bE2a173976CA11" },
|
|
28
28
|
},
|
|
29
29
|
});
|
|
30
|
-
const viemChains = {
|
|
30
|
+
export const viemChains = {
|
|
31
31
|
8453: base,
|
|
32
32
|
10: optimism,
|
|
33
33
|
130: unichain,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const FIVE_MINUTES_MS = 5 * 60 * 1000;
|
|
2
|
+
const staticPublic = { ttlMs: FIVE_MINUTES_MS, cacheScope: "public" };
|
|
3
|
+
export const CACHE_HINTS = {
|
|
4
|
+
"server/discover": staticPublic,
|
|
5
|
+
"tools/list": staticPublic,
|
|
6
|
+
"prompts/list": staticPublic,
|
|
7
|
+
"resources/list": staticPublic,
|
|
8
|
+
"resources/templates/list": staticPublic,
|
|
9
|
+
"resources/read": staticPublic,
|
|
10
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -11,6 +11,7 @@ catch {
|
|
|
11
11
|
import { createRequire } from "module";
|
|
12
12
|
import { McpServer } from "@modelcontextprotocol/server";
|
|
13
13
|
import { ArcadiaApiClient } from "./clients/api.js";
|
|
14
|
+
import { CACHE_HINTS } from "./config/cache-hints.js";
|
|
14
15
|
import { getChainConfigs } from "./config/chains.js";
|
|
15
16
|
import { registerAllTools } from "./tools/index.js";
|
|
16
17
|
import { registerAllResources } from "./resources/index.js";
|
|
@@ -28,7 +29,7 @@ function buildServer() {
|
|
|
28
29
|
name: "arcadia-finance",
|
|
29
30
|
version: pkg.version,
|
|
30
31
|
description: "Arcadia Finance. Manage concentrated liquidity positions on Uniswap and Aero with automated rebalancing, compounding, yield optimization, and leverage. Base, Optimism, Unichain and Robinhood.",
|
|
31
|
-
});
|
|
32
|
+
}, { cacheHints: CACHE_HINTS });
|
|
32
33
|
const target = analytics
|
|
33
34
|
? withAnalytics(server, server, analytics, {
|
|
34
35
|
transport: transportMode,
|
|
@@ -48,8 +48,8 @@ export function registerWorkflowPrompts(server) {
|
|
|
48
48
|
`Find the best yield strategy on Arcadia (chain ${chain_id ?? "8453"})${deposit_token ? ` for depositing ${deposit_token}` : ""}.`,
|
|
49
49
|
"",
|
|
50
50
|
"Steps:",
|
|
51
|
-
"1. Call read_strategy_list(featured_only: true) to see top LP strategies with fee APY",
|
|
52
|
-
"2. Call read_strategy_info(strategy_id: <id>) for promising ones to see APY per range width",
|
|
51
|
+
"1. Call read_strategy_list(featured_only: true) to see top LP strategies with fee APY over the last 24 hours at the featured range width",
|
|
52
|
+
"2. Call read_strategy_info(strategy_id: <id>) for promising ones to see APY per range width over the last 24 hours",
|
|
53
53
|
"3. Call read_pool_list to check borrow APY for leveraged strategies",
|
|
54
54
|
"4. Evaluate: net_APY = fee_APY - (leverage - 1) * borrow_APY > 0?",
|
|
55
55
|
"",
|
package/dist/tools/dev/send.js
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { createWalletClient, createPublicClient, http } from "viem";
|
|
3
3
|
import { privateKeyToAccount } from "viem/accounts";
|
|
4
|
-
import {
|
|
4
|
+
import { viemChains } from "../../clients/chain.js";
|
|
5
5
|
import { CHAIN_ID_DESCRIPTION } from "../../config/chains.js";
|
|
6
6
|
import { DevSendOutput } from "../output-schemas.js";
|
|
7
7
|
import { validateAddress, validateHexCalldata, parseWeiDecimalString, } from "../../utils/validation.js";
|
|
8
|
-
const VIEM_CHAINS = {
|
|
9
|
-
8453: base,
|
|
10
|
-
130: unichain,
|
|
11
|
-
10: optimism,
|
|
12
|
-
};
|
|
13
8
|
export function registerSendTool(server, chains) {
|
|
9
|
+
const pk = process.env.PK;
|
|
10
|
+
if (!pk)
|
|
11
|
+
return;
|
|
14
12
|
server.registerTool("dev_send", {
|
|
15
13
|
annotations: {
|
|
16
14
|
title: "Sign and Send Transaction",
|
|
@@ -29,22 +27,10 @@ export function registerSendTool(server, chains) {
|
|
|
29
27
|
}),
|
|
30
28
|
}, async (params) => {
|
|
31
29
|
try {
|
|
32
|
-
const pk = process.env.PK;
|
|
33
|
-
if (!pk) {
|
|
34
|
-
return {
|
|
35
|
-
content: [
|
|
36
|
-
{
|
|
37
|
-
type: "text",
|
|
38
|
-
text: "Error: PK not set. Either create a .env file with PK=0x... in the server directory, or set PK in your MCP client config env block. This tool is for development only — use a dedicated wallet MCP server for production.",
|
|
39
|
-
},
|
|
40
|
-
],
|
|
41
|
-
isError: true,
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
30
|
const validTo = validateAddress(params.to, "to");
|
|
45
31
|
const calldata = validateHexCalldata(params.data, "data");
|
|
46
32
|
const valueWei = parseWeiDecimalString(params.value, "value");
|
|
47
|
-
const chain =
|
|
33
|
+
const chain = viemChains[params.chain_id];
|
|
48
34
|
const chainConfig = chains[params.chain_id];
|
|
49
35
|
if (!chainConfig) {
|
|
50
36
|
return {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { CHAIN_ID_DESCRIPTION } from "../../config/chains.js";
|
|
2
3
|
import { validateAddress, validateChainId } from "../../utils/validation.js";
|
|
3
4
|
import { AutomationsStateOutput, IntentsListOutput } from "../output-schemas.js";
|
|
4
5
|
const INTENT_CATALOG = [
|
|
@@ -70,10 +71,7 @@ export function registerAssetManagerTools(server, api) {
|
|
|
70
71
|
.int()
|
|
71
72
|
.optional()
|
|
72
73
|
.describe("LP position (NFT) id to scope availability to. Requires account_address."),
|
|
73
|
-
chain_id: z
|
|
74
|
-
.number()
|
|
75
|
-
.default(8453)
|
|
76
|
-
.describe("Chain id: 8453 Base, 130 Unichain, 10 Optimism"),
|
|
74
|
+
chain_id: z.number().default(8453).describe(CHAIN_ID_DESCRIPTION),
|
|
77
75
|
}),
|
|
78
76
|
}, async (params) => {
|
|
79
77
|
try {
|
|
@@ -149,10 +147,7 @@ export function registerAssetManagerTools(server, api) {
|
|
|
149
147
|
outputSchema: AutomationsStateOutput,
|
|
150
148
|
inputSchema: z.object({
|
|
151
149
|
account_address: z.string().describe("Arcadia account address"),
|
|
152
|
-
chain_id: z
|
|
153
|
-
.number()
|
|
154
|
-
.default(8453)
|
|
155
|
-
.describe("Chain id: 8453 Base, 130 Unichain, 10 Optimism"),
|
|
150
|
+
chain_id: z.number().default(8453).describe(CHAIN_ID_DESCRIPTION),
|
|
156
151
|
}),
|
|
157
152
|
}, async (params) => {
|
|
158
153
|
try {
|
|
@@ -60,7 +60,7 @@ export function registerAssetTools(server, api) {
|
|
|
60
60
|
idempotentHint: true,
|
|
61
61
|
openWorldHint: true,
|
|
62
62
|
},
|
|
63
|
-
description: "Get USD prices for one or more asset addresses. Pass a single address or comma-separated addresses. Returns a price map keyed by address.",
|
|
63
|
+
description: "Get USD prices for one or more asset addresses on one chain. Pass a single address or comma-separated addresses. Returns a price map keyed by address. Unknown or unpriced addresses return 0, not an error. Prices are scoped to chain_id (default 8453, Base), so pass the chain the addresses live on. Read-only. To find asset addresses, use read_asset_list.",
|
|
64
64
|
inputSchema: z.object({
|
|
65
65
|
asset_addresses: z
|
|
66
66
|
.string()
|
|
@@ -11,7 +11,7 @@ export function registerStrategyTools(server, api) {
|
|
|
11
11
|
idempotentHint: true,
|
|
12
12
|
openWorldHint: true,
|
|
13
13
|
},
|
|
14
|
-
description: "Get Arcadia LP strategies. Use featured_only=true for curated top strategies (recommended first call).
|
|
14
|
+
description: "Get Arcadia LP strategies. Use featured_only=true for curated top strategies (recommended first call); their apy is measured over the last 24 hours at the featured range width, and is 0.0 when that measurement fails. Otherwise returns a paginated list where strategy_apy_7d is the 7-day average APY at each strategy's default range. Increase limit or use offset for pagination. All APY values are decimal fractions (1.0 = 100%, 0.05 = 5%). For APY per range width over the last 24 hours, use read_strategy_info.",
|
|
15
15
|
inputSchema: z.object({
|
|
16
16
|
featured_only: z
|
|
17
17
|
.boolean()
|
|
@@ -118,7 +118,7 @@ export function registerStrategyTools(server, api) {
|
|
|
118
118
|
idempotentHint: true,
|
|
119
119
|
openWorldHint: true,
|
|
120
120
|
},
|
|
121
|
-
description: "Get full detail for a specific LP strategy by ID: includes APY per range width (narrower range = higher APY but more rebalancing cost/risk), pool info, and configuration. Use read_strategy_list to discover strategy IDs. All APY values are decimal fractions (1.0 = 100%, 0.05 = 5%).",
|
|
121
|
+
description: "Get full detail for a specific concentrated-liquidity LP strategy by ID: includes APY per range width over the last 24 hours, each range anchored on the current price (narrower range = higher APY but more rebalancing cost/risk), the 7-day average APY at the default range in the yield field, pool info, and configuration. For basic (constant-product) pools, use strategy_apy_7d from read_strategy_list. Use read_strategy_list to discover strategy IDs. All APY values are decimal fractions (1.0 = 100%, 0.05 = 5%).",
|
|
122
122
|
inputSchema: z.object({
|
|
123
123
|
strategy_id: z.number().describe("Strategy ID"),
|
|
124
124
|
chain_id: z.number().default(8453).describe(CHAIN_ID_DESCRIPTION),
|
|
@@ -152,7 +152,7 @@ export function registerStrategyTools(server, api) {
|
|
|
152
152
|
idempotentHint: true,
|
|
153
153
|
openWorldHint: true,
|
|
154
154
|
},
|
|
155
|
-
description: "Get a rebalancing recommendation for an Arcadia account: suggests asset changes to optimize yield.
|
|
155
|
+
description: "Get a rebalancing recommendation for an Arcadia account: suggests asset changes to optimize yield. current_apy and proposed_apy are measured over the last 24 hours where possible (the account's positions at their own ranges, the proposal at its ranges), not the 7-day average of read_strategy_list, so recommended strategies may differ from the list ranking. APY values are decimal fractions (0.05 = 5%). weekly_earning_difference is in USD.",
|
|
156
156
|
inputSchema: z.object({
|
|
157
157
|
account_address: z.string().describe("Arcadia account address"),
|
|
158
158
|
chain_id: z.number().default(8453).describe(CHAIN_ID_DESCRIPTION),
|
|
@@ -195,7 +195,7 @@ export function registerWalletTools(server, chains, api) {
|
|
|
195
195
|
idempotentHint: true,
|
|
196
196
|
openWorldHint: true,
|
|
197
197
|
},
|
|
198
|
-
description: "Get Arcadia points balance for
|
|
198
|
+
description: "Get the Arcadia points balance for one wallet address. Returns points and wallet_address. A wallet with no points returns points 0 and wallet_address 'unknown', not an error. Read-only, no authentication. For the ranked list of wallets, use read_point_leaderboard.",
|
|
199
199
|
inputSchema: z.object({
|
|
200
200
|
wallet_address: z.string().describe("Wallet address to get points for"),
|
|
201
201
|
}),
|
package/llms-full.txt
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
Arcadia lets users deploy concentrated liquidity positions with automated rebalancing, compounding, yield optimization, and leverage, or provide single-sided liquidity to lending pools to earn borrower interest. This MCP server exposes the full protocol as
|
|
7
|
+
Arcadia lets users deploy concentrated liquidity positions with automated rebalancing, compounding, yield optimization, and leverage, or provide single-sided liquidity to lending pools to earn borrower interest. This MCP server exposes the full protocol as 37 tools, plus `dev_send` when `PK` is set:
|
|
8
8
|
|
|
9
9
|
- **Account management**: health factor, collateral, debt, positions, PnL, history
|
|
10
10
|
- **Wallet**: ERC20 balances, allowances, owned accounts, points
|
|
@@ -80,7 +80,7 @@ Parameters:
|
|
|
80
80
|
|
|
81
81
|
### read_wallet_points
|
|
82
82
|
|
|
83
|
-
Get Arcadia points balance for
|
|
83
|
+
Get the Arcadia points balance for one wallet address. Returns points and wallet_address. A wallet with no points returns points 0 and wallet_address 'unknown', not an error. Read-only, no authentication. For the ranked list of wallets, use read_point_leaderboard.
|
|
84
84
|
|
|
85
85
|
Parameters:
|
|
86
86
|
- `wallet_address` (string, required): Wallet address to get points for
|
|
@@ -95,7 +95,7 @@ Parameters:
|
|
|
95
95
|
|
|
96
96
|
### read_asset_prices
|
|
97
97
|
|
|
98
|
-
Get USD prices for one or more asset addresses.
|
|
98
|
+
Get USD prices for one or more asset addresses on one chain. Pass a single address or comma-separated addresses. Returns a price map keyed by address. Unknown or unpriced addresses return 0, not an error. Prices are scoped to chain_id (default 8453, Base), so pass the chain the addresses live on. Read-only. To find asset addresses, use read_asset_list.
|
|
99
99
|
|
|
100
100
|
Parameters:
|
|
101
101
|
- `asset_addresses` (string, required): Single address or comma-separated addresses
|
|
@@ -127,7 +127,7 @@ Parameters:
|
|
|
127
127
|
|
|
128
128
|
### read_strategy_list
|
|
129
129
|
|
|
130
|
-
Get Arcadia LP strategies
|
|
130
|
+
Get Arcadia LP strategies: the 7-day average APY at each strategy's default range, or for featured strategies the last 24 hours at the featured range width.
|
|
131
131
|
|
|
132
132
|
Parameters:
|
|
133
133
|
- `featured_only` (boolean, default: false): Return only featured/curated strategies
|
|
@@ -427,7 +427,7 @@ Parameters:
|
|
|
427
427
|
- `disable` (string[], default: []): Asset-manager addresses to switch off, as returned by read_asset_manager_current
|
|
428
428
|
- position context params and `chain_id`: same as write_account_automations
|
|
429
429
|
|
|
430
|
-
## Dev Tools (
|
|
430
|
+
## Dev Tools (only when PK is set)
|
|
431
431
|
|
|
432
432
|
### dev_send
|
|
433
433
|
|
package/llms.txt
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
Arcadia lets users deploy concentrated liquidity positions with automated rebalancing, compounding, yield optimization, and leverage, or provide single-sided liquidity to lending pools to earn borrower interest. This MCP server exposes the full protocol as
|
|
7
|
+
Arcadia lets users deploy concentrated liquidity positions with automated rebalancing, compounding, yield optimization, and leverage, or provide single-sided liquidity to lending pools to earn borrower interest. This MCP server exposes the full protocol as 37 tools, plus `dev_send` when `PK` is set:
|
|
8
8
|
|
|
9
9
|
- **Account management**: health factor, collateral, debt, positions, PnL, history
|
|
10
10
|
- **Wallet**: ERC20 balances, allowances, owned accounts, points
|
|
@@ -24,7 +24,7 @@ npx -y @arcadia-finance/mcp-server
|
|
|
24
24
|
|
|
25
25
|
Or connect to the remote server: `https://mcp.arcadia.finance/mcp`
|
|
26
26
|
|
|
27
|
-
## Tools (
|
|
27
|
+
## Tools (37, plus dev_send when PK is set)
|
|
28
28
|
|
|
29
29
|
### Read (19)
|
|
30
30
|
|
|
@@ -69,7 +69,7 @@ Or connect to the remote server: `https://mcp.arcadia.finance/mcp`
|
|
|
69
69
|
- write_account_automations: configure automations from an intents array (complete desired state), returns the unsigned setAssetManagers tx
|
|
70
70
|
- write_account_automations_delta: switch individual automations on or off, leaving the rest untouched
|
|
71
71
|
|
|
72
|
-
### Dev (
|
|
72
|
+
### Dev (only when PK is set)
|
|
73
73
|
|
|
74
74
|
- dev_send: sign and broadcast using local private key (dev only)
|
|
75
75
|
|