# Blockhertz MCP

> Blockhertz MCP is a freemium MCP server for crypto security. MCP server bringing smart contract security audits and gas tips into your editor. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Freemium
- **Platforms:** VS Code, CLI, API
- **Repository:** https://github.com/blockhertz/blockhertz-mcp
- **MCP Registry name:** io.github.muhammadasif84/blockhertz-mcp
- **Categories:** [crypto security](https://ai-powered.com/categories/crypto-security), [smart contract security](https://ai-powered.com/categories/smart-contract-security)
- **Listing updated:** 2026-11-27

## About

Blockhertz MCP connects an AI code editor to Blockhertz's smart contract analysis service. Once installed through npm and given an API key, an assistant such as Copilot or Claude can request a security audit of a contract or a gas optimization pass directly from the chat panel, without leaving the file being edited.

The server exposes two tools. The audit tool covers Solidity, Rust, Vyper and Move code, while the gas tool currently targets Solidity. Each call draws one credit from the owner's Blockhertz plan, so usage is metered per request.

It suits smart contract developers who want an early security and cost review while writing code, and teams that already work in VS Code, Cursor, Windsurf or Claude Desktop. The server is released under the MIT licence.

## Features

- **Smart contract security audit:** Runs a security review over contract code written in Solidity, Rust, Vyper or Move.
- **Solidity gas optimization:** Suggests ways to reduce gas usage in Solidity contracts.
- **Editor integration via MCP:** Works as a stdio MCP server inside VS Code Copilot, Claude Desktop, Cursor and Windsurf.
- **Simple API key setup:** Authenticates with a single Blockhertz API key set as an environment variable.
- **Open-source MIT server:** The MCP server code is published under the MIT licence on GitHub.

## Good for

- Auditing a Solidity contract for security issues before deployment
- Reducing gas costs in Solidity functions during development
- Reviewing Rust, Vyper or Move code for vulnerabilities from within the editor
- Getting contract feedback without switching to a separate web tool

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add blockhertz-mcp --env BLOCKHERTZ_API_KEY='<BLOCKHERTZ_API_KEY>' -- npx -y blockhertz-mcp
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "blockhertz-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "blockhertz-mcp"
      ],
      "env": {
        "BLOCKHERTZ_API_KEY": "<BLOCKHERTZ_API_KEY>"
      }
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "blockhertz-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "blockhertz-mcp"
      ],
      "env": {
        "BLOCKHERTZ_API_KEY": "<BLOCKHERTZ_API_KEY>"
      }
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "blockhertz-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "blockhertz-mcp"
      ],
      "env": {
        "BLOCKHERTZ_API_KEY": "<BLOCKHERTZ_API_KEY>"
      }
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "blockhertz-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "blockhertz-mcp"
      ],
      "env": {
        "BLOCKHERTZ_API_KEY": "<BLOCKHERTZ_API_KEY>"
      }
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add blockhertz-mcp --env BLOCKHERTZ_API_KEY='<BLOCKHERTZ_API_KEY>' -- npx -y blockhertz-mcp
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.blockhertz-mcp]
command = "npx"
args = ["-y", "blockhertz-mcp"]
env = { BLOCKHERTZ_API_KEY = "<BLOCKHERTZ_API_KEY>" }
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "blockhertz-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "blockhertz-mcp"
      ],
      "env": {
        "BLOCKHERTZ_API_KEY": "<BLOCKHERTZ_API_KEY>"
      }
    }
  }
}
```

Or run: gemini mcp add -s user -e BLOCKHERTZ_API_KEY='<BLOCKHERTZ_API_KEY>' blockhertz-mcp npx -- -y blockhertz-mcp

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "blockhertz-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "blockhertz-mcp"
      ],
      "env": {
        "BLOCKHERTZ_API_KEY": "<BLOCKHERTZ_API_KEY>"
      }
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "blockhertz-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "blockhertz-mcp"
      ],
      "env": {
        "BLOCKHERTZ_API_KEY": "<BLOCKHERTZ_API_KEY>"
      }
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "blockhertz-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "blockhertz-mcp"
      ],
      "env": {
        "BLOCKHERTZ_API_KEY": "<BLOCKHERTZ_API_KEY>"
      }
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "blockhertz-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "blockhertz-mcp"
      ],
      "env": {
        "BLOCKHERTZ_API_KEY": "<BLOCKHERTZ_API_KEY>"
      }
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "blockhertz-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "blockhertz-mcp"
      ],
      "env": {
        "BLOCKHERTZ_API_KEY": "<BLOCKHERTZ_API_KEY>"
      }
    }
  }
}
```

The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "blockhertz-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "blockhertz-mcp"
      ],
      "env": {
        "BLOCKHERTZ_API_KEY": "<BLOCKHERTZ_API_KEY>"
      }
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "blockhertz-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "blockhertz-mcp"
      ],
      "env": {
        "BLOCKHERTZ_API_KEY": "<BLOCKHERTZ_API_KEY>"
      }
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "blockhertz-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "blockhertz-mcp"
      ],
      "env": {
        "BLOCKHERTZ_API_KEY": "<BLOCKHERTZ_API_KEY>"
      }
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 2 names don't say. From the server's own tool labels and tool names; not verified by us.

- `audit`: Security audit for Solidity, Rust, Vyper and Move code.
- `gas`: Gas optimization for Solidity code.

## FAQ

### Which languages does the audit tool support?

The audit tool covers Solidity, Rust, Vyper and Move.

### Which languages does the gas tool support?

The gas optimization tool supports Solidity.

### How is usage billed?

Each tool call uses one credit from the user's Blockhertz plan.

### How do I get an API key?

Keys are issued from the Blockhertz dashboard at blockhertz.com/dashboard.

### Is Blockhertz MCP free?

Blockhertz MCP has a free plan, with paid plans for more usage or features.

### How do I add Blockhertz MCP to Claude Code?

Run this command in your terminal: claude mcp add blockhertz-mcp --env BLOCKHERTZ_API_KEY='<BLOCKHERTZ_API_KEY>' -- npx -y blockhertz-mcp

### What are the best alternatives to Blockhertz MCP?

The closest alternatives to Blockhertz MCP are Pentagonal MCP, Smartguard MCP, Onchain Risk MCP, Bridgeguard MCP and Solidity Smart Contract Escrow Auditor.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Pentagonal MCP](https://ai-powered.com/mcp/pentagonal-mcp): Pentagonal MCP is a freemium MCP server for developer tools.
- [Smartguard MCP](https://ai-powered.com/mcp/smartguard-mcp): Smartguard MCP is an open-source MCP server for smart contract security.
- [Onchain Risk MCP](https://ai-powered.com/mcp/onchain-risk-mcp): Onchain Risk MCP is an MCP server for smart contract security.
- [Bridgeguard MCP](https://ai-powered.com/mcp/bridgeguard-mcp): Bridgeguard MCP is an open-source MCP server for crypto and web3.
- [Solidity Smart Contract Escrow Auditor](https://ai-powered.com/mcp/solidity-smart-contract-escrow-auditor): Solidity Smart Contract Escrow Auditor is a freemium MCP server for legal and government.
- [Contract Security Scanner](https://ai-powered.com/mcp/contract-security-scanner-2): Contract Security Scanner is an open-source MCP server for security.
- [Weakspot](https://ai-powered.com/mcp/weakspot): Weakspot is a paid MCP server for cloud and infrastructure.
- [Kritisi Solidity Audit](https://ai-powered.com/mcp/kritisi-solidity-audit): Kritisi Solidity Audit is an open-source MCP server for crypto security.

---
Source: https://ai-powered.com/mcp/blockhertz-mcp
