Skip to main content

Crynux MCP tools for blockchain operations

Project description

Crynux MCP Server

PyPI - Version

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.

Features

Wallet

  • Wallet management with system keychain (create keys, sign transactions, list/delete/export keys, set default key)

Blockchain

  • 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

  • Relay account balance query
  • Relay withdraw create/list/latest-status query
  • Relay deposit initiate/list/latest-status query

Tools

For the full action list and detailed input/output fields, see docs/tools.md.

Security notes

  • The server never intentionally logs raw private keys.
  • transfer_native reads signer key from your local system keychain.
  • Optional fallback: if no keychain entry exists, it reads CRYNUX_PRIVATE_KEY from 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 wallet, blockchain, and Relay actions are available. Use docs/tools.md as the source of truth for the full action catalog.

Step 7) First tool calls

Example: query balance

  • network: dymension
  • address: your EVM address
  • unit: ether

Example: send native CNX

  • network: dymension
  • key_name: main (optional, uses default local key if omitted)
  • to: recipient EVM address
  • amount: for example 0.1
  • unit: ether

Example: query Relay account balance

  • network: dymension
  • address: your wallet EVM address
  • key_name: main (optional)

Relay auth token is obtained and refreshed internally for authenticated Relay actions.

Example: create Relay withdraw request

  • network: dymension
  • address: your wallet EVM address
  • amount_wei: for example 1000000000000000000 (1 CNX)
  • benefit_address: optional destination address
  • key_name: main (optional)

Example: initiate Relay deposit (on-chain transfer)

  • network: dymension
  • amount: for example 1
  • unit: ether
  • key_name: main (optional)

Signer key source for transfer:

  • Named key in system keychain set by crynux-mcp key add or crynux-mcp key create (preferred)
  • CRYNUX_PRIVATE_KEY env var fallback

Step 8) Optional local manual run

You can start the MCP server process directly for debugging:

python -m crynux_mcp

Spec and transport

  • MCP protocol target: 2025-11-25
  • Runtime transport: stdio (local process, no HTTP server required)

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.

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.

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

crynux_mcp-0.2.4.tar.gz (29.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crynux_mcp-0.2.4-py3-none-any.whl (28.1 kB view details)

Uploaded Python 3

File details

Details for the file crynux_mcp-0.2.4.tar.gz.

File metadata

  • Download URL: crynux_mcp-0.2.4.tar.gz
  • Upload date:
  • Size: 29.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for crynux_mcp-0.2.4.tar.gz
Algorithm Hash digest
SHA256 d00bc4dee3a08b32926c936d222156951ba90ddc6b65472aff1808fdafb4445a
MD5 1142db1c106cd70a346a9d7506ff7752
BLAKE2b-256 f1b7e1b676bc86925851ea2cf7eefdf4341e58708b63e160c16cad5451b98eb5

See more details on using hashes here.

File details

Details for the file crynux_mcp-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: crynux_mcp-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 28.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for crynux_mcp-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 085cf15de946ee50ee90f624af8b183f88d4c17b48c988ae10dfd733180893b0
MD5 ceae8d241bc36e8b96bc23255de088d4
BLAKE2b-256 f86ba4b50f6293cd550b1e8ddf5e7436b59f0a98ae74c299541c99f6b2586823

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page