Get the FREE Ultimate OpenClaw Setup Guide →

monad 1

MCP server from AdekunleBamz/monad-mcp-server1

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio adekunlebamz-monad-mcp-server1 node path/to/server.js \
  --env PORT="3000" \
  --env MONAD_RPC="https://monad-testnet.g.alchemy.com/v2/your-alchemy-key"

How to use

This MCP server is a Node.js application that connects to the Monad testnet via an Alchemy RPC endpoint, listens for new blocks in real-time, and exposes a simple REST API to retrieve the latest block information. It logs block numbers and the count of transactions for each block as they arrive. You can query the server’s HTTP API to fetch the most recent block details, making it useful as a lightweight monitor and data source for downstream tooling or dashboards.

To use it, first configure the environment with your Monad RPC URL and the port you want the API to listen on. Start the server and then interact with the API endpoints, notably the /latestblock endpoint, to obtain the latest block number and its transaction count. The real-time listener uses the provider.on('block') mechanism to stay synchronized with the Monad testnet, so you’ll receive block updates as they’re produced on the network.

How to install

Prerequisites:

  • Node.js v18 or higher
  • npm
  • Git

Steps:

  1. Clone the repository git clone https://github.com/adekunlebamz/monad-mcp-server.git cd monad-mcp-server

  2. Install dependencies npm install

  3. Create a .env file in the project root with required configuration MONAD_RPC=https://monad-testnet.g.alchemy.com/v2/your-alchemy-key PORT=3000 Replace your-alchemy-key with your actual Alchemy API key.

  4. Start the server npm start

  5. Verify the API

Additional notes

Notes and tips:

  • Ensure MONAD_RPC is a valid Alchemy RPC URL for the Monad testnet.
  • The PORT value controls where the REST API will be served; you can change it in the .env file.
  • The /latestblock endpoint returns a JSON object with blockNumber and transactionCount for the most recently observed block.
  • Logs will show block numbers as they arrive and the number of transactions in each block.
  • If you encounter connection errors, verify network access to the Monad testnet RPC endpoint and that your API key is active.
  • For production use, consider adding rate limits, error handling improvements, and persistence for historical data.

Related MCP Servers

Sponsor this space

Reach thousands of developers