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.
- Wallet management with system keychain (create keys, sign transactions, list/delete/export keys, set default key)
- Native CNX balance query on Crynux L2 networks
- Latest block height query on Crynux L2 networks
- Native CNX transfer
- Beneficial address query and on-chain update
- Node staking query
- Node credits query
- Relay account balance query
- Relay withdraw create/list/latest-status query
- Relay deposit initiate/list/latest-status query
For the full action list and detailed input/output fields, see docs/tools.md.
- The server never intentionally logs raw private keys.
transfer_nativereads signer key from your local system keychain.- Optional fallback: if no keychain entry exists, it reads
CRYNUX_PRIVATE_KEYfrom MCP server environment. - The model only sees transfer fields (
network,to,amount, and optional gas fields), not raw key material. - Use dedicated low-risk wallets for AI operations, not treasury wallets.
- Install Python 3.11 or newer.
- Open a terminal.
Install from PyPI (recommended):
python -m pip install crynux-mcpIf you are developing this repository, install from source in editable mode:
python -m pip install -e ".[dev]"You only need one client config (Cursor, VS Code, or Claude Desktop).
Create or edit .cursor/mcp.json in your project:
{
"mcpServers": {
"crynux-mcp": {
"command": "python",
"args": ["-m", "crynux_mcp"]
}
}
}Create or edit .vscode/mcp.json in your project (or your user mcp.json):
{
"servers": {
"crynuxMcp": {
"type": "stdio",
"command": "python",
"args": ["-m", "crynux_mcp"]
}
}
}Edit claude_desktop_config.json:
{
"mcpServers": {
"crynux-mcp": {
"command": "python",
"args": ["-m", "crynux_mcp"]
}
}
}Run these commands in your terminal:
crynux-mcp key add --name main
crynux-mcp key create --name trading-bot
crynux-mcp key list
crynux-mcp key set-default --name main
crynux-mcp key delete --name trading-botkey add prompts for your private key with hidden input and stores it in your OS keychain.
key create generates a new private key and stores it directly in your OS keychain.
- Windows: Credential Manager
- macOS: Keychain
- Linux: Secret Service compatible keyring
Optional advanced fallback (if you do not want keychain): set CRYNUX_PRIVATE_KEY in MCP server env.
After saving MCP config, fully restart the client so it reloads servers.
In your AI client, check MCP tool list and confirm wallet, blockchain, and Relay actions are available.
Use docs/tools.md as the source of truth for the full action catalog.
Example: query balance
network:dymensionaddress: your EVM addressunit:ether
Example: send native CNX
network:dymensionkey_name:main(optional, uses default local key if omitted)to: recipient EVM addressamount: for example0.1unit:ether
Example: query Relay account balance
network:dymensionaddress: your wallet EVM addresskey_name:main(optional)
Relay auth token is obtained and refreshed internally for authenticated Relay actions.
Example: create Relay withdraw request
network:dymensionaddress: your wallet EVM addressamount_wei: for example1000000000000000000(1 CNX)benefit_address: optional destination addresskey_name:main(optional)
Example: initiate Relay deposit (on-chain transfer)
network:dymensionamount: for example1unit:etherkey_name:main(optional)
Signer key source for transfer:
- Named key in system keychain set by
crynux-mcp key addorcrynux-mcp key create(preferred) CRYNUX_PRIVATE_KEYenv var fallback
You can start the MCP server process directly for debugging:
python -m crynux_mcp- MCP protocol target:
2025-11-25 - Runtime transport:
stdio(local process, no HTTP server required)
Maintainer release instructions are in RELEASE.md.
Chain metadata is stored in:
src/crynux_mcp/config/chains.json
Update this file to change RPC URLs, chain IDs, or contract addresses.
Relay API configuration is stored in:
src/crynux_mcp/config/relay.json
Update this file to change Relay URL, timeout, and per-network deposit addresses.
pytest