Ethereum Address Monitor MCP server

Provides real-time Ethereum address monitoring across multiple blockchain networks using Server-Sent Events, enabling continuous tracking of on-chain activity without polling for DeFi dashboards, wallet applications, and analytics tools.
Back to servers
Setup instructions
Provider
Doron Aviguy
Release date
Mar 09, 2025
Language
TypeScript

This MCP Ethereum Address Info Server provides information about Ethereum addresses across multiple chains using the Model Context Protocol. It features a Server-Sent Events (SSE) endpoint for receiving real-time updates about Ethereum addresses.

Installation

Follow these steps to set up the MCP server:

  1. Clone the repository:

    git clone <repository-url>
    cd mcp-0x-address
    
  2. Install dependencies:

    npm install
    
  3. Create a .env file with the following configuration:

    MCP_PORT=3002
    

Starting the Server

To launch the HTTP MCP server:

npm run start:http

The server will start on port 3002 (or the port specified in your .env file).

Available Endpoints

The server provides several endpoints:

  • GET /health - Check server health status
  • POST /mcp - MCP endpoint for tool calls
  • GET /sse - Server-Sent Events endpoint for real-time updates
  • GET /sse/clients - Get information about connected SSE clients
  • POST /sse/subscribe/:clientId - Subscribe to address updates
  • POST /sse/unsubscribe/:clientId - Unsubscribe from address updates

Using SSE for Real-time Updates

Connecting to the SSE Endpoint

To establish a connection:

curl -N http://localhost:3002/sse

This will return a response containing a client ID:

data: {"type":"connection","clientId":"client-1234567890abcdef","message":"Connected to MCP SSE endpoint","timestamp":"2023-01-01T00:00:00.000Z"}

Subscribing to Address Updates

Use your client ID to subscribe to specific Ethereum addresses:

curl -X POST \
  http://localhost:3002/sse/subscribe/YOUR_CLIENT_ID \
  -H "Content-Type: application/json" \
  -d '{"addresses": ["0x742d35Cc6634C0532925a3b844Bc454e4438f44e", "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"]}'

Replace YOUR_CLIENT_ID with the client ID you received.

Unsubscribing from Address Updates

To stop receiving updates for specific addresses:

curl -X POST \
  http://localhost:3002/sse/unsubscribe/YOUR_CLIENT_ID \
  -H "Content-Type: application/json" \
  -d '{"addresses": ["0x742d35Cc6634C0532925a3b844Bc454e4438f44e"]}'

Checking Connected Clients

To see all connected SSE clients:

curl http://localhost:3002/sse/clients

Making Tool Calls

Get Address Information

To fetch information about an Ethereum address:

curl -X POST \
  http://localhost:3002/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "get-address-info",
      "arguments": {
        "address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
      }
    }
  }'

When you call this endpoint, all clients subscribed to the specified address will receive an update via SSE.

Test the Server with a Ping

To verify the server is responding correctly:

curl -X POST \
  http://localhost:3002/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "ping",
      "arguments": {}
    }
  }'

Check Server Health

curl http://localhost:3002/health

Complete Workflow Example

Here's how to test the full functionality:

  1. Start the server in one terminal:

    npm run start:http
    
  2. Connect to SSE in a second terminal:

    curl -N http://localhost:3002/sse
    

    Note the client ID from the response.

  3. Subscribe to an address in a third terminal:

    curl -X POST \
      http://localhost:3002/sse/subscribe/client-1234567890abcdef \
      -H "Content-Type: application/json" \
      -d '{"addresses": ["0x742d35Cc6634C0532925a3b844Bc454e4438f44e"]}'
    
  4. Request address information:

    curl -X POST \
      http://localhost:3002/mcp \
      -H "Content-Type: application/json" \
      -d '{
        "jsonrpc": "2.0",
        "id": 1,
        "method": "tools/call",
        "params": {
          "name": "get-address-info",
          "arguments": {
            "address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
          }
        }
      }'
    
  5. Watch for updates in your SSE terminal. You'll see real-time information about the Ethereum address you requested.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "mcp-0x-address" '{"command":"npx","args":["mcp-0x-address"],"env":{"MCP_PORT":"3002"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "mcp-0x-address": {
            "command": "npx",
            "args": [
                "mcp-0x-address"
            ],
            "env": {
                "MCP_PORT": "3002"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "mcp-0x-address": {
            "command": "npx",
            "args": [
                "mcp-0x-address"
            ],
            "env": {
                "MCP_PORT": "3002"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later