Skip to content

Commit 8aff843

Browse files
committed
[feature] relay actions
1 parent 6d3eea0 commit 8aff843

File tree

13 files changed

+1283
-87
lines changed

13 files changed

+1283
-87
lines changed

README.md

Lines changed: 42 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,30 @@
1-
Crynux MCP Server
1+
# Crynux MCP Server
22

3-
MCP server for Crynux Network operations.
3+
MCP server for Crynux Network operations, designed for LLM clients (such as Cursor, VS Code, and Claude Desktop) to perform most Crynux Network/Crynux Portal actions through standardized MCP tools.
44

5-
## Scope
5+
## Features
66

7-
- Native CNX balance query on Crynux EVM networks
8-
- Native CNX transfer signed by a private key from local system keychain
7+
### Wallet
8+
9+
- Wallet management with system keychain (create keys, sign transactions, list/delete/export keys, set default key)
10+
11+
### Blockchain
12+
13+
- Native CNX balance query on Crynux L2 networks
14+
- Native CNX transfer
915
- Beneficial address query and on-chain update
1016
- Node staking query
1117
- Node credits query
12-
- Relay API integration is not implemented yet
1318

14-
## Spec and transport
19+
### Relay
1520

16-
- MCP protocol target: `2025-11-25`
17-
- Runtime transport: `stdio` (local process, no HTTP server required)
21+
- Relay account balance query
22+
- Relay withdraw create/list/latest-status query
23+
- Relay deposit initiate/list/latest-status query
1824

1925
## Tools
2026

21-
### `get_balance`
22-
23-
Query the native CNX balance for an EVM address on a configured Crynux network.
24-
25-
### `transfer_native`
26-
27-
Send native CNX from the local signer wallet to a recipient EVM address.
28-
29-
### `get_beneficial_address`
30-
31-
Query the configured beneficial address for an operational EVM address.
32-
33-
### `set_beneficial_address`
34-
35-
Submit an on-chain transaction to set a beneficial address.
36-
37-
### `get_node_staking_info`
38-
39-
Query node staking details.
40-
41-
### `get_node_credits`
42-
43-
Query node credits.
44-
45-
### `create_key`
46-
47-
Create a new signer key in local system keychain with a provided name.
48-
49-
### `list_keys`
50-
51-
List all local signer keys (name, address, and default flag).
52-
53-
### `delete_key`
54-
55-
Delete a local signer key by name.
56-
57-
### `set_default_key`
58-
59-
Set a local signer key as the default key.
60-
61-
### `export_key`
62-
63-
Export a named local signer key to a specified file path.
64-
65-
For detailed tool inputs/outputs, see [`docs/tools.md`](./docs/tools.md).
27+
For the full action list and detailed input/output fields, see [`docs/tools.md`](./docs/tools.md).
6628

6729
## Security notes
6830

@@ -170,14 +132,8 @@ After saving MCP config, fully restart the client so it reloads servers.
170132

171133
### Step 6) Verify the server is loaded
172134

173-
In your AI client, check MCP tool list and confirm these tools appear:
174-
175-
- `get_balance`
176-
- `transfer_native`
177-
- `get_beneficial_address`
178-
- `set_beneficial_address`
179-
- `get_node_staking_info`
180-
- `get_node_credits`
135+
In your AI client, check MCP tool list and confirm wallet, blockchain, and Relay actions are available.
136+
Use [`docs/tools.md`](./docs/tools.md) as the source of truth for the full action catalog.
181137

182138
### Step 7) First tool calls
183139

@@ -195,26 +151,28 @@ Example: send native CNX
195151
- `amount`: for example `0.1`
196152
- `unit`: `ether`
197153

198-
Example: query beneficial address
154+
Example: query Relay account balance
199155

200156
- `network`: `dymension`
201-
- `node_address`: your operational EVM address
157+
- `address`: your wallet EVM address
158+
- `key_name`: `main` (optional)
202159

203-
Example: set beneficial address
204-
205-
- `network`: `dymension`
206-
- `key_name`: `main` (optional, uses default local key if omitted)
207-
- `beneficial_address`: your payout EVM address
160+
Relay auth token is obtained and refreshed internally for authenticated Relay actions.
208161

209-
Example: query node staking info
162+
Example: create Relay withdraw request
210163

211164
- `network`: `dymension`
212-
- `node_address`: your node wallet EVM address
165+
- `address`: your wallet EVM address
166+
- `amount_wei`: for example `1000000000000000000` (1 CNX)
167+
- `benefit_address`: optional destination address
168+
- `key_name`: `main` (optional)
213169

214-
Example: query node credits
170+
Example: initiate Relay deposit (on-chain transfer)
215171

216172
- `network`: `dymension`
217-
- `node_address`: your node wallet EVM address
173+
- `amount`: for example `1`
174+
- `unit`: `ether`
175+
- `key_name`: `main` (optional)
218176

219177
Signer key source for transfer:
220178

@@ -229,6 +187,11 @@ You can start the MCP server process directly for debugging:
229187
python -m crynux_mcp
230188
```
231189

190+
## Spec and transport
191+
192+
- MCP protocol target: `2025-11-25`
193+
- Runtime transport: `stdio` (local process, no HTTP server required)
194+
232195
## Release
233196

234197
Maintainer release instructions are in [`RELEASE.md`](./RELEASE.md).
@@ -241,6 +204,12 @@ Chain metadata is stored in:
241204

242205
Update this file to change RPC URLs, chain IDs, or contract addresses.
243206

207+
Relay API configuration is stored in:
208+
209+
- `src/crynux_mcp/config/relay.json`
210+
211+
Update this file to change Relay URL, timeout, and per-network deposit addresses.
212+
244213
## Tests
245214

246215
```bash

0 commit comments

Comments
 (0)