The Moralis MCP Server connects natural language prompts to blockchain insights, enabling AI models to query blockchain data through a wrapper for the Moralis REST API.
Key capabilities:
- Wallet Analytics: Retrieve NFT ownership, transaction history, balances, net worth, DeFi positions, and active chains
- Example: "Show me the NFTs owned by
vitalik.eth
on Base"
- Example: "Show me the NFTs owned by
- Token Intelligence: Access token prices, holdings, metadata, historical data, and market metrics
- Example: "What's the current price of PEPE and Ethereum?"
- NFT Insights: Get collection metadata, transfers, floor prices, ownership distribution, and stats
- Example: "Analyze the current holder distribution of SPX6900"
- Blockchain Data: Query raw block details, transaction contents, pair-specific exchange data, and trending assets
- Infrastructure: Supports multiple AI models (OpenAI, Claude, open-source LLMs), custom prompts, and extendable functionality
Allows installation and execution of the Moralis MCP server via NPM, making it accessible through the command 'npx @moralisweb3/api-mcp-server'.
Provides a TypeScript-based implementation of a wrapper to the Moralis Web3 API, enabling access to blockchain data including NFT information, token balances, wallet transactions, and DeFi positions across various chains.
🧠 Overview
The Moralis MCP Server is a local or cloud-deployable engine that connects natural language prompts to real blockchain insights — allowing AI models to query wallet activity, token metrics, dapp usage, and more without custom code or SQL.
Built on top of the Model Context Protocol, this server makes it easy for LLMs to talk to Moralis APIs in a consistent, explainable, and extensible way.
- 🔗 Fully pluggable: swap LLMs, customize retrieval logic, or extend with your own tools
- 🧱 Works with OpenAI, Claude, and open-source models
- 🧠 Powers agents, devtools, bots, dashboards, and beyond
⚙️ Common Use Cases
- 🤖 AI agents & assistants: “What’s this wallet’s trading history?”
- 📈 Devtools: on-chain QA, testing, CLI integrations
- 📊 Dashboards: natural language to charts/data
- 📉 Monitoring: alerting & summarization for tokens/dapps
- 🧠 Trading bots: LLM-driven strategies with real blockchain grounding
🔐 Getting an API Key
To use this MCP server with Moralis APIs, you'll need an API key:
- Go to Moralis developer portal
- Sign up and log in
- Navigate to your API Keys page from the main menu
- Copy your key and configure it in your config file (see next section), or set it in your environment:
⚠️ Note: Some features and endpoints require a Moralis paid plan. For full access and production-grade performance, we recommend signing up for a paid tier.
🚀 Usage with a Client
To connect the MCP server to a compatible client (e.g. Claude Desktop, OpenAI-compatible agents, VS Code extensions, etc.), configure the client to launch the server as a subprocess.
Most clients support a simple config file - for example, you might create a file like mcp.json in the client’s configuration directory with the following:
This setup can be adapted for any client that supports MCP servers. Replace the example values with those specific to your use case.
Installing via Smithery
To install Moralis API Server for Claude Desktop automatically via Smithery:
🖥️ Using as a Server
The server accepts an optional --transport
argument to specify the transport type. The available transport types are:
stdio
: Communicates over standard input/output (default).web
: Starts a HTTP server for communication.streamable-http
: Starts an HTTP server with streamable endpoints.
Examples
- Using the default
stdio
transport:
- Using the
web
transport:
This will start a HTTP server. You can send requests to the server using tools like curl
or Postman.
- Using the
streamable-http
transport:
This will start an HTTP server. You can send requests to the server using tools like curl
or Postman.
Notes
- Ensure that the required environment variables (e.g.,
MORALIS_API_KEY
) are set before starting the server. - For custom configurations, you can pass additional arguments or environment variables as needed.
- Refer to the documentation for more details on each transport type.
🛠 Development
Install dependencies:
Build the server:
For development with auto-rebuild:
🐞 Debugging
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:
The Inspector will provide a URL to access debugging tools in your browser.
💬 Example Prompts
Here are some example prompts you can use with your AI agent through the MCP server:
These prompts are parsed and mapped to structured Moralis API calls using the MCP method registry.
💡 You can also build custom prompts based on any supported method.
📚 API Reference
The Moralis MCP Server wraps and translates prompts into Moralis REST API calls. You can explore the underlying API surface here:
This documentation covers endpoints for:
- Token pricing
- Wallet activity
- NFT metadata and ownership
- Transfers and transactions
- And more
You must be authenticated.
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Tools
A TypeScript wrapper for the Moralis REST API that enables interaction with blockchain data through the Model Context Protocol (MCP).
Related MCP Servers
- AsecurityAlicenseAqualityA TypeScript-based Model Context Protocol (MCP) server enabling integration with PiAPI for media content generation using platforms like Midjourney, Flux, and others through MCP-compatible applications.Last updated -122TypeScriptMIT License
- AsecurityFlicenseAqualityEnables interaction with Trello boards, lists, and cards through Model Context Protocol (MCP) tools, leveraging TypeScript for type safety and asynchronous operations.Last updated -5JavaScript
- -securityFlicense-qualityA Model Context Protocol (MCP) server that provides onchain tools for Claude AI, allowing it to interact with the Polygon PoS blockchain to call contract functions, manage ERC20 tokens, and check gas prices.Last updated -68TypeScript
- -securityAlicense-qualityA Model Context Protocol server that enables AI models to interact with the Solana blockchain, providing RPC methods, wallet management, DeFi trading capabilities, and Helius API integration for enhanced Solana development.Last updated -TypeScriptMIT License