An MCP server for read-only interaction with the Nimiq blockchain.
npx nimiq-mcp
Choose one of two options:
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"]
}
}
}
Feature | Remote Access | Local Installation |
---|---|---|
Setup | Zero installation required | Requires Node.js/npm |
Updates | Automatic | Manual (npx pulls latest) |
Privacy | Requests go through our servers | Direct connection to RPC |
Availability | Depends on our service uptime | Depends on local environment |
Protocol Support | SSE transport only | Full MCP protocol support |
{
"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"
]
}
}
}
CLI Arguments | URL Arguments | Description | Default |
---|---|---|---|
--rpc-url <url> | rpc-url=<url> | Nimiq RPC endpoint URL | https://rpc.nimiqwatch.com |
--rpc-username <username> | rpc-username=<username> | RPC username for authentication | None |
--rpc-password <password> | rpc-password=<password> | RPC password for authentication | None |
--help, -h | N/A | Show help message | N/A |
The MCP server provides comprehensive tools and resources for interacting with the Nimiq blockchain:
Category | Tool | Description |
---|---|---|
Blockchain Data Tools | getHead | Get the current head block of the Nimiq blockchain |
getBlockByNumber | Retrieve a specific block by its number | |
getBlockByHash | Retrieve a specific block by its hash | |
getEpochNumber | Get the current epoch number | |
Blockchain Calculation Tools | getSupply | Get the current circulating supply of NIM |
calculateSupplyAt | Calculate the Nimiq PoS supply at a given time | |
calculateStakingRewards | Calculates the potential wealth accumulation based on staking | |
getPrice | Get the price of NIM against other currencies | |
Account & Balance Tools | getAccount | Get detailed account information by address |
getBalance | Get the balance of a specific account address | |
Transaction Tools | getTransaction | Get detailed transaction information by hash |
getTransactionsByAddress | Get transaction history for a specific address | |
Validator Tools | getValidators | Get information about all active validators |
getValidator | Get detailed information about a specific validator | |
getSlots | Get validator slot information for current or specific block | |
Network Tools | getNetworkInfo | Get network status including peer count and consensus state |
Documentation Tools | getRpcMethods | Get all available RPC methods from the latest OpenRPC document |
searchDocs | Search through the Nimiq documentation using full-text search |
Category | Resource | Description |
---|---|---|
Documentation Resources | nimiq://docs/web-client | Complete web-client documentation for LLMs |
nimiq://docs/protocol | Complete Nimiq protocol and learning documentation for LLMs | |
nimiq://docs/validators | Complete validator and staking documentation for LLMs |
Each tool accepts specific parameters:
includeBody
(boolean) to include transaction detailsaddress
(string) for Nimiq addresseshash
(string) for transaction hashes, max
(number) for limitsincludeSchemas
(boolean) for getRpcMethods
to include detailed parameter/result schemasquery
(string) for search terms, limit
(number) to control result countResources are accessed via their URI and don't require parameters:
nimiq://docs/web-client
, nimiq://docs/protocol
, or nimiq://docs/validators
{
"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"
}
Option 1: Remote (Zero Setup)
Add to your claude_desktop_config.json
:
{
"mcpServers": {
"nimiq": {
"url": "https://nimiq-mcp.je-cf9.workers.dev/sse",
"transport": "sse"
}
}
}
Option 2: Local Installation
Add to your claude_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:
Local installation:
npx nimiq-mcp
Remote access:
https://nimiq-mcp.je-cf9.workers.dev/tools
https://nimiq-mcp.je-cf9.workers.dev/info
https://nimiq-mcp.je-cf9.workers.dev/health
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 complete Deployment Guide for detailed instructions.
Quick deployment steps:
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
The MCP server is built using:
Local Deployment (STDIO Transport)
Remote Deployment (SSE Transport)
The server uses Valibot for comprehensive input validation on all tools, providing:
Example validation:
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:
MIT License - see LICENSE file for details.
An MCP server that provides tools to interact with Powerdrill datasets, enabling smart AI data analysis and insights.
Integrates AI assistants with the Metabase business intelligence and analytics platform.
MySQL database integration with configurable access controls and schema inspection
Interact with the STRING protein-protein interaction database API.
Enables secure interaction with MySQL databases, allowing AI assistants to list tables, read data, and execute SQL queries through a controlled interface.
Manage MongoDB Atlas projects, including cluster creation, user management, and network access configuration.
Provides read-only access to Apache Iceberg tables via Apache Impala, allowing LLMs to inspect schemas and execute queries.
An MCP server for PostgreSQL providing index tuning, explain plans, health checks, and safe SQL execution.
A read-only MCP server by CData that enables LLMs to query live data from Dynamics 365. Requires the CData JDBC Driver for Dynamics 365.
MCP server for dbt-core (OSS) users as the official dbt MCP only supports dbt Cloud. Supports project metadata, model and column-level lineage and dbt documentation.