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.
Before using the MCP server, you'll need a Moralis API key:
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.
For a quick installation with Claude Desktop:
npx -y @smithery/cli install @MoralisWeb3/moralis-mcp-server --client claude
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>"
}
}
}
}
The server supports different transport types:
Standard input/output (default):
moralis-api-mcp --transport stdio
HTTP server:
moralis-api-mcp --transport web
HTTP server with streaming:
moralis-api-mcp --transport streamable-http
Make sure you've set the required environment variables before starting the server.
Here are some examples of what you can ask through the MCP server:
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:
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.
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.
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}"
}
}
}
}
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.
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.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json2. 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