Moralis Web3 API MCP server

Integrates with Moralis Web3 API to enable blockchain data access, token analysis, and smart contract interactions without requiring deep Web3 development knowledge
Back to servers
Setup instructions
Provider
Moralis
Release date
May 13, 2025
Stats
13 stars

The Moralis MCP Server is a TypeScript-based implementation that connects natural language prompts to blockchain data through the Moralis API. It allows AI models to query blockchain information like wallet activity, token metrics, and dapp usage without requiring custom code or SQL knowledge.

Installation

Getting an API Key

Before using the MCP server, you'll need a Moralis API key:

  1. Visit the Moralis developer portal
  2. Sign up and log in
  3. Navigate to the API Keys page
  4. Copy your key for configuration

You can set your API key as an environment variable:

export MORALIS_API_KEY=<your_api_key>

Some features require a Moralis paid plan for full access and production-grade performance.

Installing via Smithery

For a quick installation with Claude Desktop:

npx -y @smithery/cli install @MoralisWeb3/moralis-mcp-server --client claude

Usage

Connecting to a Client

To connect the MCP server to a compatible client (Claude Desktop, OpenAI agents, VS Code extensions, etc.), configure the client to launch the server as a subprocess.

Create a configuration file like mcp.json in your client's configuration directory:

{
  "mcpServers": {
    "serverName": {
      "command": "npx @moralisweb3/api-mcp-server",
      "args": [],
      "env": {
        "MORALIS_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}

Running as a Server

The server supports different transport types:

  1. Standard input/output (default):

    moralis-api-mcp --transport stdio
    
  2. HTTP server:

    moralis-api-mcp --transport web
    
  3. HTTP server with streaming:

    moralis-api-mcp --transport streamable-http
    

Make sure you've set the required environment variables before starting the server.

Example Prompts

Here are some examples of what you can ask through the MCP server:

  • "What's the current price of PEPE and Ethereum?"
  • "What is the current trading sentiment for TOSHI on Base — bullish or bearish?"
  • "Show me the NFTs owned by vitalik.eth on Base."
  • "What tokens does wallet 0xab71...4321 hold?"
  • "When was wallet 0xabc...123 first and last seen active on Ethereum, Base, and Polygon?"
  • "Show me the complete transaction history for 0xabc...123 across Ethereum, Base, and BNB Chain."
  • "What is the current net worth in USD of wallet 0xabc...123?"

API Reference

The Moralis MCP Server wraps and translates natural language prompts into Moralis REST API calls. For details on all available endpoints, refer to the Moralis Swagger Docs (v2.2).

These endpoints cover:

  • Token pricing
  • Wallet activity
  • NFT metadata and ownership
  • Transfers and transactions
  • And much more

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 "serverName" '{"command":"npx","args":["@moralisweb3/api-mcp-server"],"env":{"MORALIS_API_KEY":"${MORALIS_API_KEY}"}}'

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": {
        "serverName": {
            "command": "npx",
            "args": [
                "@moralisweb3/api-mcp-server"
            ],
            "env": {
                "MORALIS_API_KEY": "${MORALIS_API_KEY}"
            }
        }
    }
}

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": {
        "serverName": {
            "command": "npx",
            "args": [
                "@moralisweb3/api-mcp-server"
            ],
            "env": {
                "MORALIS_API_KEY": "${MORALIS_API_KEY}"
            }
        }
    }
}

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