Skip to main content

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 messages/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
  • Arbitrary transaction signing and raw transaction broadcast
  • Beneficial address query and on-chain update
  • Node staking query
  • Node stake on the NodeStaking contract only (does not join Relay or start a node)
  • Node tryUnstake and forceUnstake
  • Delegated staking query, create/update, and unstake

Relay

  • Relay account balance query
  • Relay withdraw create/list/latest-status query
  • Relay deposit initiate/list/latest-status query
  • Staging and production Relay environments with env/network pairing

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, staking writes, sign_message, and sign_transaction read signer keys from your local system keychain.
  • sign_message and sign_transaction never return the private key. sign_transaction returns only the signed raw_transaction and metadata.
  • 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: crynux-on-base
  • address: your EVM address
  • unit: ether

Example: send native CNX

  • network: crynux-on-base
  • 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

  • relay_env: production (or staging)
  • 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: crynux-on-base
  • relay_env: production
  • address: your wallet EVM address
  • amount_wei: for example 1000000000000000000 (1 CNX)
  • key_name: main (optional)

Example: initiate Relay deposit (on-chain transfer)

  • network: crynux-on-base
  • relay_env: production
  • amount: for example 1
  • unit: ether
  • key_name: main (optional)

relay_env=staging MUST be paired with crynux-on-base-sepolia. relay_env=production MUST be paired with crynux-on-base.

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 environments, URLs, timeout, and per-environment deposit addresses.

Tests

pytest

Metadata

Release files for crynux-mcp 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for crynux-mcp 0.3.0
File Size Uploaded Provenance Actions
crynux_mcp-0.3.0.tar.gz 37.0 kB Without provenance Details for crynux_mcp-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for crynux-mcp 0.3.0
File Interpreter ABI Platform Actions
crynux_mcp-0.3.0-py3-none-any.whl Python 3 none any Details for crynux_mcp-0.3.0-py3-none-any.whl

Total release size: 70.8 kB

Release files / crynux_mcp-0.3.0.tar.gz

Download URL crynux_mcp-0.3.0.tar.gz
Size 37.0 kB
Tags Source
SHA-256 checksum
How to use checksums
618cd9617fbac5af50ce557f15cae48b1217fbaea5d8c1fb5430781a57185f69
BLAKE2b-256 checksum
How to use checksums
b821f4c75663e6a5a31b8fa69443d7cc44053755dc00451326f8691a03e59215
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / crynux_mcp-0.3.0-py3-none-any.whl

Download URL crynux_mcp-0.3.0-py3-none-any.whl
Size 33.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8244a2b8cb71be8d02d50cd5c75a9db63ddb6926eb2a71b827c16bd8196e70c5
BLAKE2b-256 checksum
How to use checksums
b8c82f677b12271d3120e8035ec762cddaa619f510b262d6037e1aa8b172a8d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Security for crynux-mcp 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page