Nimiq MCP Server
About
An MCP server for read-only interaction with the Nimiq blockchain.
Details
- Author
- onmax
- Categories
- Database, Other, Finance
Jump to
Setup
Install Nimiq MCP Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/onmax/nimiq-mcp
Follow the installation instructions in the repository README, then restart your MCP client.
A Model Context Protocol (MCP) server for interacting with theNimiq blockchain.
- πTwo deployment options: Zero-setup remote access OR local installation
- π18 comprehensive toolsfor accounts, transactions, blocks, validators, and more
- π€MCP 2025-06-18 Protocol: Latest specification with enhanced features
- π¬Interactive Tools: Elicitation support for guided user experiences
- β‘Remote option: No installation required - just add the URL to your MCP client
- π§Local option: Full control withnpx nimiq-mcp
- πAdvanced search: Full-text search through comprehensive Nimiq documentation
- πEnhanced calculations: Interactive staking rewards calculator with smart defaults
- πRead-only operations(sending transactions not supported for security)
- β
Input validation: Comprehensive schema validation for all tool inputs
Add this to your MCP client configuration:
{ "mcpServers": { "nimiq": { "url": "https://nimiq-mcp.je-cf9.workers.dev/sse", "transport": "sse" } } }
Add this to your MCP client configuration:
{ "mcpServers": { "nimiq": { "command": "npx", "args": ["nimiq-mcp"] } } }
{ "mcpServers": { "nimiq": { "url": "https://nimiq-mcp.je-cf9.workers.dev/sse?rpc-url=https://your-rpc-endpoint.com&rpc-username=your-username&rpc-password=your-password", "transport": "sse" } } }
{ "mcpServers": { "nimiq": { "command": "npx", "args": [ "nimiq-mcp", "--rpc-url", "https://your-rpc-endpoint.com", "--rpc-username", "your-username", "--rpc-password", "your-password" ] } } }
The MCP server provides comprehensive tools and resources for interacting with the Nimiq blockchain:
- Block tools:includeBody(boolean) to include transaction details
- Address tools:address(string) for Nimiq addresses
- Transaction tools:hash(string) for transaction hashes,max(number) for limits
- Documentation tools:includeSchemas(boolean) forgetRpcMethodsto include detailed parameter/result schemas
- Search tools:query(string) for search terms,limit(number) to control result count
Resources are accessed via their URI and don't require parameters:
- Documentation resources: Access vianimiq://docs/web-client,nimiq://docs/protocol, ornimiq://docs/validators
- Content is returned as plain text for optimal LLM consumption
- MCP clients can cache resource content for improved performance
{ "total": 210000000000000, "vested": 0, "burned": 0, "max": 210000000000000, "initial": 25200000000000, "staking": 100000000000, "minted": 1000000000, "circulating": 25200000000000, "mined": 0, "updatedAt": "2025-01-20T12:00:00.000Z" }
{ "blockNumber": 21076071, "block": { "hash": "90e2ba0a831eec477bca1a26ba8c5e2b3162b5d042667828c4db0f735247d41e", "number": 21076071, "timestamp": 1749486768481, "parentHash": "b4fae3fc846ac13bfc62aa502c8683e25e92616d987f3f642b9cb57da73b6392", "type": "micro", "producer": { "slotNumber": 305, "validator": "NQ51 LM8E Q8LS 53TX GGDG 26M4 VX4Y XRE2 8JDT" } }, "timestamp": "2025-06-09T16:32:49.055Z", "network": "mainnet" }
{ "query": "validator staking", "totalResults": 3, "results": [ { "title": "Validator Setup", "content": "To become a validator in Nimiq, you need to stake NIM tokens...", "section": "Validators", "score": 0.95, "snippet": "...validator in Nimiq, you need to stake NIM tokens and run validator software..." }, { "title": "Staking Rewards", "content": "Validators earn rewards for producing blocks and validating transactions...", "section": "Economics", "score": 0.87, "snippet": "...earn rewards for producing blocks and validating transactions. Staking rewards..." } ], "searchedAt": "2025-01-20T12:00:00.000Z" }
Add to yourclaude_desktop_config.json:
{ "mcpServers": { "nimiq": { "url": "https://nimiq-mcp.je-cf9.workers.dev/sse", "transport": "sse" } } }
Add to yourclaude_desktop_config.json:
{ "mcpServers": { "nimiq": { "command": "npx", "args": ["nimiq-mcp"] } } }
{ "mcpServers": { "nimiq": { "command": "npx", "args": [ "nimiq-mcp", "--rpc-url", "https://rpc.nimiqwatch.com" ] } } }
Access the remote server directly via HTTP:
// Connect to the remote MCP server const mcpClient = new SSEClientTransport( new URL('https://nimiq-mcp.je-cf9.workers.dev/sse') )
The server follows the MCP specification and can be used with any MCP-compatible client:
- Tools Endpoint:https://nimiq-mcp.je-cf9.workers.dev/tools
- Info Endpoint:https://nimiq-mcp.je-cf9.workers.dev/info
- Health Check:https://nimiq-mcp.je-cf9.workers.dev/health
- Web Interface:https://nimiq-mcp.je-cf9.workers.dev/
# Install dependencies pnpm install # Run linting pnpm run lint # Fix linting issues pnpm run lint:fix # Build for production pnpm run build # Test the server manually echo '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | node dist/index.js
# Install dependencies including Wrangler pnpm install # Start local development server pnpm run dev:worker # Build and test worker deployment pnpm run build:worker # Deploy to Cloudflare pnpm run deploy
See the completeDeployment Guidefor detailed instructions.
- Set up Cloudflare account and get API token
- Configure GitHub secrets(for automatic deployment):
- CLOUDFLARE_API_TOKEN
- CLOUDFLARE_ACCOUNT_ID
wrangler secret put NIMIQ_RPC_URL wrangler secret put NIMIQ_RPC_USERNAME wrangler secret put NIMIQ_RPC_PASSWORD
The worker will be available at:https://nimiq-mcp.je-cf9.workers.dev
- @modelcontextprotocol/sdk: Official MCP SDK for TypeScript
- nimiq-rpc-client-ts: Fully typed Nimiq RPC client
- rpc.nimiqwatch.com: Free public Nimiq RPC service
- Valibot: Runtime schema validation and type safety for all tool inputs
- Cloudflare Workers: Edge compute platform for remote deployment
- TypeScript: For type safety and better development experience
This server implements the latest Model Context Protocol specification (2025-06-18) with enhanced features:
- Elicitation Support: Interactive tools can request additional information from users during execution
- Enhanced Input Validation: Comprehensive schema validation with detailed error messages
- Structured Tool Responses: JSON Schema definitions for better LLM comprehension
- Improved Error Handling: Standardized error responses with proper MCP error codes
- Protocol Version Compliance: Full support for the latest MCP specification requirements
- Runs as a local process communicating via stdin/stdout
- Best for desktop applications and local development
- Zero network configuration required
- Inherently secure (no network exposure)
- Deployed on Cloudflare Workers edge network
- Accessible from anywhere via HTTPS
- Supports multiple concurrent clients
- Built-in security, rate limiting, and global CDN
- Automatic scaling and high availability
The server usesValibotfor comprehensive input validation on all tools, providing:
- Runtime Type Safety: All tool inputs are validated against strict schemas
- Descriptive Error Messages: Clear validation errors with field-level details
- Type Inference: Automatic TypeScript type inference from Valibot schemas
- Default Values: Automatic application of default values for optional parameters
- Enum Validation: Strict validation of allowed values for parameters like network types
const StakingRewardsSchema = v.object({ amount: v.optional(v.pipe(v.number(), v.description('Initial amount staked in NIM')), 1), days: v.optional(v.pipe(v.number(), v.description('Number of days staked')), 365), network: v.optional(v.pipe(v.picklist(['main-albatross', 'test-albatross']), v.description('Network name')), 'main-albatross'), })
The server includes comprehensive error handling:
- RPC connection errors
- Rate limit handling
- Invalid parameters
- Network timeouts
- Graceful shutdown on SIGINT
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting
- Submit a pull request
MIT License - see LICENSE file for details.
Interact with the Aptos blockchain, supporting both testnet and mainnet for AI applications.
AudioAlpha turns 100+ daily finance and crypto podcasts into structured intelligence β Ξ±-sentiment scores, narrative signals, asset mentions, transcripts, and market snapshots with 40+ custom metrics. Built for AI-driven research and trading workflows.
Access BrianKnows' extensive blockchain knowledge base.
An MCP server for interacting with cryptocurrency daemon RPC interfaces.
Access data and information from IQ.wiki, the world's largest crypto and blockchain encyclopedia.
Interact with the MantraChain (Cosmos SDK) blockchain.
Access Mina blockchain data, including events, actions, and network state, through the Mina Archive Node API.
Provides on-chain tools to interact with the Polygon PoS blockchain.
Query cryptocurrency and blockchain project data from the RootData API.
SelfLabbs Security Intel (x402 pay-per-call)
Pay-per-call MCP: autonomous agents pay in USDC on Base via x402 for keyless CVE and package-vulnerability lookups.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





