Deploy and Interact with Rootstock using the MCP Server
Rootstock MCP Server is a Model Context Protocol (MCP) server that provides tools for interacting with the Rootstock blockchain. AI clients connect through it to run blockchain operations.
In this tutorial, you will learn how to connect AI clients to Rootstock to automate builds and deploy dApps.
What you'll achieve
Complete these outcomes by the end of this guide:
- Install and configure the Rootstock MCP Server for mainnet or testnet
- Connect Cursor or Claude to Rootstock blockchain tools
- Query balances, deploy contracts, and run on-chain operations from an AI client
Not sure what MCPs are or how they work? Read the guide to MCPs on Rootstock.
Who is it for?
- For non-developers: You can interact with Rootstock from an AI client without writing code.
- For developers: Integrate Rootstock into Cursor or Claude to speed up your workflow and simplify on-chain tasks.
Prerequisites
- Node.js v18 or higher.
npmoryarn- TypeScript (included in dev dependencies)
> See how to install Node and NPM.
Supported Networks
The Rootstock MCP Server is supported on Mainnet and Testnet.
- Mainnet
- Testnet
- RPC URL:
https://public-node.rsk.co - Chain ID: 30
- Explorer: https://explorer.rootstock.io
- RPC URL:
https://public-node.testnet.rsk.co - Chain ID: 31
- Explorer: https://explorer.testnet.rsk.co
Project Structure
- ▾📂src
- ▾📂handlers
- responsesHandler.ts
- ▾📂tools
- ▾📂constants.ts
- handlers.ts
- schemas.ts
- types.ts
- ▾📂constants.ts
- ▾📂utils
- responses.ts
- index.ts
- server-config.ts
- types.d.ts
- ▾📂handlers
- 📂build
- package.json
- tsconfig.json
- README.md
Installation and Build
Clone the Repository
git clone https://github.com/rsksmart/rsk-mcp-server
cd rsk-mcp-server
> See the NPM Package
Install Dependencies
npm install
Build the Project
npm run build
This command:
- Compiles TypeScript to JavaScript in the
build/folder - Makes the main file executable (
build/index.js)
Verify Installation
node build/index.js
You should see the following response:
# node build/index.js
DevX MCP Server running on stdio
Important Note: For local running this MCP, your client will point to the
index.jsfile created on thebuildfolder after building it.
Configuring the MCP Server
There are two ways to configure the MCP Server:
- Local Configuration using AI clients such as Claude or Cursor
- Remote Configuration using publicly available endpoint
Note: You will use this Model Context Protocol Server from a LLM Client (e.g Cursor, Claude, Warp, etc) which needs to be compatible with the MCP standard.
For detailed set up instructions, please refer to the MCP Server README AI Client configuration guide.
For remote configurations with AI clients like cursor and claude, connect using the NPM Package.