Skip to main content

MCP Implementation in Hathor Forge

In addition to providing a local blockchain development environment, Hathor Forge also exposes a Model Context Protocol (MCP) server to connect to your AI model's instance.

This integration allows you to leverage AI in your development workflow, making it easier to ask questions about your code, jump start blueprint development, and even generate use cases based on your queries, allowing the AI to control the environment programmatically.

Claude Code

As an example, you could set it up with Claude Code by running the following command in your terminal:

# Terminal 1: start Hathor Forge
nix run github:HathorNetwork/hathor-forge -- --start

# Terminal 2: register the MCP server
claude mcp add --transport http hathor-forge http://127.0.0.1:9876/mcp
tip

Make sure to replace the URL with the correct one if your MCP server is running on a different address or port.

You can refer to the Settings section in Hathor Forge for more details on how to configure the MCP server and integrate it with your AI model.

Or you can simply add the following snippet to your project's .mcp.json:

{
"mcpServers": {
"hathor-forge": {
"type": "http",
"url": "http://127.0.0.1:9876/mcp"
}
}
}

Available Tools

CategoryTools
Nodestart_node, stop_node, get_node_status
Minerstart_miner, stop_miner, get_miner_status
Wallet Servicestart_wallet_service, stop_wallet_service, get_wallet_service_status
Walletsgenerate_seed, create_wallet, get_wallet_seed, get_wallet_status, get_wallet_balance, get_wallet_addresses, send_from_wallet, close_wallet
Faucetget_faucet_balance, send_from_faucet, fund_wallet
Blockchainget_blocks, get_transaction
Quick Actionsquick_start, quick_stop, get_full_status, reset_data

Example Use Case

You: "Start the blockchain and create a test wallet with 50 HTR"

Claude: [Uses quick_start, create_wallet, fund_wallet]
"Done! Node running at block 45, miner active.
Created wallet 'test' with 50 HTR."