Skip to content

Commit 030a078

Browse files
authored
Merge pull request #2 from lukewwww/main
Node & Relay actions
2 parents c286f22 + 8aff843 commit 030a078

File tree

16 files changed

+1809
-52
lines changed

16 files changed

+1809
-52
lines changed

README.md

Lines changed: 53 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,30 @@
1-
# crynux-mcp
1+
# Crynux MCP Server
22

3-
Python MCP server for Crynux EVM L2 blockchain 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
9-
- Relay API integration is not implemented yet
7+
### Wallet
108

11-
## Spec and transport
12-
13-
- MCP protocol target: `2025-11-25`
14-
- Runtime transport: `stdio` (local process, no HTTP server required)
15-
16-
## Tools
17-
18-
### `get_balance`
19-
20-
Query the native CNX balance for an EVM address on a configured Crynux network.
21-
22-
### `transfer_native`
9+
- Wallet management with system keychain (create keys, sign transactions, list/delete/export keys, set default key)
2310

24-
Send native CNX from the local signer wallet to a recipient EVM address.
11+
### Blockchain
2512

26-
### `create_key`
13+
- Native CNX balance query on Crynux L2 networks
14+
- Native CNX transfer
15+
- Beneficial address query and on-chain update
16+
- Node staking query
17+
- Node credits query
2718

28-
Create a new signer key in local system keychain with a provided name.
19+
### Relay
2920

30-
### `list_keys`
21+
- Relay account balance query
22+
- Relay withdraw create/list/latest-status query
23+
- Relay deposit initiate/list/latest-status query
3124

32-
List all local signer keys (name, address, and default flag).
33-
34-
### `delete_key`
35-
36-
Delete a local signer key by name.
37-
38-
### `set_default_key`
39-
40-
Set a local signer key as the default key.
41-
42-
### `export_key`
43-
44-
Export a named local signer key to a specified file path.
25+
## Tools
4526

46-
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).
4728

4829
## Security notes
4930

@@ -151,10 +132,8 @@ After saving MCP config, fully restart the client so it reloads servers.
151132

152133
### Step 6) Verify the server is loaded
153134

154-
In your AI client, check MCP tool list and confirm these tools appear:
155-
156-
- `get_balance`
157-
- `transfer_native`
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.
158137

159138
### Step 7) First tool calls
160139

@@ -172,6 +151,29 @@ Example: send native CNX
172151
- `amount`: for example `0.1`
173152
- `unit`: `ether`
174153

154+
Example: query Relay account balance
155+
156+
- `network`: `dymension`
157+
- `address`: your wallet EVM address
158+
- `key_name`: `main` (optional)
159+
160+
Relay auth token is obtained and refreshed internally for authenticated Relay actions.
161+
162+
Example: create Relay withdraw request
163+
164+
- `network`: `dymension`
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)
169+
170+
Example: initiate Relay deposit (on-chain transfer)
171+
172+
- `network`: `dymension`
173+
- `amount`: for example `1`
174+
- `unit`: `ether`
175+
- `key_name`: `main` (optional)
176+
175177
Signer key source for transfer:
176178

177179
- Named key in system keychain set by `crynux-mcp key add` or `crynux-mcp key create` (preferred)
@@ -185,6 +187,11 @@ You can start the MCP server process directly for debugging:
185187
python -m crynux_mcp
186188
```
187189

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

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

198205
Update this file to change RPC URLs, chain IDs, or contract addresses.
199206

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+
200213
## Tests
201214

202215
```bash

0 commit comments

Comments
 (0)