@arcadia-finance/mcp-server 0.3.1 → 0.3.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
@@ -2,12 +2,12 @@
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/@arcadia-finance/mcp-server)](https://www.npmjs.com/package/@arcadia-finance/mcp-server)
4
4
  [![npm downloads](https://img.shields.io/npm/dm/@arcadia-finance/mcp-server)](https://www.npmjs.com/package/@arcadia-finance/mcp-server)
5
- [![smithery badge](https://smithery.ai/badge/@arcadia-finance/mcp-server)](https://smithery.ai/server/@arcadia-finance/mcp-server)
6
5
  [![License: AGPL-3.0](https://img.shields.io/badge/License-AGPL--3.0-blue)](LICENSE.md)
7
6
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.5-blue)](https://www.typescriptlang.org/)
8
7
  [![MCP](https://img.shields.io/badge/MCP-2025--11--25-green)](https://modelcontextprotocol.io/)
8
+ [![smithery badge](https://smithery.ai/badge/@arcadia-finance/mcp-server)](https://smithery.ai/servers/arcadia-finance/mcp-server)
9
9
  [![MCP Badge](https://lobehub.com/badge/mcp/arcadia-finance-mcp-server)](https://lobehub.com/mcp/arcadia-finance-mcp-server)
10
- [![Glama](https://img.shields.io/badge/Glama-listed-blue)](https://glama.ai/mcp/servers/@arcadia-finance/mcp-server)
10
+ [![arcadia-finance-mcp-server MCP server](https://glama.ai/mcp/servers/arcadia-finance/arcadia-finance-mcp-server/badges/score.svg)](https://glama.ai/mcp/servers/arcadia-finance/arcadia-finance-mcp-server)
11
11
 
12
12
  MCP server for [Arcadia Finance](https://arcadia.finance), a platform to manage Uniswap and Aerodrome concentrated liquidity positions with built-in leverage, automated rebalancing, and yield optimization. Read protocol data and build unsigned transactions for LP management, borrowing, deposits, and more.
13
13
 
@@ -83,8 +83,18 @@ All write tools return **unsigned transactions** as `{ to, data, value, chainId
83
83
 
84
84
  ### Options
85
85
 
86
- **Wallet infrastructure (recommended for production):**
87
- Use your existing wallet setup — MPC wallets (Fireblocks, Dfns, Turnkey), smart accounts (Safe, Biconomy), or embedded wallets (Privy, Dynamic). Pass the unsigned tx object to your provider's signing method.
86
+ **Wallet MCP servers (recommended for production):**
87
+ Pair this server with a wallet MCP server that handles signing:
88
+
89
+ | Wallet MCP | Provider | Model |
90
+ | ----------------------------------------------------------------- | --------- | --------------------------------------------------------- |
91
+ | [MCP Wallet Signer](https://github.com/nikicat/mcp-wallet-signer) | Community | Non-custodial, routes to browser wallet (MetaMask, Rabby) |
92
+ | [Coinbase AgentKit](https://github.com/coinbase/agentkit) | Coinbase | Wallet-agnostic, supports multiple providers |
93
+ | [Phantom MCP](https://www.npmjs.com/package/@phantom/mcp-server) | Phantom | Embedded wallet |
94
+ | [Privy MCP](https://github.com/incentivai-io/privy-mcp-server) | Privy | Wallet infrastructure |
95
+ | [Safe MCP](https://github.com/safer-sh/safer) | Community | Multi-sig via Safe |
96
+
97
+ Or use your existing wallet setup (Fireblocks, Dfns, Turnkey, Biconomy, Dynamic) and pass the unsigned tx object to your provider's signing method.
88
98
 
89
99
  **viem/ethers in your agent:**
90
100
 
@@ -222,11 +232,14 @@ Pull requests for documentation fixes are welcome from agents and humans alike.
222
232
  ## Where to Find Us
223
233
 
224
234
  - **npm:** [@arcadia-finance/mcp-server](https://www.npmjs.com/package/@arcadia-finance/mcp-server)
225
- - **Smithery:** [smithery.ai/@arcadia-finance/mcp-server](https://smithery.ai/server/@arcadia-finance/mcp-server)
226
- - **PulseMCP:** [pulsemcp.com](https://pulsemcp.com)
227
- - **MCP Market:** [mcpmarket.com](https://mcpmarket.com)
228
- - **awesome-mcp-servers (punkpeye):** [github.com/punkpeye/awesome-mcp-servers](https://github.com/punkpeye/awesome-mcp-servers)
229
- - **awesome-mcp-servers (wong2):** [github.com/wong2/awesome-mcp-servers](https://github.com/wong2/awesome-mcp-servers)
235
+ - **MCP Registry:** [registry.modelcontextprotocol.io](https://registry.modelcontextprotocol.io/?q=arcadia)
236
+ - **Smithery:** [smithery.ai](https://smithery.ai/servers/arcadia-finance/mcp-server)
237
+ - **MCP Servers:** [mcpservers.org](https://mcpservers.org/en/servers/arcadia-finance/mcp-server)
238
+ - **LobeHub:** [lobehub.com](https://lobehub.com/mcp/arcadia-finance-mcp-server)
239
+ - **PulseMCP:** [pulsemcp.com](https://www.pulsemcp.com/servers/arcadia-finance)
240
+ - **MCP Market:** [mcpmarket.com](https://mcpmarket.com/server/arcadia-finance)
241
+ - **Glama:** [glama.ai](https://glama.ai/mcp/servers/arcadia-finance/arcadia-finance-mcp-server)
242
+ - **awesome-mcp-servers:** [github.com/TensorBlock/awesome-mcp-servers](https://github.com/TensorBlock/awesome-mcp-servers)
230
243
 
231
244
  ## Development
232
245
 
package/dist/index.js CHANGED
@@ -15,19 +15,21 @@ import { getChainConfigs } from "./config/chains.js";
15
15
  import { registerAllTools } from "./tools/index.js";
16
16
  import { registerAllResources } from "./resources/index.js";
17
17
  import { registerAllPrompts } from "./prompts/index.js";
18
+ import { wrapServerForHttp, convertToolNames } from "./utils/tool-naming.js";
18
19
  const require = createRequire(import.meta.url);
19
20
  const pkg = require("../package.json");
20
21
  const apiClient = new ArcadiaApiClient();
21
22
  const chainConfigs = getChainConfigs();
22
- function createServer() {
23
+ function createServer(options) {
23
24
  const server = new McpServer({
24
25
  name: "arcadia-finance",
25
26
  version: pkg.version,
26
27
  description: "Arcadia Finance. Manage concentrated liquidity positions with leverage, automated rebalancing, and yield optimization on Base and Unichain.",
27
28
  });
28
- registerAllTools(server, apiClient, chainConfigs);
29
- registerAllResources(server);
30
- registerAllPrompts(server);
29
+ const registrationTarget = options?.httpMode ? wrapServerForHttp(server) : server;
30
+ registerAllTools(registrationTarget, apiClient, chainConfigs);
31
+ registerAllResources(registrationTarget);
32
+ registerAllPrompts(registrationTarget);
31
33
  return server;
32
34
  }
33
35
  const transportMode = process.env.TRANSPORT ?? "stdio";
@@ -85,7 +87,7 @@ if (transportMode === "http") {
85
87
  }, SESSION_TTL_MS);
86
88
  }
87
89
  async function createSession() {
88
- const server = createServer();
90
+ const server = createServer({ httpMode: true });
89
91
  const transport = new StreamableHTTPServerTransport({
90
92
  sessionIdGenerator: () => crypto.randomUUID(),
91
93
  onsessioninitialized: (sessionId) => {
@@ -119,6 +121,22 @@ if (transportMode === "http") {
119
121
  app.get("/health", (_req, res) => {
120
122
  res.send("ok");
121
123
  });
124
+ app.get("/llms.txt", async (_req, res) => {
125
+ const { readFile } = await import("fs/promises");
126
+ const { fileURLToPath } = await import("url");
127
+ const { dirname, join } = await import("path");
128
+ const dir = dirname(fileURLToPath(import.meta.url));
129
+ const content = await readFile(join(dir, "..", "llms.txt"), "utf-8");
130
+ res.type("text/plain").send(convertToolNames(content));
131
+ });
132
+ app.get("/llms-full.txt", async (_req, res) => {
133
+ const { readFile } = await import("fs/promises");
134
+ const { fileURLToPath } = await import("url");
135
+ const { dirname, join } = await import("path");
136
+ const dir = dirname(fileURLToPath(import.meta.url));
137
+ const content = await readFile(join(dir, "..", "llms-full.txt"), "utf-8");
138
+ res.type("text/plain").send(convertToolNames(content));
139
+ });
122
140
  app.post("/mcp", async (req, res) => {
123
141
  if (!validateOrigin(req, res))
124
142
  return;
@@ -0,0 +1,91 @@
1
+ const TOOL_NAME_RE = /\b(read|write|dev)\.[a-z_]+(?:\.[a-z_]+)*/g;
2
+ export function convertToolNames(text) {
3
+ return text.replace(TOOL_NAME_RE, (match) => match.replace(/\./g, "_"));
4
+ }
5
+ function deepConvertToolNames(value) {
6
+ if (typeof value === "string")
7
+ return convertToolNames(value);
8
+ if (Array.isArray(value))
9
+ return value.map(deepConvertToolNames);
10
+ if (value !== null && typeof value === "object") {
11
+ const result = {};
12
+ for (const [k, v] of Object.entries(value)) {
13
+ result[k] = deepConvertToolNames(v);
14
+ }
15
+ return result;
16
+ }
17
+ return value;
18
+ }
19
+ export function wrapServerForHttp(server) {
20
+ return new Proxy(server, {
21
+ get(target, prop, receiver) {
22
+ if (prop === "registerTool") {
23
+ return (name, config, cb) => {
24
+ const newName = convertToolNames(name);
25
+ const newConfig = { ...config };
26
+ if (typeof newConfig.description === "string") {
27
+ newConfig.description = convertToolNames(newConfig.description);
28
+ }
29
+ const wrappedCb = async (...args) => {
30
+ const result = (await cb(...args));
31
+ const content = result.content;
32
+ const structuredContent = result.structuredContent;
33
+ return {
34
+ ...result,
35
+ ...(content && {
36
+ content: content.map((c) => ({
37
+ ...c,
38
+ ...(typeof c.text === "string" && { text: convertToolNames(c.text) }),
39
+ })),
40
+ }),
41
+ ...(structuredContent !== undefined && {
42
+ structuredContent: deepConvertToolNames(structuredContent),
43
+ }),
44
+ };
45
+ };
46
+ return target.registerTool(newName, newConfig, wrappedCb);
47
+ };
48
+ }
49
+ if (prop === "registerResource") {
50
+ return (name, uriOrTemplate, config, readCallback) => {
51
+ const wrappedCallback = async (...args) => {
52
+ const result = (await readCallback(...args));
53
+ const contents = result.contents;
54
+ return {
55
+ ...result,
56
+ ...(contents && {
57
+ contents: contents.map((c) => ({
58
+ ...c,
59
+ ...(typeof c.text === "string" && { text: convertToolNames(c.text) }),
60
+ })),
61
+ }),
62
+ };
63
+ };
64
+ return target.registerResource(name, uriOrTemplate, config, wrappedCallback);
65
+ };
66
+ }
67
+ if (prop === "registerPrompt") {
68
+ return (name, config, cb) => {
69
+ const wrappedCb = async (...args) => {
70
+ const result = (await cb(...args));
71
+ const messages = result.messages;
72
+ return {
73
+ ...result,
74
+ ...(messages && {
75
+ messages: messages.map((m) => {
76
+ const content = m.content;
77
+ if (content && typeof content.text === "string") {
78
+ return { ...m, content: { ...content, text: convertToolNames(content.text) } };
79
+ }
80
+ return m;
81
+ }),
82
+ }),
83
+ };
84
+ };
85
+ return target.registerPrompt(name, config, wrappedCb);
86
+ };
87
+ }
88
+ return Reflect.get(target, prop, receiver);
89
+ },
90
+ });
91
+ }
package/llms-full.txt ADDED
@@ -0,0 +1,429 @@
1
+ # Arcadia Finance MCP Server
2
+
3
+ > MCP server for Arcadia Finance, a DeFi protocol for managing concentrated liquidity positions (Uniswap v3/v4, Aerodrome/Slipstream) with leverage, automated rebalancing, and yield optimization. Supported chains: Base (8453), Unichain (130).
4
+
5
+ ## Overview
6
+
7
+ Arcadia lets users open leveraged LP positions, borrow against collateral, and automate position management (rebalancing, compounding, yield claiming). This MCP server exposes the full protocol as 38 tools:
8
+
9
+ - **Account management**: health factor, collateral, debt, positions, PnL, history
10
+ - **Wallet**: ERC20 balances, allowances, owned accounts, points
11
+ - **Lending pools**: TVL, APY, utilization, available liquidity, rate history
12
+ - **LP strategies**: concentrated liquidity strategies with APY per range width, recommendations
13
+ - **Transaction building**: unsigned calldata for deposits, borrows, swaps, LP minting/closing, staking
14
+ - **Automation**: configure asset managers (rebalancer, compounder, yield claimer, CowSwap, Merkl)
15
+
16
+ All write tools return unsigned transactions (`{ to, data, value, chainId }`). Signing is the client's responsibility.
17
+
18
+ ## Install
19
+
20
+ ```
21
+ npx -y @arcadia-finance/mcp-server
22
+ ```
23
+
24
+ Or connect to the remote server: `https://mcp.arcadia.finance/mcp`
25
+
26
+ ## Read Tools (17)
27
+
28
+ ### read.account.info
29
+
30
+ Get full overview of an Arcadia account: health factor, collateral value, debt, deposited assets, liquidation price, and automation status.
31
+
32
+ Parameters:
33
+ - `account_address` (string, required): Arcadia account address
34
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
35
+
36
+ ### read.account.history
37
+
38
+ Get historical collateral and debt values for an Arcadia account over time.
39
+
40
+ Parameters:
41
+ - `account_address` (string, required): Arcadia account address
42
+ - `days` (number, default: 14): Number of days of history
43
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
44
+
45
+ ### read.account.pnl
46
+
47
+ Get PnL (cost basis) and yield earned for an Arcadia account.
48
+
49
+ Parameters:
50
+ - `account_address` (string, required): Arcadia account address
51
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
52
+
53
+ ### read.wallet.balances
54
+
55
+ Get native ETH and ERC20 token balances for a wallet address.
56
+
57
+ Parameters:
58
+ - `wallet_address` (string, required): Wallet address to check balances for
59
+ - `token_addresses` (string[], required): ERC20 token contract addresses to check
60
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
61
+
62
+ ### read.wallet.allowances
63
+
64
+ Check ERC20 token allowances for a spender address.
65
+
66
+ Parameters:
67
+ - `owner_address` (string, required): Token owner address (the wallet granting approval)
68
+ - `spender_address` (string, required): Spender address to check allowance for
69
+ - `token_addresses` (string[], required): ERC20 token contract addresses to check
70
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
71
+
72
+ ### read.wallet.accounts
73
+
74
+ List all Arcadia accounts owned by a wallet address.
75
+
76
+ Parameters:
77
+ - `wallet_address` (string, required): Wallet address to list accounts for
78
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
79
+
80
+ ### read.wallet.points
81
+
82
+ Get Arcadia points balance for a specific wallet address.
83
+
84
+ Parameters:
85
+ - `wallet_address` (string, required): Wallet address to get points for
86
+
87
+ ### read.asset.list
88
+
89
+ List supported collateral assets on Arcadia.
90
+
91
+ Parameters:
92
+ - `search` (string, optional): Filter assets by symbol (case-insensitive substring match)
93
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
94
+
95
+ ### read.asset.prices
96
+
97
+ Get USD prices for one or more asset addresses.
98
+
99
+ Parameters:
100
+ - `asset_addresses` (string, required): Single address or comma-separated addresses
101
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
102
+
103
+ ### read.pool.list
104
+
105
+ List all Arcadia lending pools: TVL, utilization, available liquidity.
106
+
107
+ Parameters:
108
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
109
+
110
+ ### read.pool.info
111
+
112
+ Get detailed info for a single lending pool including APY history over time.
113
+
114
+ Parameters:
115
+ - `pool_address` (string, required): Pool address
116
+ - `days` (number, default: 14): Number of days of APY history
117
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
118
+
119
+ ### read.point_leaderboard
120
+
121
+ Get the Arcadia points leaderboard (paginated).
122
+
123
+ Parameters:
124
+ - `limit` (number, default: 25): Max entries to return
125
+ - `offset` (number, default: 0): Skip first N entries for pagination
126
+
127
+ ### read.strategy.list
128
+
129
+ Get Arcadia LP strategies with 7d avg APY for each strategy's default range.
130
+
131
+ Parameters:
132
+ - `featured_only` (boolean, default: false): Return only featured/curated strategies
133
+ - `limit` (number, default: 25): Max strategies to return
134
+ - `offset` (number, default: 0): Skip first N strategies for pagination
135
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
136
+
137
+ ### read.strategy.info
138
+
139
+ Get full detail for a specific LP strategy by ID.
140
+
141
+ Parameters:
142
+ - `strategy_id` (number, required): Strategy ID
143
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
144
+
145
+ ### read.strategy.recommendation
146
+
147
+ Get a rebalancing recommendation for an Arcadia account.
148
+
149
+ Parameters:
150
+ - `account_address` (string, required): Arcadia account address
151
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
152
+
153
+ ### read.asset_manager.intents
154
+
155
+ List all available automation intents with their tool names, required parameters, and supported chains.
156
+
157
+ Parameters:
158
+ - `chain_id` (number, optional): Filter to automations available on this chain
159
+
160
+ ### read.guides
161
+
162
+ Get Arcadia workflow guides and reference documentation.
163
+
164
+ Parameters:
165
+ - `topic` (enum, optional): overview | automation | strategies | selection
166
+
167
+ ## Write Tools (20)
168
+
169
+ All write tools return unsigned transactions as `{ to, data, value, chainId }`.
170
+
171
+ ### write.wallet.approve
172
+
173
+ Build an unsigned approval transaction for ERC20 tokens or ERC721/ERC1155 NFTs.
174
+
175
+ Parameters:
176
+ - `token_address` (string, required): Token contract address to approve
177
+ - `spender_address` (string, required): Address being approved
178
+ - `asset_type` (enum, default: "erc20"): erc20 | erc721 | erc1155
179
+ - `amount` (string, default: "max_uint256"): ERC20 only: amount in raw units
180
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
181
+
182
+ ### write.account.create
183
+
184
+ Build an unsigned transaction to create a new Arcadia account via the Factory contract.
185
+
186
+ Parameters:
187
+ - `salt` (number, required): Unique salt (uint32) for deterministic account address
188
+ - `wallet_address` (string, required): Wallet address that will send the transaction
189
+ - `account_version` (number, default: 0): 0 = latest (V4 spot), 3 = margin (can borrow)
190
+ - `creditor` (string, optional): Lending pool address for V3 margin account
191
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
192
+
193
+ ### write.account.deposit
194
+
195
+ Build an unsigned transaction to deposit assets into an Arcadia account as collateral.
196
+
197
+ Parameters:
198
+ - `account_address` (string, required): Arcadia account address
199
+ - `asset_addresses` (string[], required): Token contract addresses to deposit
200
+ - `asset_amounts` (string[], required): Amounts in raw units/wei, one per asset
201
+ - `asset_ids` (number[], optional): Token IDs: 0 for ERC20, NFT token ID for ERC721
202
+ - `asset_types` (number[], optional): V4 only. 1=ERC20, 2=ERC721, 3=ERC1155
203
+ - `account_version` (number, optional): Override account version (auto-detected if omitted)
204
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
205
+
206
+ ### write.account.withdraw
207
+
208
+ Build an unsigned transaction to withdraw assets from an Arcadia account.
209
+
210
+ Parameters:
211
+ - `account_address` (string, required): Arcadia account address
212
+ - `asset_addresses` (string[], required): Token contract addresses to withdraw
213
+ - `asset_amounts` (string[], required): Amounts in raw units/wei, one per asset
214
+ - `asset_ids` (number[], optional): Token IDs: 0 for ERC20, NFT token ID for ERC721
215
+ - `asset_types` (number[], optional): V4 only. 1=ERC20, 2=ERC721, 3=ERC1155
216
+ - `account_version` (number, optional): Override account version (auto-detected if omitted)
217
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
218
+
219
+ ### write.account.borrow
220
+
221
+ Build an unsigned transaction to borrow from an Arcadia lending pool.
222
+
223
+ Parameters:
224
+ - `pool_address` (string, required): Lending pool address
225
+ - `account_address` (string, required): Arcadia account address used as collateral
226
+ - `amount` (string, required): Amount in raw units
227
+ - `to` (string, required): Address to receive borrowed tokens
228
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
229
+
230
+ ### write.account.repay
231
+
232
+ Repay debt to an Arcadia lending pool using tokens from the wallet.
233
+
234
+ Parameters:
235
+ - `pool_address` (string, required): Lending pool address
236
+ - `account_address` (string, required): Arcadia account address with debt
237
+ - `amount` (string, required): Amount in raw units, or "max_uint256" to repay all
238
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
239
+
240
+ ### write.account.add_liquidity
241
+
242
+ Flash-action: atomically deposits from wallet + uses account collateral + swaps to optimal ratio + mints LP + borrows if leveraged, in one transaction.
243
+
244
+ Parameters:
245
+ - `account_address` (string, required): Arcadia account address
246
+ - `wallet_address` (string, required): Wallet address of the account owner
247
+ - `positions` (object[], required): LP positions to mint. Each object:
248
+ - `strategy_id` (number, required): From read.strategy.list
249
+ - `tick_lower` (number, optional): Lower tick. Omit for full range.
250
+ - `tick_upper` (number, optional): Upper tick. Omit for full range.
251
+ - `deposits` (object[], optional): Wallet tokens to deposit. Each object:
252
+ - `asset` (string, required): Token address
253
+ - `amount` (string, required): Amount in raw units
254
+ - `decimals` (number, default: 18): Token decimals (6 for USDC, 18 for WETH)
255
+ - `use_account_assets` (boolean, default: false): Use all existing account collateral
256
+ - `leverage` (number, default: 0): 0 = no borrow, 2 = 2x leverage
257
+ - `slippage` (number, default: 100): Basis points, 100 = 1%
258
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
259
+
260
+ ### write.account.remove_liquidity
261
+
262
+ Flash-action: partially decreases liquidity from an LP position.
263
+
264
+ Parameters:
265
+ - `account_address` (string, required): Arcadia account address
266
+ - `asset_address` (string, required): Position manager contract
267
+ - `asset_id` (number, required): NFT token ID
268
+ - `adjustment` (string, required): Liquidity amount to remove (raw uint128)
269
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
270
+
271
+ ### write.account.swap
272
+
273
+ Flash-action: swaps assets within an Arcadia account atomically.
274
+
275
+ Parameters:
276
+ - `account_address` (string, required): Arcadia account address
277
+ - `asset_from` (string, required): Token address to swap from
278
+ - `asset_to` (string, required): Token address to swap to
279
+ - `amount_in` (string, required): Raw units
280
+ - `slippage` (number, default: 100): Basis points, 100 = 1%
281
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
282
+
283
+ ### write.account.deleverage
284
+
285
+ Flash-action: sells account collateral to the debt token and repays atomically.
286
+
287
+ Parameters:
288
+ - `account_address` (string, required): Arcadia account address
289
+ - `amount_in` (string, required): Collateral amount to sell (raw units)
290
+ - `asset_from` (string, required): Collateral token to sell
291
+ - `numeraire` (string, required): Debt token address
292
+ - `creditor` (string, required): Lending pool address
293
+ - `slippage` (number, default: 100): Basis points, 100 = 1%
294
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
295
+
296
+ ### write.account.stake
297
+
298
+ Flash-action: stake, unstake, or claim rewards for an LP position.
299
+
300
+ Parameters:
301
+ - `account_address` (string, required): Arcadia account address
302
+ - `action` (enum, required): stake | unstake | claim
303
+ - `asset_address` (string, required): Position manager contract address
304
+ - `asset_id` (number, required): NFT token ID
305
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
306
+
307
+ ### write.account.close
308
+
309
+ Atomic flash-action that closes an Arcadia account position in one transaction.
310
+
311
+ Parameters:
312
+ - `account_address` (string, required): Arcadia account address
313
+ - `assets` (object[], required): Assets to close/sell. Each object:
314
+ - `asset_address` (string, required): Token or position manager address
315
+ - `asset_id` (number, required): NFT token ID (0 for ERC20)
316
+ - `amount` (string, required): Amount to sell ("1" for NFTs)
317
+ - `decimals` (number, required): Token decimals (1 for NFTs)
318
+ - `receive_assets` (object[], optional): Target assets to receive. Each object:
319
+ - `asset_address` (string, required): Target token address
320
+ - `decimals` (number, required): Token decimals
321
+ - `distribution` (number, optional): Fraction of proceeds (0-1)
322
+ - `close_lp_only` (boolean, default: false): true = only burn LP, false = full close
323
+ - `slippage` (number, default: 100): Basis points, 100 = 1%
324
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
325
+
326
+ ### write.account.set_asset_managers
327
+
328
+ Build an unsigned setAssetManagers transaction from encoded intent args.
329
+
330
+ Parameters:
331
+ - `account_address` (string, required): Arcadia account address
332
+ - `asset_managers` (string[], required): Asset manager addresses from intent tools
333
+ - `statuses` (boolean[], required): Enable/disable flags from intent tools
334
+ - `datas` (string[], required): Encoded callback data from intent tools (hex)
335
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
336
+
337
+ ### write.asset_manager.rebalancer
338
+
339
+ Encode args for the rebalancer automation.
340
+
341
+ Parameters:
342
+ - `dex_protocol` (enum, required): slipstream | slipstream_v2 | staked_slipstream | staked_slipstream_v2 | uniV3 | uniV4
343
+ - `enabled` (boolean, default: true): Enable or disable
344
+ - `compound_leftovers` (enum, default: "all"): all | none | token0 | token1
345
+ - `optimal_token0_ratio` (number, default: 500000): Target token0 ratio scaled by 1e6 (500000 = 50%)
346
+ - `trigger_lower_ratio` (number, default: 0): Offset from tick_lower, fraction of tick range, scaled by 1e6
347
+ - `trigger_upper_ratio` (number, default: 0): Offset from tick_upper, fraction of tick range, scaled by 1e6
348
+ - `min_rebalance_time` (number, default: 3600): Min seconds between rebalances
349
+ - `max_rebalance_time` (number, default: 1e12): Max seconds before forced rebalance
350
+ - `strategy_hook` (string, optional): Custom strategy hook address
351
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
352
+
353
+ ### write.asset_manager.compounder
354
+
355
+ Encode args for the standalone compounder automation.
356
+
357
+ Parameters:
358
+ - `dex_protocol` (enum, required): slipstream | slipstream_v2 | staked_slipstream | staked_slipstream_v2 | uniV3 | uniV4
359
+ - `enabled` (boolean, default: true): Enable or disable
360
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
361
+
362
+ ### write.asset_manager.compounder_staked
363
+
364
+ Encode args for compounder + CowSwap for staked LP positions.
365
+
366
+ Parameters:
367
+ - `dex_protocol` (enum, required): slipstream | slipstream_v2 | staked_slipstream | staked_slipstream_v2 | uniV3 | uniV4
368
+ - `sell_tokens` (string[], required): Token addresses to sell via CowSwap
369
+ - `buy_token` (string, required): Token address to buy (USDC, WETH, cbBTC)
370
+ - `enabled` (boolean, default: true): Enable or disable
371
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
372
+
373
+ ### write.asset_manager.yield_claimer
374
+
375
+ Encode args for the standalone yield claimer automation.
376
+
377
+ Parameters:
378
+ - `dex_protocol` (enum, required): slipstream | slipstream_v2 | staked_slipstream | staked_slipstream_v2 | uniV3 | uniV4
379
+ - `fee_recipient` (string, required): Address to receive claimed fees
380
+ - `enabled` (boolean, default: true): Enable or disable
381
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
382
+
383
+ ### write.asset_manager.yield_claimer_cowswap
384
+
385
+ Encode args for yield claimer + CowSwap.
386
+
387
+ Parameters:
388
+ - `dex_protocol` (enum, required): slipstream | slipstream_v2 | staked_slipstream | staked_slipstream_v2 | uniV3 | uniV4
389
+ - `sell_tokens` (string[], required): Token addresses to sell
390
+ - `buy_token` (string, required): Token address to receive after swap
391
+ - `fee_recipient` (string, required): Address to receive claimed fees
392
+ - `enabled` (boolean, default: true): Enable or disable
393
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
394
+
395
+ ### write.asset_manager.cow_swapper
396
+
397
+ Encode args for standalone direct CowSwap mode (Base only).
398
+
399
+ Parameters:
400
+ - `enabled` (boolean, default: true): Enable or disable
401
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base)
402
+
403
+ ### write.asset_manager.merkl_operator
404
+
405
+ Encode args for the Merkl operator automation.
406
+
407
+ Parameters:
408
+ - `reward_recipient` (string, required): Address to receive Merkl rewards
409
+ - `enabled` (boolean, default: true): Enable or disable
410
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
411
+
412
+ ## Dev Tools (1)
413
+
414
+ ### dev.send
415
+
416
+ Sign and broadcast an unsigned transaction using a local private key (PK env var). Dev only.
417
+
418
+ Parameters:
419
+ - `to` (string, required): Target contract address
420
+ - `data` (string, required): Encoded calldata (hex)
421
+ - `value` (string, default: "0"): Value in wei
422
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
423
+
424
+ ## Links
425
+
426
+ - Website: https://arcadia.finance
427
+ - Docs: https://docs.arcadia.finance
428
+ - npm: https://www.npmjs.com/package/@arcadia-finance/mcp-server
429
+ - GitHub: https://github.com/arcadia-finance/mcp-server
package/llms.txt ADDED
@@ -0,0 +1,79 @@
1
+ # Arcadia Finance MCP Server
2
+
3
+ > MCP server for Arcadia Finance, a DeFi protocol for managing concentrated liquidity positions (Uniswap v3/v4, Aerodrome/Slipstream) with leverage, automated rebalancing, and yield optimization. Supported chains: Base (8453), Unichain (130).
4
+
5
+ ## Overview
6
+
7
+ Arcadia lets users open leveraged LP positions, borrow against collateral, and automate position management (rebalancing, compounding, yield claiming). This MCP server exposes the full protocol as 38 tools:
8
+
9
+ - **Account management**: health factor, collateral, debt, positions, PnL, history
10
+ - **Wallet**: ERC20 balances, allowances, owned accounts, points
11
+ - **Lending pools**: TVL, APY, utilization, available liquidity, rate history
12
+ - **LP strategies**: concentrated liquidity strategies with APY per range width, recommendations
13
+ - **Transaction building**: unsigned calldata for deposits, borrows, swaps, LP minting/closing, staking
14
+ - **Automation**: configure asset managers (rebalancer, compounder, yield claimer, CowSwap, Merkl)
15
+
16
+ All write tools return unsigned transactions (`{ to, data, value, chainId }`). Signing is the client's responsibility.
17
+
18
+ ## Install
19
+
20
+ ```
21
+ npx -y @arcadia-finance/mcp-server
22
+ ```
23
+
24
+ Or connect to the remote server: `https://mcp.arcadia.finance/mcp`
25
+
26
+ ## Tools (38 total)
27
+
28
+ ### Read (17)
29
+
30
+ - read.account.info: account overview with health factor, collateral, debt, positions, liquidation price, automation status
31
+ - read.account.history: historical account value over time
32
+ - read.account.pnl: PnL and yield data for an account
33
+ - read.wallet.accounts: list all Arcadia accounts owned by a wallet
34
+ - read.wallet.balances: ERC20 and native ETH balances for a wallet
35
+ - read.wallet.allowances: check ERC20 token allowances for a spender
36
+ - read.wallet.points: Arcadia points balance for a wallet
37
+ - read.asset.list: supported collateral assets with addresses, types, decimals
38
+ - read.asset.prices: USD prices for asset addresses
39
+ - read.pool.list: all lending pools with TVL, APY, utilization, liquidity
40
+ - read.pool.info: single pool detail with APY history
41
+ - read.point_leaderboard: paginated points leaderboard
42
+ - read.strategy.list: LP strategies with APY, underlyings, pool info
43
+ - read.strategy.info: full detail for a specific LP strategy
44
+ - read.strategy.recommendation: rebalancing recommendation for an account
45
+ - read.guides: reference guides for automation, strategies, addresses
46
+ - read.asset_manager.intents: available automation intents with params and supported chains
47
+
48
+ ### Write (20)
49
+
50
+ - write.wallet.approve: approve ERC20/ERC721 for spending
51
+ - write.account.create: create a new Arcadia account
52
+ - write.account.deposit: deposit assets into an account
53
+ - write.account.withdraw: withdraw assets from an account
54
+ - write.account.borrow: borrow from a lending pool
55
+ - write.account.repay: repay debt from wallet tokens
56
+ - write.account.add_liquidity: flash-action that deposits, swaps, mints LP, and optionally leverages atomically
57
+ - write.account.remove_liquidity: partially decrease LP position liquidity
58
+ - write.account.swap: swap assets within an account
59
+ - write.account.deleverage: repay debt by selling collateral
60
+ - write.account.close: atomic close that burns LP, swaps, and repays in one tx
61
+ - write.account.stake: stake, unstake, or claim LP rewards
62
+ - write.account.set_asset_managers: build setAssetManagers tx from encoded intent args
63
+ - write.asset_manager.rebalancer: encode rebalancer automation args
64
+ - write.asset_manager.compounder: encode standalone compounder args
65
+ - write.asset_manager.compounder_staked: encode compounder + CowSwap for staked positions
66
+ - write.asset_manager.yield_claimer: encode yield claimer args
67
+ - write.asset_manager.yield_claimer_cowswap: encode yield claimer + CowSwap args
68
+ - write.asset_manager.cow_swapper: encode direct CowSwap mode args
69
+ - write.asset_manager.merkl_operator: encode Merkl reward claimer args
70
+
71
+ ### Dev (1)
72
+
73
+ - dev.send: sign and broadcast using local private key (dev only)
74
+
75
+ ## Links
76
+
77
+ - Website: https://arcadia.finance
78
+ - Docs: https://docs.arcadia.finance
79
+ - npm: https://www.npmjs.com/package/@arcadia-finance/mcp-server
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.3.1",
4
+ "version": "0.3.3",
5
5
  "description": "MCP server for Arcadia Finance. Manage concentrated liquidity positions with leverage, automated rebalancing, and yield optimization on Base and Unichain.",
6
6
  "type": "module",
7
7
  "license": "AGPL-3.0",
@@ -13,21 +13,31 @@
13
13
  "homepage": "https://arcadia.finance",
14
14
  "keywords": [
15
15
  "mcp",
16
+ "mcp-server",
17
+ "ai-agent",
16
18
  "arcadia",
17
19
  "defi",
18
20
  "lending",
21
+ "concentrated-liquidity",
19
22
  "clamm",
20
23
  "liquidity",
21
24
  "uniswap",
22
25
  "aerodrome",
26
+ "slipstream",
23
27
  "base",
24
- "optimism",
25
- "unichain"
28
+ "unichain",
29
+ "ethereum",
30
+ "leverage",
31
+ "yield-farming",
32
+ "rebalancing",
33
+ "onchain"
26
34
  ],
27
35
  "files": [
28
36
  "dist",
29
37
  "skills",
30
38
  "server.json",
39
+ "llms.txt",
40
+ "llms-full.txt",
31
41
  "README.md",
32
42
  "LICENSE.md"
33
43
  ],
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": "Manage Uniswap and Aerodrome liquidity positions with automated rebalancing and leverage.",
6
- "version": "0.3.1",
6
+ "version": "0.3.3",
7
7
  "websiteUrl": "https://arcadia.finance",
8
8
  "repository": {
9
9
  "url": "https://github.com/arcadia-finance/mcp-server",
@@ -13,7 +13,7 @@
13
13
  {
14
14
  "registryType": "npm",
15
15
  "identifier": "@arcadia-finance/mcp-server",
16
- "version": "0.3.1",
16
+ "version": "0.3.3",
17
17
  "transport": {
18
18
  "type": "stdio"
19
19
  },
@@ -61,13 +61,12 @@
61
61
  "isSecret": false
62
62
  }
63
63
  ]
64
- },
64
+ }
65
+ ],
66
+ "remotes": [
65
67
  {
66
- "registryType": "url",
67
- "identifier": "https://mcp.arcadia.finance/mcp",
68
- "transport": {
69
- "type": "streamablehttp"
70
- }
68
+ "type": "streamable-http",
69
+ "url": "https://mcp.arcadia.finance/mcp"
71
70
  }
72
71
  ]
73
72
  }
@@ -0,0 +1,69 @@
1
+ ---
2
+ name: arcadia-finance
3
+ description: "Deploy and manage concentrated liquidity positions on Uniswap and Aerodrome with automated rebalancing, compounding, and yield optimization on Base and Unichain. Use when: users ask about LP management, DeFi lending, yield strategies, or automation on Base or Unichain."
4
+ ---
5
+
6
+ # Arcadia Finance
7
+
8
+ Arcadia helps users deploy and manage concentrated liquidity positions on Uniswap and Aerodrome with automated rebalancing, compounding, yield optimization, and optional leverage. Supported chains: Base (8453), Unichain (130).
9
+
10
+ ## CLI Usage
11
+
12
+ ```bash
13
+ node arcadia.mjs <tool_name> '<json_args>'
14
+ node arcadia.mjs --list
15
+ ```
16
+
17
+ Requires `@modelcontextprotocol/sdk`: run `npm install @modelcontextprotocol/sdk` once.
18
+
19
+ ## Read Operations
20
+
21
+ ```bash
22
+ # List all accounts for a wallet
23
+ node arcadia.mjs read_wallet_accounts '{"wallet_address":"0x..."}'
24
+
25
+ # Account details (health factor, collateral, debt, positions)
26
+ node arcadia.mjs read_account_info '{"account_address":"0x..."}'
27
+
28
+ # Featured LP strategies with APY
29
+ node arcadia.mjs read_strategy_list '{"featured_only":true}'
30
+
31
+ # Lending pools (TVL, APY, utilization)
32
+ node arcadia.mjs read_pool_list '{}'
33
+
34
+ # Workflow guides (automation setup, strategy selection)
35
+ node arcadia.mjs read_guides '{"topic":"overview"}'
36
+
37
+ # Available automations (rebalancer, compounder, yield claimer)
38
+ node arcadia.mjs read_asset_manager_intents '{}'
39
+ ```
40
+
41
+ ## Write Operations
42
+
43
+ All write tools return unsigned transactions `{ to, data, value, chainId }`. See `wallet-signing.md` for how to sign and broadcast.
44
+
45
+ ```bash
46
+ # Open LP position (deposits + swaps + mints LP atomically)
47
+ node arcadia.mjs write_account_add_liquidity '{"account_address":"0x...","wallet_address":"0x...","positions":[{"strategy_id":123}],"deposits":[{"asset":"0x...","amount":"1000000","decimals":6}]}'
48
+
49
+ # Close position (burn LP + swap + repay in one tx)
50
+ node arcadia.mjs write_account_close '{"account_address":"0x...","assets":[...],"receive_assets":[...]}'
51
+
52
+ # Enable automation
53
+ node arcadia.mjs write_asset_manager_rebalancer '{"dex_protocol":"slipstream"}'
54
+ node arcadia.mjs write_account_set_asset_managers '{"account_address":"0x...","asset_managers":[...],"statuses":[...],"datas":[...]}'
55
+ ```
56
+
57
+ ## Safety
58
+
59
+ - Write tools return unsigned transactions only. Never auto-sign.
60
+ - Always confirm transaction details with the user before signing.
61
+ - Check account health factor with `read_account_info` before risky operations.
62
+
63
+ ## References
64
+
65
+ - Full tool documentation: https://mcp.arcadia.finance/llms-full.txt
66
+ - Contract addresses: see `contracts.md`
67
+ - Signing guide: see `wallet-signing.md`
68
+ - Website: https://arcadia.finance
69
+ - Docs: https://docs.arcadia.finance
@@ -0,0 +1,49 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * CLI wrapper for Arcadia Finance MCP server.
5
+ * Connects to the remote endpoint and calls tools by name.
6
+ *
7
+ * Usage:
8
+ * node arcadia.mjs <tool_name> '<json_args>'
9
+ * node arcadia.mjs --list
10
+ *
11
+ * Requires: npm install @modelcontextprotocol/sdk
12
+ */
13
+
14
+ import { Client } from "@modelcontextprotocol/sdk/client/index.js";
15
+ import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
16
+
17
+ const ENDPOINT = process.env.ARCADIA_MCP_URL || "https://mcp.arcadia.finance/mcp";
18
+ const [toolName, argsJson] = process.argv.slice(2);
19
+
20
+ if (!toolName) {
21
+ console.error("Usage: node arcadia.mjs <tool_name> '<json_args>'");
22
+ console.error(" node arcadia.mjs --list");
23
+ process.exit(1);
24
+ }
25
+
26
+ const client = new Client({ name: "arcadia-openclaw", version: "1.0.0" });
27
+ const transport = new StreamableHTTPClientTransport(new URL(ENDPOINT));
28
+ await client.connect(transport);
29
+
30
+ try {
31
+ if (toolName === "--list") {
32
+ const { tools } = await client.listTools();
33
+ for (const t of tools.sort((a, b) => a.name.localeCompare(b.name))) {
34
+ console.log(`${t.name}: ${t.description?.substring(0, 120)}`);
35
+ }
36
+ } else {
37
+ const args = argsJson ? JSON.parse(argsJson) : {};
38
+ const result = await client.callTool({ name: toolName, arguments: args });
39
+ const text = result.content?.[0]?.text ?? "";
40
+ if (result.isError) {
41
+ console.error(`ERROR: ${text}`);
42
+ process.exitCode = 1;
43
+ } else {
44
+ console.log(text);
45
+ }
46
+ }
47
+ } finally {
48
+ await client.close();
49
+ }
@@ -0,0 +1,32 @@
1
+ # Arcadia Contract Addresses
2
+
3
+ Supported chains: Base (8453), Unichain (130).
4
+
5
+ ## Protocol (same on all chains)
6
+
7
+ | Contract | Address |
8
+ | ---------- | ------------------------------------------ |
9
+ | Factory | 0xDa14Fdd72345c4d2511357214c5B89A919768e59 |
10
+ | Registry | 0xd0690557600eb8Be8391D1d97346e2aab5300d5f |
11
+ | Liquidator | 0xA4B0b9fD1d91fA2De44F6ABFd59cC14bA1E1a7Af |
12
+
13
+ ## Lending Pools (Base)
14
+
15
+ | Pool | Address |
16
+ | -------- | ------------------------------------------ |
17
+ | LP_WETH | 0x803ea69c7e87D1d6C86adeB40CB636cC0E6B98E2 |
18
+ | LP_USDC | 0x3ec4a293Fb906DD2Cd440c20dECB250DeF141dF1 |
19
+ | LP_CBBTC | 0xa37E9b4369dc20940009030BfbC2088F09645e3B |
20
+
21
+ ## Key Tokens (Base)
22
+
23
+ | Token | Address | Decimals |
24
+ | ----- | ------------------------------------------ | -------- |
25
+ | WETH | 0x4200000000000000000000000000000000000006 | 18 |
26
+ | USDC | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 | 6 |
27
+ | cbBTC | 0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf | 8 |
28
+ | AERO | 0x940181a94A35A4569E4529A3CDfB74e38FD98631 | 18 |
29
+
30
+ ## Asset Managers
31
+
32
+ Rebalancers, compounders, and yield claimers are deployed per DEX protocol. Use `read_asset_manager_intents` to discover available automations and their addresses.
@@ -0,0 +1,31 @@
1
+ # Signing Unsigned Transactions
2
+
3
+ All Arcadia write tools return unsigned transactions as `{ to, data, value, chainId }`. You need a separate wallet to sign and broadcast.
4
+
5
+ ## Options
6
+
7
+ **Foundry cast (dev/testing):**
8
+
9
+ ```bash
10
+ cast send <to> --data <data> --value <value> --rpc-url $RPC_URL --private-key $PK
11
+ ```
12
+
13
+ **Wallet MCP servers (production):**
14
+
15
+ - MCP Wallet Signer (github.com/nikicat/mcp-wallet-signer): routes to browser wallet (MetaMask, Rabby), non-custodial
16
+ - Phantom MCP (@phantom/mcp-server): for Phantom wallet users
17
+ - Privy MCP (github.com/incentivai-io/privy-mcp-server): wallet infrastructure
18
+ - Coinbase AgentKit (github.com/coinbase/agentkit): wallet-agnostic signing
19
+ - Safe MCP (github.com/safer-sh/safer): multi-sig via Safe
20
+
21
+ **viem/ethers (in code):**
22
+
23
+ ```javascript
24
+ import { createWalletClient, http } from "viem";
25
+ import { privateKeyToAccount } from "viem/accounts";
26
+ import { base } from "viem/chains";
27
+
28
+ const account = privateKeyToAccount("0x...");
29
+ const client = createWalletClient({ account, chain: base, transport: http() });
30
+ const hash = await client.sendTransaction(tx);
31
+ ```