@arcadia-finance/mcp-server 0.7.2 → 0.7.3

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/README.md CHANGED
@@ -155,14 +155,6 @@ Write tools return unsigned transactions. Your wallet signs them, see [Transacti
155
155
  | `write_account_automations` | Configure automations from an intents array (full desired state). Returns the unsigned setAssetManagers tx. |
156
156
  | `write_account_automations_delta` | Enable/disable individual automations, leaving the rest untouched. |
157
157
 
158
- ### Dev Tools
159
-
160
- Registered only when the `PK` env var is set.
161
-
162
- | Tool | Description |
163
- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
164
- | `dev_send` | Sign and broadcast an unsigned transaction using a local private key (`PK` env var). Not for production: use a dedicated wallet MCP server instead. |
165
-
166
158
  ## Transaction Signing
167
159
 
168
160
  All write tools return **unsigned transactions** as `{ to, data, value, chainId }`. This server does not sign or broadcast them; your agent or application does.
@@ -195,20 +187,9 @@ const client = createWalletClient({ account, chain: base, transport: http() });
195
187
  const hash = await client.sendTransaction(tx);
196
188
  ```
197
189
 
198
- **Built-in `dev_send` tool (development only):**
199
- 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:
200
-
201
- ```bash
202
- # .env in the server directory (gitignored, never commit it)
203
- PK=0xYourPrivateKeyHex
204
- RPC_URL_BASE=https://base-mainnet.g.alchemy.com/v2/your-key
205
- ```
206
-
207
- The server loads `.env` on startup. Values in the MCP client `env` block take precedence.
208
-
209
190
  ## Configuration
210
191
 
211
- All environment variables are optional.
192
+ All environment variables are optional. Set them in a `.env` file in the server directory (gitignored, never commit it) or in your MCP client `env` block, which takes precedence.
212
193
 
213
194
  | Variable | Required | Default | Transport | Description |
214
195
  | ------------------- | -------- | ----------------------------- | --------- | -------------------------------------------------------------- |
@@ -216,7 +197,6 @@ All environment variables are optional.
216
197
  | `RPC_URL_UNICHAIN` | No | Public RPC | Both | RPC URL for Unichain (130). |
217
198
  | `RPC_URL_OPTIMISM` | No | Public RPC | Both | RPC URL for Optimism (10). |
218
199
  | `RPC_URL_ROBINHOOD` | No | Public RPC | Both | RPC URL for Robinhood (4663). |
219
- | `PK` | No | none | Both | Private key (hex) for dev-only `dev_send` tool. |
220
200
  | `TRANSPORT` | No | `stdio` | n/a | Transport mode: `stdio` or `http`. |
221
201
  | `PORT` | No | `3000` | HTTP | Listen port for HTTP transport. |
222
202
  | `ALLOWED_ORIGINS` | No | `https://mcp.arcadia.finance` | HTTP | Comma-separated allowed Origin headers (CORS / DNS rebinding). |
@@ -277,7 +257,7 @@ To point a client at your build, use `"command": "node"` with `"args": ["/absolu
277
257
 
278
258
  ## Privacy
279
259
 
280
- 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.
260
+ 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`. The server never handles private keys. Questions: legal@arcadia.finance.
281
261
 
282
262
  ## License
283
263
 
@@ -27,7 +27,7 @@ const robinhood = defineChain({
27
27
  multicall3: { address: "0xcA11bde05977b3631167028862bE2a173976CA11" },
28
28
  },
29
29
  });
30
- export const viemChains = {
30
+ const viemChains = {
31
31
  8453: base,
32
32
  10: optimism,
33
33
  130: unichain,
@@ -16,7 +16,6 @@ import { registerApproveTool } from "./write/wallet/approve.js";
16
16
  import { registerPoolDepositTool } from "./write/pool/deposit.js";
17
17
  import { registerPoolRedeemTool } from "./write/pool/redeem.js";
18
18
  import { registerAutomationsTools } from "./write/asset-managers/automations.js";
19
- import { registerSendTool } from "./dev/send.js";
20
19
  import { registerAddLiquidityTool } from "./write/account/add-liquidity.js";
21
20
  import { registerRemoveLiquidityTool } from "./write/account/remove-liquidity.js";
22
21
  import { registerSwapTool } from "./write/account/swap.js";
@@ -57,6 +56,4 @@ export function registerAllTools(server, api, chains) {
57
56
  registerPoolRedeemTool(server, chains);
58
57
  // Write tools: asset managers (intent-based, compiled by the backend)
59
58
  registerAutomationsTools(server, api);
60
- // Dev tools
61
- registerSendTool(server, chains);
62
59
  }
@@ -87,14 +87,6 @@ export const WalletAllowanceOutput = z.object({
87
87
  is_max_approval: z.boolean(),
88
88
  })),
89
89
  });
90
- export const DevSendOutput = z.object({
91
- signer: z.string(),
92
- txHash: z.string(),
93
- status: z.string(),
94
- blockNumber: z.number(),
95
- gasLimit: z.number(),
96
- gasUsed: z.number(),
97
- });
98
90
  export const AccountInfoOutput = z
99
91
  .object({
100
92
  account_version: z.number().nullable(),
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 37 tools, plus `dev_send` when `PK` is set:
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:
8
8
 
9
9
  - **Account management**: health factor, collateral, debt, positions, PnL, history
10
10
  - **Wallet**: ERC20 balances, allowances, owned accounts, points
@@ -427,18 +427,6 @@ 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 (only when PK is set)
431
-
432
- ### dev_send
433
-
434
- Sign and broadcast an unsigned transaction using a local private key (PK env var). Dev only.
435
-
436
- Parameters:
437
- - `to` (string, required): Target contract address
438
- - `data` (string, required): Encoded calldata (hex)
439
- - `value` (string, default: "0"): Value in wei
440
- - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood)
441
-
442
430
  ## Links
443
431
 
444
432
  - Website: https://arcadia.finance
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 37 tools, plus `dev_send` when `PK` is set:
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:
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 (37, plus dev_send when PK is set)
27
+ ## Tools (37 total)
28
28
 
29
29
  ### Read (19)
30
30
 
@@ -69,10 +69,6 @@ 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 (only when PK is set)
73
-
74
- - dev_send: sign and broadcast using local private key (dev only)
75
-
76
72
  ## Links
77
73
 
78
74
  - Website: https://arcadia.finance
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arcadia-finance/mcp-server",
3
3
  "mcpName": "io.github.arcadia-finance/mcp-server",
4
- "version": "0.7.2",
4
+ "version": "0.7.3",
5
5
  "description": "MCP server for Arcadia Finance. Deploy concentrated liquidity on Uniswap/Aero, Aerodrome and Velodrome with automated rebalancing, compounding, yield optimization, and leverage, or single-sided liquidity into lending pools. Live on Base, Optimism, Unichain and Robinhood.",
6
6
  "type": "module",
7
7
  "license": "AGPL-3.0",
package/server.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "name": "io.github.arcadia-finance/mcp-server",
4
4
  "title": "Arcadia Finance",
5
5
  "description": "Concentrated liquidity on Uniswap/Aero (rebalance, compound, leverage) or single-sided lending.",
6
- "version": "0.7.2",
6
+ "version": "0.7.3",
7
7
  "websiteUrl": "https://arcadia.finance",
8
8
  "icons": [
9
9
  {
@@ -20,7 +20,7 @@
20
20
  {
21
21
  "registryType": "npm",
22
22
  "identifier": "@arcadia-finance/mcp-server",
23
- "version": "0.7.2",
23
+ "version": "0.7.3",
24
24
  "transport": {
25
25
  "type": "stdio"
26
26
  },
@@ -49,12 +49,6 @@
49
49
  "isRequired": false,
50
50
  "isSecret": true
51
51
  },
52
- {
53
- "name": "PK",
54
- "description": "Private key for dev-only signing (not for production).",
55
- "isRequired": false,
56
- "isSecret": true
57
- },
58
52
  {
59
53
  "name": "TRANSPORT",
60
54
  "description": "Transport mode: stdio (default) or http.",
@@ -31,7 +31,7 @@ How you sign depends on your setup:
31
31
  - **MPC wallet** (Fireblocks, Dfns, Turnkey): pass the unsigned tx to your provider's signing API
32
32
  - **Smart account** (Safe, Biconomy): wrap the tx as a UserOperation or Safe transaction
33
33
  - **Embedded wallet** (Privy, Dynamic): use the provider's `sendTransaction` method
34
- - **Direct private key** (development only): use the built-in `dev_send` tool, which the server lists only when `PK` is set in a `.env` file or the MCP client config, or viem/ethers `sendTransaction` with a local signer
34
+ - **Direct private key** (development only): viem/ethers `sendTransaction` with a local signer
35
35
 
36
36
  Example with viem:
37
37
 
@@ -104,12 +104,6 @@ These tools batch multiple operations into ONE atomic transaction. Always prefer
104
104
  | `write_account_aero_upgrade` | Upgrade an account to Aero (MetadexCL V1): its Slipstream positions move to Aero CL and its old AERO becomes the new AERO, in one flashAction. Returns the plan (items, reasons, pool options) and the transaction. Check first with `read_account_aero_upgrade`; wallet VELO on Optimism goes through `write_wallet_upgrade_velo`. See strategies.md, "Upgrade to Aero". |
105
105
  | `write_account_automations_delta` | Change one automation without restating the rest: `enable` takes intents, `disable` takes asset-manager addresses from `read_asset_manager_current`. Prefer `write_account_automations` when setting the full desired state. See automation.md. |
106
106
 
107
- ### Dev Tools (only available when `PK` env var is set)
108
-
109
- | Tool | When to use |
110
- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
111
- | `dev_send` | Sign and broadcast an unsigned transaction using a local private key. Pass the `{ to, data, value, chainId }` from any `write_*` tool. **Not for production**: use a dedicated wallet MCP server (Fireblocks, Safe, Turnkey, etc.) instead. |
112
-
113
107
  ## Shared Addresses
114
108
 
115
109
  | Contract | Address |
@@ -1,92 +0,0 @@
1
- import { z } from "zod";
2
- import { createWalletClient, createPublicClient, http } from "viem";
3
- import { privateKeyToAccount } from "viem/accounts";
4
- import { viemChains } from "../../clients/chain.js";
5
- import { CHAIN_ID_DESCRIPTION } from "../../config/chains.js";
6
- import { DevSendOutput } from "../output-schemas.js";
7
- import { validateAddress, validateHexCalldata, parseWeiDecimalString, } from "../../utils/validation.js";
8
- export function registerSendTool(server, chains) {
9
- const pk = process.env.PK;
10
- if (!pk)
11
- return;
12
- server.registerTool("dev_send", {
13
- annotations: {
14
- title: "Sign and Send Transaction",
15
- readOnlyHint: false,
16
- destructiveHint: true,
17
- idempotentHint: false,
18
- openWorldHint: true,
19
- },
20
- description: "DEV ONLY: Sign and broadcast an unsigned transaction using a local private key (PK env var). For production, use a dedicated wallet MCP server (Fireblocks, Safe, Turnkey, etc.) instead of this tool. Takes the transaction object returned by any write_* tool and submits it onchain.",
21
- outputSchema: DevSendOutput,
22
- inputSchema: z.object({
23
- to: z.string().describe("Target contract address"),
24
- data: z.string().describe("Encoded calldata (hex)"),
25
- value: z.string().default("0").describe("Value in wei (default '0')"),
26
- chain_id: z.number().default(8453).describe(CHAIN_ID_DESCRIPTION),
27
- }),
28
- }, async (params) => {
29
- try {
30
- const validTo = validateAddress(params.to, "to");
31
- const calldata = validateHexCalldata(params.data, "data");
32
- const valueWei = parseWeiDecimalString(params.value, "value");
33
- const chain = viemChains[params.chain_id];
34
- const chainConfig = chains[params.chain_id];
35
- if (!chainConfig) {
36
- return {
37
- content: [
38
- { type: "text", text: `Error: Unsupported chain ID ${params.chain_id}` },
39
- ],
40
- isError: true,
41
- };
42
- }
43
- const transport = http(chainConfig.rpcUrl);
44
- const account = privateKeyToAccount(pk);
45
- const wallet = createWalletClient({ account, chain, transport });
46
- const client = createPublicClient({ chain, transport });
47
- const gasEstimate = await client.estimateGas({
48
- account: account.address,
49
- to: validTo,
50
- data: calldata,
51
- value: valueWei,
52
- });
53
- const gasLimit = (gasEstimate * 120n) / 100n;
54
- const hash = await wallet.sendTransaction({
55
- to: validTo,
56
- data: calldata,
57
- value: valueWei,
58
- gas: gasLimit,
59
- chain,
60
- });
61
- const receipt = await client.waitForTransactionReceipt({ hash, timeout: 60_000 });
62
- const result = {
63
- signer: account.address,
64
- txHash: receipt.transactionHash,
65
- status: receipt.status,
66
- blockNumber: Number(receipt.blockNumber),
67
- gasLimit: Number(gasLimit),
68
- gasUsed: Number(receipt.gasUsed),
69
- };
70
- return {
71
- content: [
72
- {
73
- type: "text",
74
- text: JSON.stringify(result, null, 2),
75
- },
76
- ],
77
- structuredContent: result,
78
- };
79
- }
80
- catch (err) {
81
- return {
82
- content: [
83
- {
84
- type: "text",
85
- text: `Error: ${err instanceof Error ? err.message : String(err)}`,
86
- },
87
- ],
88
- isError: true,
89
- };
90
- }
91
- });
92
- }