Crynux MCP tools for blockchain operations
Project description
crynux-mcp
Python MCP server for Crynux EVM L2 blockchain operations.
Scope
- Native CNX balance query on Crynux EVM networks
- Native CNX transfer signed by a private key from local system keychain
- Relay API integration is not implemented yet
Spec and transport
- MCP protocol target:
2025-11-25 - Runtime transport:
stdio(local process, no HTTP server required)
Tools
get_balance
Query the native CNX balance for an EVM address on a configured Crynux network.
transfer_native
Send native CNX from the local signer wallet to a recipient EVM address.
create_key
Create a new signer key in local system keychain with a provided name.
list_keys
List all local signer keys (name, address, and default flag).
delete_key
Delete a local signer key by name.
set_default_key
Set a local signer key as the default key.
export_key
Export a named local signer key to a specified file path.
For detailed tool inputs/outputs, see docs/tools.md.
Security notes
- 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.
Get Started
Step 1) Prerequisites
- Install Python 3.11 or newer.
- Open a terminal.
Step 2) Install the package
Install from PyPI (recommended):
python -m pip install crynux-mcp
If you are developing this repository, install from source in editable mode:
python -m pip install -e ".[dev]"
Step 3) Choose your AI client and add MCP config
You only need one client config (Cursor, VS Code, or Claude Desktop).
Cursor
Create or edit .cursor/mcp.json in your project:
{
"mcpServers": {
"crynux-mcp": {
"command": "python",
"args": ["-m", "crynux_mcp"]
}
}
}
VS Code
Create or edit .vscode/mcp.json in your project (or your user mcp.json):
{
"servers": {
"crynuxMcp": {
"type": "stdio",
"command": "python",
"args": ["-m", "crynux_mcp"]
}
}
}
Claude Desktop
Edit claude_desktop_config.json:
{
"mcpServers": {
"crynux-mcp": {
"command": "python",
"args": ["-m", "crynux_mcp"]
}
}
}
Step 4) Manage signer keys (cross-platform)
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-bot
key 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.
Step 5) Restart your AI client
After saving MCP config, fully restart the client so it reloads servers.
Step 6) Verify the server is loaded
In your AI client, check MCP tool list and confirm these tools appear:
get_balancetransfer_native
Step 7) First tool calls
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
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
Step 8) Optional local manual run
You can start the MCP server process directly for debugging:
python -m crynux_mcp
Release
Maintainer release instructions are in RELEASE.md.
Network configuration
Chain metadata is stored in:
src/crynux_mcp/config/chains.json
Update this file to change RPC URLs, chain IDs, or contract addresses.
Tests
pytest
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file crynux_mcp-0.1.0.tar.gz.
File metadata
- Download URL: crynux_mcp-0.1.0.tar.gz
- Upload date:
- Size: 18.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93575e4b818fbb6be33cf534759de758a6eeadfd092962895185f1ac68a9a60f
|
|
| MD5 |
ca30d9b28822cc7cdcd36c1b64cb78bd
|
|
| BLAKE2b-256 |
85f08bf2223e78b3d1a1629880590e5b78b5bc0282a87cabd4891191fa31ed8d
|
File details
Details for the file crynux_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: crynux_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c54952b99c1b2b54b68c579e36124fa1a47cccc61c177b2b89ee6aa8075c4af1
|
|
| MD5 |
5133028749c9b9fa8b583bde2a74c3e3
|
|
| BLAKE2b-256 |
f1039041a7ace2627cb1e1ef98ce41ccce3b765c5deb06fcfd7089db612eb4a3
|