Enables containerized deployment of the Neo N3 MCP server, supporting isolated and consistent execution environments across different platforms.
Hosts the source code repository for the Neo N3 MCP server, enabling version control and collaboration on the codebase.
Supports comprehensive testing of the Neo N3 MCP server functionality, ensuring reliability of blockchain interactions.
Neo N3 Model Context Protocol (MCP) v1.4.0
The Neo N3 Model Context Protocol (MCP) provides a standardized interface for AI agents and applications to interact with the Neo N3 blockchain. This server implementation aims for simplicity and ease of use, running directly via npx
without requiring manual environment configuration for standard usage.
Adding the MCP to a Client (e.g., VS Code)
Configure your client to use the standard I/O server via npx
:
Option A: VS Code User Settings (JSON)
Add the following to your User Settings JSON (Ctrl+Shift+P
> Preferences: Open User Settings (JSON)
):
Option B: Workspace Configuration (.vscode/mcp.json
)
Create a file named mcp.json
inside the .vscode
directory:
Option C: Other Clients (e.g., Cursor)
Follow your client's instructions for adding an MCP server using a command. Provide the command npx
and the arguments ["-y", "@r3e/neo-n3-mcp"]
.
Available Tools
For detailed parameters and examples, please refer to the API.md documentation.
Configuration & Network
Tool | Description | Key Parameters |
---|---|---|
get_network_mode | Get the currently configured network mode | None |
set_network_mode | Set the active network mode for subsequent calls | mode : "mainnet_only", "testnet_only", or "both" |
Blockchain Information
Tool | Description | Key Parameters |
---|---|---|
get_blockchain_info | Get current height and general network info | network |
get_block_count | Get the current block height | network |
get_block | Get block details by hash or height | network , hashOrHeight |
get_transaction | Get transaction details by transaction ID | network , txid |
check_transaction_status | Check if a transaction is confirmed | network , txid |
Wallet & Account Management
Tool | Description | Key Parameters |
---|---|---|
create_wallet | Create a new encrypted wallet file | password |
import_wallet | Import existing wallet from WIF/private key | key , password |
get_balance | Get token balances for an address | network , address |
Asset Transfers
Tool | Description | Key Parameters |
---|---|---|
transfer_assets | Send NEO, GAS, or other NEP-17 tokens | network , fromWIF , toAddress , asset , amount , confirm |
estimate_transfer_fees | Estimate network and system fees for a transfer | network , fromAddress , toAddress , asset , amount |
Smart Contract Interaction
Tool | Description | Key Parameters |
---|---|---|
list_famous_contracts | List well-known contracts supported by the server | network |
get_contract_info | Get details (hash, methods) of a famous contract | network , contractName |
invoke_contract (replaces invoke_read/write) | Invoke a smart contract method (read or write) | network , scriptHash , operation , args , fromWIF (for write), confirm (for write) |
NeoFS (Decentralized Storage)
Tool | Description | Key Parameters |
---|---|---|
neofs_create_container | Create a NeoFS storage container | network , fromWIF , ownerId , rules , confirm |
neofs_get_containers | List containers owned by an ID | network , ownerId |
NeoBurger (Staking Service)
Tool | Description | Key Parameters |
---|---|---|
neoburger_deposit | Deposit NEO to receive bNEO | network , fromWIF , confirm |
neoburger_withdraw | Withdraw NEO by returning bNEO | network , fromWIF , amount , confirm |
Example Requests
Get Blockchain Information
Request:
Response:
Transfer Assets
Request:
Response:
Error Handling
The MCP server returns standardized error responses:
Common error codes:
INVALID_PARAMETER
: Missing or invalid parameterNETWORK_ERROR
: Error connecting to Neo N3 nodeBLOCKCHAIN_ERROR
: Error from the Neo N3 blockchainWALLET_ERROR
: Error with wallet operationsCONTRACT_ERROR
: Error with smart contract operationsUNAUTHORIZED
: Operation not permittedINTERNAL_ERROR
: Unexpected server error
Security Best Practices
- WIF Handling: Be extremely cautious when providing Wallet Import Format (WIF) keys. Ensure the environment where the MCP server runs and the communication channel are secure. Consider running the server locally or within a trusted network. Avoid exposing the server publicly without robust authentication and transport security (HTTPS).
- Store wallet files securely if using file-based approaches (though the current API seems WIF-based).
- Use
confirm: true
for all state-changing operations (transfers, contract invocations) to ensure the transaction is processed by the network. - Store wallet files securely with strong passwords
- Use testnet for development and testing
- Keep your Neo N3 MCP server updated to the latest version
HTTP Server
In addition to the MCP server, this package also provides an HTTP server that exposes the Neo N3 functionality through a RESTful API. The HTTP server is started automatically when you run the MCP server and listens on port 3002 by default.
HTTP Endpoints
Endpoint | Method | Description |
---|---|---|
/api/blockchain/info | GET | Get blockchain information |
/api/blockchain/height | GET | Get the current block height |
/api/blocks/:height | GET | Get block details by height |
/api/transactions/:txid | GET | Get transaction details by transaction ID |
/api/accounts/:address/balance | GET | Get token balances for an address |
/api/wallets | POST | Create a new wallet |
/api/wallets/:address | GET | Get wallet information |
/api/wallets/import | POST | Import a wallet from WIF or private key |
/api/network/mode | GET | Get the current network mode |
/api/contracts/:name/invoke | POST | Invoke a smart contract method |
/api/contracts/deploy | POST | Deploy a new smart contract |
Example HTTP Requests
Benefits of the HTTP Server
- Accessibility: Provides access to Neo N3 blockchain functionality for applications that don't support the MCP protocol
- Simplicity: Simple RESTful API that can be used with any HTTP client
- Compatibility: Works with existing web applications and frameworks
- Testing: Easier to test and debug than the MCP protocol
Testing
This package includes integration tests to verify the functionality of both the MCP server and the HTTP server.
Running Tests
Resources
License
This project is licensed under the MIT License - see the LICENSE file for details.
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
An MCP server that provides seamless integration with the Neo N3 blockchain, allowing Claude to interact with blockchain data, manage wallets, transfer assets, and invoke smart contracts.
Related MCP Servers
- -securityAlicense-qualityAn MCP server that allows accessing and managing ledger files through Claude by providing account listing, balance checking, and transaction register viewing capabilities.Last updated -1PythonGPL 3.0
- AsecurityFlicenseAqualityAn MCP server that connects Claude to BrianKnows' blockchain knowledge base, allowing users to search for blockchain/DeFi information and interact with a specialized agent across multiple knowledge bases.Last updated -3JavaScript
- -securityFlicense-qualityAn MCP server that connects Claude for Desktop with blockchain functionality, allowing users to check balances and send tokens on EVM and Solana chains through natural language interactions.Last updated -TypeScript
- -securityAlicense-qualityA meta-server that allows Claude to install other MCP servers from npm or PyPi, enabling easy expansion of Claude's capabilities with external tools.Last updated -4,3211MIT License