@arcadia-finance/mcp-server 0.1.1 → 0.1.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 +28 -1
- package/dist/index.js +1 -1
- package/dist/tools/read/accounts.js +44 -2
- package/package.json +8 -5
- package/server.json +48 -0
package/README.md
CHANGED
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
# Arcadia Finance MCP Server
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@arcadia-finance/mcp-server)
|
|
4
|
+
[](https://www.npmjs.com/package/@arcadia-finance/mcp-server)
|
|
5
|
+
[](https://smithery.ai/server/@arcadia-finance/mcp-server)
|
|
6
|
+
[](LICENSE.md)
|
|
7
|
+
[](https://www.typescriptlang.org/)
|
|
8
|
+
[](https://modelcontextprotocol.io/)
|
|
9
|
+
|
|
10
|
+
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.
|
|
4
11
|
|
|
5
12
|
Designed for AI agents (Claude, Cursor, etc.) to interact with Arcadia onchain.
|
|
6
13
|
|
|
14
|
+
## Install
|
|
15
|
+
|
|
16
|
+
[](https://vscode.dev/redirect/mcp/install?name=arcadia-finance&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40arcadia-finance%2Fmcp-server%22%5D%7D)
|
|
17
|
+
[](https://cursor.com/en/install-mcp?name=arcadia-finance&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBhcmNhZGlhLWZpbmFuY2UvbWNwLXNlcnZlciJdfQ==)
|
|
18
|
+
|
|
7
19
|
## Tools
|
|
8
20
|
|
|
9
21
|
### Read Tools
|
|
@@ -132,6 +144,12 @@ yarn build
|
|
|
132
144
|
}
|
|
133
145
|
```
|
|
134
146
|
|
|
147
|
+
**Claude Code:**
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
claude mcp add arcadia-finance -- npx -y @arcadia-finance/mcp-server
|
|
151
|
+
```
|
|
152
|
+
|
|
135
153
|
**From source** (local development):
|
|
136
154
|
|
|
137
155
|
```json
|
|
@@ -175,6 +193,15 @@ Open an issue: https://github.com/arcadia-finance/mcp-server/issues
|
|
|
175
193
|
|
|
176
194
|
Pull requests for documentation fixes are welcome from agents and humans alike. All PRs require human review before merging.
|
|
177
195
|
|
|
196
|
+
## Where to Find Us
|
|
197
|
+
|
|
198
|
+
- **npm:** [@arcadia-finance/mcp-server](https://www.npmjs.com/package/@arcadia-finance/mcp-server)
|
|
199
|
+
- **Smithery:** [smithery.ai/@arcadia-finance/mcp-server](https://smithery.ai/server/@arcadia-finance/mcp-server)
|
|
200
|
+
- **PulseMCP:** [pulsemcp.com](https://pulsemcp.com)
|
|
201
|
+
- **MCP Market:** [mcpmarket.com](https://mcpmarket.com)
|
|
202
|
+
- **awesome-mcp-servers (punkpeye):** [github.com/punkpeye/awesome-mcp-servers](https://github.com/punkpeye/awesome-mcp-servers)
|
|
203
|
+
- **awesome-mcp-servers (wong2):** [github.com/wong2/awesome-mcp-servers](https://github.com/wong2/awesome-mcp-servers)
|
|
204
|
+
|
|
178
205
|
## Development
|
|
179
206
|
|
|
180
207
|
```bash
|
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ const pkg = require("../package.json");
|
|
|
19
19
|
const server = new McpServer({
|
|
20
20
|
name: "arcadia-finance",
|
|
21
21
|
version: pkg.version,
|
|
22
|
-
description: "Arcadia Finance
|
|
22
|
+
description: "Arcadia Finance. Manage concentrated liquidity positions with leverage, automated rebalancing, and yield optimization on Base, Optimism, and Unichain.",
|
|
23
23
|
});
|
|
24
24
|
const apiClient = new ArcadiaApiClient();
|
|
25
25
|
const chainConfigs = getChainConfigs();
|
|
@@ -2,6 +2,39 @@ import { z } from "zod";
|
|
|
2
2
|
import { accountAbi } from "../../abis/index.js";
|
|
3
3
|
import { getPublicClient } from "../../clients/chain.js";
|
|
4
4
|
import { ASSET_MANAGERS } from "../../config/addresses.js";
|
|
5
|
+
function trimOverview(overview) {
|
|
6
|
+
const trimmed = { ...overview };
|
|
7
|
+
if (Array.isArray(trimmed.historic_actions)) {
|
|
8
|
+
trimmed.historic_actions_count = trimmed.historic_actions.length;
|
|
9
|
+
delete trimmed.historic_actions;
|
|
10
|
+
}
|
|
11
|
+
if (Array.isArray(trimmed.assets)) {
|
|
12
|
+
trimmed.assets = trimmed.assets.map((a) => {
|
|
13
|
+
const { related_strategies, asset_details: _ad, ...rest } = a;
|
|
14
|
+
const asset = { ...rest };
|
|
15
|
+
if (Array.isArray(related_strategies) && related_strategies.length > 0) {
|
|
16
|
+
asset.strategy_count = related_strategies.length;
|
|
17
|
+
}
|
|
18
|
+
return asset;
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
delete trimmed.total_value_spot;
|
|
22
|
+
delete trimmed.total_value_spot_usd;
|
|
23
|
+
delete trimmed.net_numeraire_spot;
|
|
24
|
+
delete trimmed.debt_numeraire_spot;
|
|
25
|
+
delete trimmed.debt_usd_spot;
|
|
26
|
+
if (trimmed.health_factor === 1) {
|
|
27
|
+
delete trimmed.maintenance_margin;
|
|
28
|
+
delete trimmed.maintenance_margin_usd;
|
|
29
|
+
delete trimmed.collateral_value_account;
|
|
30
|
+
delete trimmed.collateral_value_account_usd;
|
|
31
|
+
delete trimmed.liquidation_value_account;
|
|
32
|
+
delete trimmed.liquidation_value_account_usd;
|
|
33
|
+
delete trimmed.used_margin;
|
|
34
|
+
delete trimmed.used_margin_usd;
|
|
35
|
+
}
|
|
36
|
+
return trimmed;
|
|
37
|
+
}
|
|
5
38
|
export function registerAccountTools(server, api, chains) {
|
|
6
39
|
server.registerTool("get_account_info", {
|
|
7
40
|
description: "Get full overview of an Arcadia account: health factor, collateral value, debt, deposited assets, liquidation price, and automation status. Pass account_address for a specific account, or wallet_address to list all accounts owned by a wallet. Health factor = 1 - (used_margin / liquidation_value): 1 = no debt (safest), >0 = healthy, 0 = liquidation threshold, <0 = past liquidation. Higher is safer. On Base, also returns which asset managers are enabled (rebalancer, compounder, yield_claimer, merkl_operator, cow_swapper).",
|
|
@@ -128,7 +161,7 @@ export function registerAccountTools(server, api, chains) {
|
|
|
128
161
|
}
|
|
129
162
|
const result = {
|
|
130
163
|
account_version: accountVersion,
|
|
131
|
-
overview,
|
|
164
|
+
overview: overview ? trimOverview(overview) : null,
|
|
132
165
|
liquidation_price,
|
|
133
166
|
};
|
|
134
167
|
if (automation)
|
|
@@ -208,7 +241,16 @@ export function registerAccountTools(server, api, chains) {
|
|
|
208
241
|
api.getPnlCostBasis(chain_id, account_address),
|
|
209
242
|
api.getYieldEarned(chain_id, account_address),
|
|
210
243
|
]);
|
|
211
|
-
const { direct_deposits: _, ...pnl } = pnlRaw;
|
|
244
|
+
const { direct_deposits: _, flashaction_deposits, flashaction_withdrawals, direct_withdrawals, yield_withdrawals, ...pnl } = pnlRaw;
|
|
245
|
+
if (Array.isArray(flashaction_deposits) && flashaction_deposits.length > 0)
|
|
246
|
+
pnl.flashaction_deposit_count = flashaction_deposits.length;
|
|
247
|
+
if (Array.isArray(flashaction_withdrawals) && flashaction_withdrawals.length > 0)
|
|
248
|
+
pnl.flashaction_withdrawal_count =
|
|
249
|
+
flashaction_withdrawals.length;
|
|
250
|
+
if (Array.isArray(direct_withdrawals) && direct_withdrawals.length > 0)
|
|
251
|
+
pnl.direct_withdrawal_count = direct_withdrawals.length;
|
|
252
|
+
if (Array.isArray(yield_withdrawals) && yield_withdrawals.length > 0)
|
|
253
|
+
pnl.yield_withdrawal_count = yield_withdrawals.length;
|
|
212
254
|
const { daily_yields: _dy, daily_yields_usd: _dyu, ...yieldData } = yieldRaw;
|
|
213
255
|
return {
|
|
214
256
|
content: [
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcadia-finance/mcp-server",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
3
|
+
"mcpName": "io.github.arcadia-finance/mcp-server",
|
|
4
|
+
"version": "0.1.3",
|
|
5
|
+
"description": "MCP server for Arcadia Finance. Manage concentrated liquidity positions with leverage, automated rebalancing, and yield optimization on Base, Optimism, and Unichain.",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"license": "BUSL-1.1",
|
|
7
8
|
"packageManager": "yarn@4.13.0",
|
|
@@ -17,14 +18,16 @@
|
|
|
17
18
|
"lending",
|
|
18
19
|
"clamm",
|
|
19
20
|
"liquidity",
|
|
21
|
+
"uniswap",
|
|
22
|
+
"aerodrome",
|
|
20
23
|
"base",
|
|
21
|
-
"optimism"
|
|
24
|
+
"optimism",
|
|
25
|
+
"unichain"
|
|
22
26
|
],
|
|
23
27
|
"files": [
|
|
24
28
|
"dist",
|
|
25
|
-
"!dist/**/*.d.ts",
|
|
26
|
-
"!dist/**/*.js.map",
|
|
27
29
|
"skills",
|
|
30
|
+
"server.json",
|
|
28
31
|
"README.md",
|
|
29
32
|
"LICENSE.md"
|
|
30
33
|
],
|
package/server.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
|
+
"name": "io.github.arcadia-finance/mcp-server",
|
|
4
|
+
"title": "Arcadia Finance",
|
|
5
|
+
"description": "Manage Uniswap and Aerodrome liquidity positions with automated rebalancing and leverage.",
|
|
6
|
+
"version": "0.1.3",
|
|
7
|
+
"websiteUrl": "https://arcadia.finance",
|
|
8
|
+
"repository": {
|
|
9
|
+
"url": "https://github.com/arcadia-finance/mcp-server",
|
|
10
|
+
"source": "github"
|
|
11
|
+
},
|
|
12
|
+
"packages": [
|
|
13
|
+
{
|
|
14
|
+
"registryType": "npm",
|
|
15
|
+
"identifier": "@arcadia-finance/mcp-server",
|
|
16
|
+
"version": "0.1.3",
|
|
17
|
+
"transport": {
|
|
18
|
+
"type": "stdio"
|
|
19
|
+
},
|
|
20
|
+
"environmentVariables": [
|
|
21
|
+
{
|
|
22
|
+
"name": "RPC_URL_BASE",
|
|
23
|
+
"description": "RPC URL for Base (8453). Falls back to public RPC if not set.",
|
|
24
|
+
"isRequired": false,
|
|
25
|
+
"isSecret": true
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "RPC_URL_OPTIMISM",
|
|
29
|
+
"description": "RPC URL for Optimism (10). Falls back to public RPC if not set.",
|
|
30
|
+
"isRequired": false,
|
|
31
|
+
"isSecret": true
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "RPC_URL_UNICHAIN",
|
|
35
|
+
"description": "RPC URL for Unichain (130). Falls back to public RPC if not set.",
|
|
36
|
+
"isRequired": false,
|
|
37
|
+
"isSecret": true
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "PK",
|
|
41
|
+
"description": "Private key for dev-only signing (not for production).",
|
|
42
|
+
"isRequired": false,
|
|
43
|
+
"isSecret": true
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|