Get the FREE Ultimate OpenClaw Setup Guide →

moralis

MCP server from MoralisWeb3/moralis-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio moralisweb3-moralis-mcp-server npx -y @MoralisWeb3/moralis-mcp-server \
  --env MORALIS_API_KEY="<YOUR_API_KEY>"

How to use

The Moralis MCP Server provides a TypeScript-based wrapper around Moralis REST APIs, enabling natural language prompts to retrieve blockchain insights such as wallet activity, token metrics, dapp usage, and more. It is designed to be pluggable and operable with various client environments (OpenAI, Claude-compatible agents, or other MCP-enabled clients) by exposing Moralis-powered endpoints through a consistent MCP interface. You can run the server locally or deploy it to the cloud and connect it to your preferred LLM-driven workflow or agent. The server supports multiple transport modes (stdio, web, and streamable-http) to suit different integration needs. You can also configure the Moralis API key via environment variables or a config file to authorize requests to Moralis endpoints.

To use it with a client, you typically run the Moralis MCP server as a subprocess or host it as a small HTTP service, then configure your client to point at the server and pass prompts. The MCP framework translates prompts into specific Moralis REST API calls under the hood, providing structured results that your agent can reason about and present to users.

How to install

Prerequisites:

  • Node.js and npm installed on your machine (Node 14+ recommended)
  • A Moralis API key (from Moralis developer portal)
  1. Install dependencies

    • Ensure you have npm installed and, optionally, use a Node version manager (e.g., nvm).

    bash npm install

  2. Obtain Moralis API key

    • Sign in to Moralis, navigate to API Keys, and copy your key. Export it as an environment variable or configure in a config file.
  3. Run the MCP server locally

    • Start the server using the MCP package via npx (as configured in mcp_config):

    bash

    Example using the recommended package name

    MORALIS_API_KEY=<your_api_key> npx -y @MoralisWeb3/moralis-mcp-server

  4. Build or watch (optional for development)

    • If you clone the repository and work locally, install and build:

    bash npm install npm run build npm run watch

  5. Verify transport mode

    • By default, the server may run with stdio transport; you can start it with --transport web to expose HTTP endpoints if supported by your setup.
  6. Integrate with a client

    • Create an mcp.json configuration in your client, referencing the Moralis MCP server entry (as shown in the examples in the README). Ensure MORALIS_API_KEY is accessible to the client or set in the environment where the server runs.

Additional notes

Tips and notes:

  • Make sure MORALIS_API_KEY is kept secret and not committed to source control.
  • Some Moralis endpoints require a paid plan for full access; verify your plan capabilities against your needs.
  • If debugging, use the MCP Inspector tooling recommended in the project to inspect requests/responses.
  • Transport selection affects how you send prompts and receive results; stdio is simplest for local prototyping, while web/streamable-http are better for remote clients.
  • The README indicates the recommended client command to start the MCP server is npx -y @MoralisWeb3/moralis-mcp-server; adapt the command if you deploy differently (e.g., in Docker or a cloud environment).
  • When deploying, consider setting additional environment variables or configuration for rate limiting, retries, and error handling depending on your deployment environment.

Related MCP Servers

Sponsor this space

Reach thousands of developers