Listed from the MCP registry; nobody on Odel publishes it.

MCP server: One MCP server.

Kritisi Solidity Audit

@zororaka00MCP server · External

MCP server for Solidity security audits, NatSpec documentation, and import merging.

v1.1.0MITTypeScript
Freeno charge per call

Runs on your machine from its package; the steps are below.

What it does

  1. Reads
  2. Writes
  3. High impact

Not assessed yet.

What it costs

Free

Odel charges nothing per call. The publisher may charge for its own service.

Runs locally over stdio

This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).

npmmcp-kritisiv1.1.0

Run

npx -y mcp-kritisi

MCP client config

{
  "mcpServers": {
    "kritisi-solidity-audit": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-kritisi"
      ]
    }
  }
}
README10 min read

mcp-kritisi

A Model Context Protocol stdio server that exposes the kritisi Solidity security toolkit to MCP-compatible clients. It audits local Solidity files and folders, fetches verified contracts from Etherscan, produces designed PDF or Markdown reports, adds NatSpec documentation, merges imports, and inspects provider configuration. Everything runs locally over stdio; no hosted backend is required.

mcp-kritisi is a thin wrapper around the published kritisi package. Provider access, report parsing, PDF/Markdown generation, and file-safety rules all come from that library; this project only adds the MCP transport, source acquisition, and tool schemas.

Features

  • security_audit returns high/medium/low findings for a Solidity file and can write a PDF or Markdown report.
  • audit_project scans a folder of Solidity files, resolves entrypoints and imports, and audits the project.
  • audit_contract fetches a verified contract from Etherscan V2 by chain ID and address, resolves proxies, and audits it.
  • natspec_document generates NatSpec comments and never writes files unless asked.
  • merge_imports flattens a Solidity file and its imports with sol-merger.
  • show_config reports effective provider settings with API keys redacted.
  • Supports OpenRouter (default), OpenAI, Claude/Anthropic, and DeepSeek.
  • Works over stdio with any MCP client, including Claude Desktop, Cursor, and Qoder.
  • Refuses non-.sol inputs and protects existing files unless overwrite is set.
  • API keys are read from environment variables or the user's kritisi config, never from tool arguments.

Requirements

  • Node.js 18 or newer.
  • The published kritisi package (^2.5.0), installed from npm during npm install.
  • An API key for the provider you intend to use.
  • An ETHERSCAN_API_KEY when using audit_contract. The key stays in the client environment; it is never passed as a tool argument.

Install

From npm

Install the server globally:

bash
npm install --global mcp-kritisi
mcp-kritisi --help

Or run it on demand without a global install:

bash
npx -y mcp-kritisi --help

From source

bash
git clone https://github.com/zororaka00/mcp-kritisi.git
cd mcp-kritisi
npm ci
npm run build
node dist/index.js --version

The build output is written to dist/. The package depends on kritisi from npm.

Client configuration

Add the server to your MCP client configuration. The example below uses npx so no global install is required:

json
{
  "mcpServers": {
    "kritisi": {
      "command": "npx",
      "args": ["-y", "mcp-kritisi"],
      "env": {
        "OPENROUTER_API_KEY": "<your-api-key>",
        "ETHERSCAN_API_KEY": "<your-etherscan-key>"
      }
    }
  }
}

Optional provider settings can be added to env, for example OPENROUTER_MODEL, OPENAI_API_KEY, or ANTHROPIC_API_KEY.

If the package is installed globally, use "command": "mcp-kritisi" with no arguments. When running from a source checkout, use "command": "node" and the absolute path to dist/index.js in args.

Programmatic usage

The package root also exposes a side-effect-free library entrypoint for embedding the tools in another MCP server:

js
const { McpServer } = require('@modelcontextprotocol/sdk/server/mcp.js');
const { registerKritisiTools, version } = require('mcp-kritisi');

const server = new McpServer({ name: 'my-server', version });
registerKritisiTools(server);

registerKritisiTools adds all available tools to an existing server; version is the installed package version. Importing the package does not start a server or open stdio.

Configuration

Environment variables take precedence over the user-local kritisi config at ~/.config/kritisi/config.json (or $XDG_CONFIG_HOME/kritisi/config.json). Set KRITISI_CONFIG_PATH to use a different file.

VariablePurposeDefault
OPENROUTER_API_KEYOpenRouter API keynone
OPENROUTER_MODELOpenRouter modelopenai/gpt-5.6-sol
OPENROUTER_BASE_URLOpenRouter endpoint overridehttps://openrouter.ai/api/v1/chat/completions
OPENAI_API_KEYOpenAI API keynone
OPENAI_MODELOpenAI modelgpt-5.6-sol
ANTHROPIC_API_KEY / CLAUDE_API_KEYClaude API keynone
ANTHROPIC_MODEL / CLAUDE_MODELClaude modelclaude-opus-5
DEEPSEEK_API_KEYDeepSeek API keynone
DEEPSEEK_MODELDeepSeek modeldeepseek-v4-pro
KRITISI_TIMEOUT_MSPer-request timeout in milliseconds120000
KRITISI_RETRIESRetries for network errors and HTTP 429/5xx2
KRITISI_RETRY_DELAY_MSBase backoff delay; doubles per retry500
ANTHROPIC_MAX_TOKENS / CLAUDE_MAX_TOKENSClaude output token cap8192
ETHERSCAN_API_KEYEtherscan V2 API key used by audit_contractnone
ETHERSCAN_BASE_URLEtherscan API endpoint override (testing or compatible proxies)https://api.etherscan.io/v2/api
ETHERSCAN_TIMEOUT_MSEtherscan request timeout20000
KRITISI_ALLOWED_ROOTSOptional path-delimited allowlist for project foldersunset
KRITISI_MAX_PROJECT_FILESMaximum Solidity files scanned per project200
KRITISI_MAX_PROJECT_BYTESMaximum total Solidity source bytes per project5000000
KRITISI_MAX_FILE_BYTESMaximum size of a single Solidity file1000000
KRITISI_MAX_SOURCE_CHARSMaximum merged source sent to the model400000

Provider-specific *_BASE_URL variables are also supported. show_config displays the effective configuration and reports keys only as set or unset.

Tools

All tools return JSON text content. Failures are returned as MCP tool errors (isError: true); the server stays running.

Audit tools write a report only when reportPath (or legacy outputPdf) is set. The file extension selects the format: .pdf produces the designed PDF report, .md/.markdown produces a Markdown report. Responses include reportFile (format, path, or null); pdf is retained for compatibility and is set only for PDF output.

ToolPurposeWrites files
security_auditAudit a Solidity file with optional PDF/Markdown reportOnly when reportPath or outputPdf is set
audit_projectAudit a folder of Solidity filesOnly when reportPath or outputPdf is set
audit_contractAudit a verified Etherscan contract by chain ID and addressOnly when reportPath or outputPdf is set
natspec_documentAdd NatSpec documentationOnly with write: true or output
merge_importsMerge imports into one fileOnly when output is set
show_configInspect effective provider configurationNever

security_audit

InputTypeDefaultMeaning
pathstringrequiredPath to a .sol file
providerenumopenrouteropenrouter, openai, claude, anthropic, or deepseek
outputPdfstringnoneLegacy PDF output path; prefer reportPath
reportPathstringnoneReport path; .pdf, .md, or .markdown selects the format
overwritebooleanfalseReplace an existing report
includeReportbooleantrueInclude the full findings JSON in the response

Response: provider, model, usage, summary (high/medium/low counts), reportFile (format, path, or null), pdf (PDF path or null), and report unless includeReport is false.

json
{
  "path": "contracts/Vault.sol",
  "reportPath": "reports/Vault.md"
}

Relative paths are resolved against the MCP server process working directory; prefer absolute paths in client configuration for predictable results.

audit_project

Scans a local directory recursively for .sol files, ignores dependency/build directories (node_modules, lib, out, cache, tests, scripts), computes contracts and entrypoints, and audits the project. If one entrypoint is found it is flattened with imports; otherwise a bundle of project files is audited. Set entry to select a specific entry file.

InputTypeDefaultMeaning
pathstringrequiredDirectory containing Solidity files
providerenumopenrouterAI provider
entrystringautoEntry .sol path relative to the folder
outputPdfstringnoneLegacy PDF output path; prefer reportPath
reportPathstringnoneReport path; .pdf, .md, or .markdown selects the format
overwritebooleanfalseReplace an existing report
includeReportbooleanfalseInclude the full findings JSON in the response (off by default to keep context small)

Response: project inventory (root, files, totalBytes, contractCount, truncated contracts, entrypointCount, truncated entrypoints, truncated warnings, auditMode, entry, sourceCharacters, auditWarning), provider/model/usage, summary, reportFile, and report when includeReport is true.

audit_contract

Fetches verified source from Etherscan API V2 using ETHERSCAN_API_KEY, resolves a proxy to its implementation when reported, and audits the source. Unverified contracts are rejected with an explanatory error. The API key is never a tool argument.

InputTypeDefaultMeaning
chainIdnumberrequiredEVM chain ID, for example 1 or 42161
addressstringrequiredVerified contract address
providerenumopenrouterAI provider
outputPdfstringnoneLegacy PDF output path; prefer reportPath
reportPathstringnoneReport path; .pdf, .md, or .markdown selects the format
overwritebooleanfalseReplace an existing report
includeReportbooleanfalseInclude the full findings JSON in the response (off by default to keep context small)

Response: target metadata (chainId, address, contractName, compiler settings, proxy, implementation, file count, warnings), provider/model/usage, summary, reportFile, and report when includeReport is true.

Etherscan supports many EVM chains through chainId; source and ABI endpoints are available on its Free tier, though some chains require a paid Etherscan plan. Chains not covered by Etherscan are not supported by this tool yet.

natspec_document

InputTypeDefaultMeaning
pathstringrequiredPath to a .sol file
providerenumopenrouterAI provider
writebooleanfalseUpdate the source in place and keep a .sol.bak backup
outputstringnoneWrite the documented source to this path (implies writing)
overwritebooleanfalseReplace an existing output file

By default the documented source is returned and no file is touched. Markdown code fences are stripped, and responses that do not look like Solidity are rejected without modifying files.

merge_imports

InputTypeDefaultMeaning
pathstringrequiredPath to a .sol file
outputstringnoneWrite the merged source to this path
overwritebooleanfalseReplace an existing output file

Response: source, written (path or null), and merged (source text).

show_config

Returns configPath, whether the config file exists, the installed kritisi libraryVersion and libraryPath, Etherscan key status/base URL, and the effective provider configuration with keys redacted.

Safety

  • Inputs must end in .sol; other paths are rejected before any provider request.
  • audit_project refuses folders outside KRITISI_ALLOWED_ROOTS when that variable is set, skips symlinks, and enforces file/size limits.
  • audit_contract requires a verified Etherscan source; unverified contracts and unverified proxy implementations are rejected instead of guessed.
  • Files are written only when a tool argument requests it. Existing outputs require overwrite: true.
  • In-place NatSpec updates always create a <file>.sol.bak backup first.
  • PDF and Markdown reports include target/provider/model metadata and an AI-assistance disclaimer; PDFs add the designed cover, risk badge, finding blocks, code panels, and page numbers.
  • API keys are never accepted as tool parameters. They are redacted from provider and Etherscan errors and reported only as set/unset.

Development

bash
npm ci
npm run lint
npm run format:check
npm test
npm audit
npm pack --dry-run

npm test builds the server and runs MCP protocol tests with the official SDK client, a local mock provider, and a mock Etherscan API. The suite is network-free and covers tool discovery, configuration redaction, file guards, folder scanning and root restrictions, Etherscan plain/standard-JSON/proxy handling, unverified contracts, PDF/Markdown reports, and error handling.

A live provider smoke test is not part of the automated suite. Run one only with credentials supplied intentionally through the environment.

Publishing

prepublishOnly runs lint and tests. Before publishing:

bash
npm run lint
npm test
npm pack --dry-run
npm publish --access public

Review the package contents with npm pack --dry-run and never commit API keys or local configuration files.

Publishing to the MCP Registry

This repository is prepared for the official MCP Registry under the name io.github.zororaka00/mcp-kritisi. The registry entry is described by server.json, and the mcpName field in package.json must match the name in that file.

Publish the npm package first, then use the official mcp-publisher CLI installed from its releases or Homebrew (do not install it from npm):

bash
mcp-publisher validate
mcp-publisher login github
mcp-publisher publish

The registry is currently in preview, so metadata or API behavior may change. See the official publishing quickstart for platform-specific installation commands and current requirements. Keep package.json, server.json, and the npm version aligned when releasing updates.

Limitations

  • Audit output is AI-assisted and not a substitute for a professional security review. Verify findings independently.
  • audit_contract and audit_project are source-level reviews. They do not execute transactions, simulate buy/sell behavior, or verify current token tax, liquidity locks, blacklists, or honeypot status on-chain.
  • audit_contract only supports chains covered by Etherscan V2 and contracts whose source (or proxy implementation source) is verified.
  • audit_project ignores common dependency/build directories; projects that rely on Foundry remappings may fall back to a bundled source audit when flattening fails.
  • Contract source is sent to the configured third-party provider.
  • Model output is untrusted; instructions embedded in audited code can attempt prompt injection.
  • Very large contracts or projects may exceed the configured source limit or the model context window. Split them or raise the documented limits deliberately.

License

MIT; see LICENSE.