Monad MCP Server (@unsorted-ai/mcp)
April 22, 2025 · View on GitHub
A Model Context Protocol (MCP) server for interacting with the Monad blockchain via Alchemy's API.
It exposes tools (e.g. get_portfolio) that LLM‑powered agents (Cursor, Claude) can call directly.
Table of Contents
- Prerequisites
- Installation & Configuration
- Local Development
- Tools Provided
- Scripts
- Contributing
- License
Prerequisites
- Node.js v14+ (or Bun v1+)
- npm (or yarn / bun)
- Cursor
- (Optional) Claude for Desktop
Installation & Configuration
Global Configuration (Recommended)
-
Create or edit
~/.cursor/mcp.jsonin your home directory:{ "mcpServers": { "monad-tools": { "command": "npx", "args": ["-y", "@unsorted-ai/mcp@latest"], "env": { "ALCHEMY_API_KEY": "YOUR_ALCHEMY_API_KEY", }, }, }, } -
Restart or reload your Cursor workspace.
-
In chat, ask something like:
Get the portfolio for wallet addresses
0xABC...and0xDEF...Cursor will automatically invoke the
get_portfoliotool.
Project-Level Configuration
-
Add this package to your project:
npm install --save @unsorted-ai/mcp # or bun add @unsorted-ai/mcp -
In your project root, create (or open)
.cursor/mcp.json:{ "mcpServers": { "monad-tools": { "command": "node", "args": ["./node_modules/@unsorted-ai/mcp/dist/main.js"], "env": { "ALCHEMY_API_KEY": "YOUR_ALCHEMY_API_KEY", }, }, }, } -
Restart or reload your Cursor workspace.
-
In chat, ask something like:
Get the portfolio for wallet addresses
0xABC...and0xDEF...Cursor will automatically invoke the
get_portfoliotool.
For more on Cursor's MCP setup, see "Configuring MCP Servers" in the Cursor docs.
Claude for Desktop
-
Open Settings → Developer → Edit Config in Claude for Desktop.
-
In
claude_desktop_config.json, add:{ "mcpServers": { "monad-tools": { "command": "npx", "args": ["-y", "@unsorted-ai/mcp@latest"], "env": { "ALCHEMY_API_KEY": "YOUR_ALCHEMY_API_KEY", }, }, }, } -
Restart Claude. Click the 🔨 icon to see and run your tools.
For a step‑by‑step Claude guide, see the MCP quickstart for Claude Desktop users.
Local Development
Prerequisites
- Bun v1+
- (Optional) npm for some scripts
Environment Variables
Copy and configure your Alchemy key:
cp .env.example .env
Edit .env:
ALCHEMY_API_KEY=your-alchemy-api-key-here
MCP Configuration (.cursor/mcp.json)
For local testing:
{
"mcpServers": {
"monad-tools": {
"command": "bun",
"args": ["dist/main.js"],
},
},
}
Building & Running
Install dependencies:
bun install
Build the project:
bun run build
Start the development server:
bun start
Development Scripts
| Command | Description |
|---|---|
bun run build | Compile src/main.ts → dist/main.js |
bun start | Run the development server |
bun test | Run tests |
bun run lint | Lint source via Biome |
bun run format | Format source via Biome |
bun run check | Run Biome checks |
bun run clean | Remove build artifacts |
Tools Provided
-
get_portfolio
-
Description: Fetch on‑chain token balances for up to 2 wallet addresses. Modifies alchemy portfolio response to suit LLM use.
-
Input schema:
{ "walletAddresses": ["0x123...", "0x456..."] }
-
Scripts
| Command | Description |
|---|---|
bun run build | Compile src/main.ts → dist/main.js |
bun start | Run the built server |
bun test | Run tests |
bun run lint | Lint source via Biome |
npm run format | Format source via Biome |
Contributing
- Fork this repo
git checkout -b feature/foo- Make changes &
git commit -m "Add foo" git push origin feature/foo- Open a pull request
License
MIT © Unsorted AI