Installation, configuration, tool reference, rate limits, and error codes for blockhertz-mcp v0.1.3.
Audits a smart contract for security vulnerabilities. Supports Solidity, Rust, Move, and Vyper.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Smart contract source code |
language | string | Yes | One of: solidity, rust, move, vyper (case-insensitive) |
Example Response
{
"success": true,
"riskScore": 74,
"severity": "high",
"findings": [
{
"title": "Reentrancy in withdraw()",
"severity": "critical",
"description": "...",
"recommendation": "Apply CEI pattern"
}
],
"language": "Solidity",
"contractName": "Lock",
"summary": "...",
"timestamp": "2026-12-01T12:00:00.000Z"
}Analyzes a Solidity contract for gas inefficiencies and returns an optimized version.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Solidity contract source code |
Example Response
{
"success": true,
"findings": [ { "category": "Storage Packing", "savings": "~2100 gas", ... } ],
"summaryStats": { "totalFindings": 5, "estimatedSavings": "~12,400 gas" },
"optimizedCode": "// SPDX-License-Identifier: MIT ...",
"originalCode": "...",
"timestamp": "2026-12-01T12:00:00.000Z"
}Environment variables read by blockhertz-mcp at startup.
| Variable | Required | Description |
|---|---|---|
BLOCKHERTZ_API_KEY | Yes | Your Blockhertz API key. Get one free at blockhertz.com/tools/dashboard. |
BLOCKHERTZ_BASE_URL | No | Override the API endpoint. Defaults to https://blockhertz.com. Useful for staging. |
MCP calls are rate-limited independently from web tool usage. Limits reset daily at midnight UTC.
| Tier | Daily Limit |
|---|---|
| Anonymous (no key) | 1 call / day |
| Free (signed-in) | 3 calls / day |
| Starter / Pro (credits) | Unlimited |
| Unlimited subscriber | Unlimited |
429 Response Shape
{
"error": "Free limit reached",
"message": "You have used your free MCP calls for today. Upgrade to Pro for unlimited access.",
"upgrade_url": "https://blockhertz.com/tools/pricing",
"reset_at": "2026-12-02T00:00:00.000Z"
}| Code | Error | Response Body |
|---|---|---|
401 | Invalid API key | { "message": "Invalid API key", "upgrade_url": "https://blockhertz.com/tools/pricing" } |
402 | No credits remaining | { "message": "No credits remaining", "upgrade_url": "https://blockhertz.com/tools/pricing" } |
429 | Rate limit exceeded | { "error": "Free limit reached", "message": "...", "upgrade_url": "...", "reset_at": "<ISO>" } |
500 | Analysis failed | { "error": "audit_failed", "detail": "..." } |
v0.1.32026-11-26Initial public release. Two tools: audit_contract, optimize_gas.
FAQ
Log in at blockhertz.com/tools/dashboard and go to API Keys. Free accounts get a key with 3 uses/day.
{ "error": "Free limit reached", "message": "You have used your free MCP calls for today. Upgrade to Pro for unlimited access.", "upgrade_url": "https://blockhertz.com/tools/pricing", "reset_at": "<ISO timestamp>" }
Not currently — blockhertz-mcp connects to the Blockhertz hosted API. Self-hosting support is on the roadmap.
Open an issue at github.com/Blockhertz/blockhertz-mcp.