mcp-kritisi
Uses OpenAI's models as an AI provider to analyze Solidity contracts for high/medium/low security findings and to generate NatSpec comments.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-kritisi audit contracts/MyToken.sol and generate a PDF report"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-kritisi
A Model Context Protocol stdio server that exposes the kritisi Solidity security toolkit to MCP-compatible clients. It provides security audits with designed PDF reports, NatSpec documentation, import merging, and provider configuration inspection.
mcp-kritisi is a thin wrapper around the published kritisi package. Provider access, report parsing, PDF generation, and file-safety rules all come from that library; this project only adds the MCP transport and tool schemas.
Features
security_auditreturns high/medium/low findings and can write a designed PDF report.natspec_documentgenerates NatSpec comments and never writes files unless asked.merge_importsflattens a Solidity file and its imports withsol-merger.show_configreports 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 and Qoder.
Refuses non-
.solinputs and protects existing files unlessoverwriteis set.API keys are read from environment variables or the user's kritisi config, never from tool arguments.
Related MCP server: Slither MCP Server
Requirements
Node.js 18 or newer.
An API key for the provider you intend to use.
Install
From npm
Install the server globally:
npm install --global mcp-kritisi
mcp-kritisi --helpOr run it on demand without a global install:
npx -y mcp-kritisi --helpFrom source
git clone https://github.com/zororaka00/mcp-kritisi.git
cd mcp-kritisi
npm ci
npm run build
node dist/index.js --versionThe 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:
{
"mcpServers": {
"kritisi": {
"command": "npx",
"args": ["-y", "mcp-kritisi"],
"env": {
"OPENROUTER_API_KEY": "<your-api-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:
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 the four 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.
Variable | Purpose | Default |
| OpenRouter API key | none |
| OpenRouter model |
|
| OpenRouter endpoint override |
|
| OpenAI API key | none |
| OpenAI model |
|
| Claude API key | none |
| Claude model |
|
| DeepSeek API key | none |
| DeepSeek model |
|
| Per-request timeout in milliseconds |
|
| Retries for network errors and HTTP 429/5xx |
|
| Base backoff delay; doubles per retry |
|
| Claude output token cap |
|
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.
Tool | Purpose | Writes files |
| Solidity security audit with optional PDF report | Only when |
| Add NatSpec documentation | Only with |
| Merge imports into one file | Only when |
| Inspect effective provider configuration | Never |
security_audit
Input | Type | Default | Meaning |
| string | required | Path to a |
| enum |
|
|
| string | none | Write a PDF report to this path |
| boolean |
| Replace an existing PDF |
| boolean |
| Include the full findings JSON in the response |
Response: provider, model, usage, summary (high/medium/low counts), pdf (path or null), and report unless includeReport is false.
{
"path": "contracts/Vault.sol",
"outputPdf": "reports/Vault.pdf"
}Relative paths are resolved against the MCP server process working directory; prefer absolute paths in client configuration for predictable results.
natspec_document
Input | Type | Default | Meaning |
| string | required | Path to a |
| enum |
| AI provider |
| boolean |
| Update the source in place and keep a |
| string | none | Write the documented source to this path (implies writing) |
| boolean |
| Replace 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
Input | Type | Default | Meaning |
| string | required | Path to a |
| string | none | Write the merged source to this path |
| boolean |
| Replace 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, and the effective provider configuration with keys redacted.
Safety
Inputs must end in
.sol; other paths are rejected before any provider request.Files are written only when a tool argument requests it. Existing outputs require
overwrite: true.In-place NatSpec updates always create a
<file>.sol.bakbackup first.PDF reports include a cover page, risk badge, executive summary, finding blocks, paginated code panels, page numbers, provider/model metadata, and an AI-assistance disclaimer.
API keys are never accepted as tool parameters. They are redacted from provider errors and reported only as
set/unset.
Development
npm ci
npm run lint
npm run format:check
npm test
npm audit
npm pack --dry-runnpm test builds the server and runs MCP protocol tests with the official SDK client and a local mock provider. The suite is network-free and covers tool discovery, configuration redaction, file guards, NatSpec backups, PDF creation, 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:
npm run lint
npm test
npm pack --dry-run
npm publish --access publicReview the package contents with npm pack --dry-run and never commit API keys or local configuration files.
Limitations
Audit output is AI-assisted and not a substitute for a professional security review. Verify findings independently.
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 may exceed the model context window. Split them before auditing.
License
MIT; see LICENSE.
Available Tools
4 toolsmerge_importsMerge Solidity importsA
Merge a Solidity file and its imports with kritisi (sol-merger). By default the merged source is returned without touching any file; set output to write it.
Inputs: path (required), output, overwrite.
natspec_documentAdd NatSpec documentationA
Generate NatSpec documentation for a Solidity file with kritisi. By default the documented source is returned without touching any file. Set write=true for an in-place update with a .sol.bak backup, or set output to write to a separate file.
Inputs: path (required), write, output, provider, +1 more.
security_auditSolidity security auditA
Audit a Solidity contract with kritisi and return high/medium/low findings. Optionally writes a PDF report. API keys are read from the environment or the kritisi user config, never from tool arguments.
Inputs: path (required), provider, outputPdf, overwrite, +1 more.
show_configShow kritisi configurationA
Show the effective kritisi provider configuration. API keys are reported as set or unset, never printed.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: showing configuration, security auditing, NatSpec documentation, and import merging. There is no meaningful overlap between tool behaviors or target outputs.
All names use consistent snake_case with two-word identifiers, making the set easy to scan. The verb/noun convention is mostly predictable, though security_audit and natspec_document are more noun-oriented than the action-first names.
Four tools is appropriately small for a focused Solidity utility wrapper. Each tool maps to a distinct workflow and none feels redundant or ornamental.
The surface covers configuration visibility, auditing, documentation generation, and import merging, which are the core operations implied by the server. Minor gaps exist around broader Solidity workflows, but the stated purpose is well served.
Maintenance
Related MCP Connectors
The OpenZeppelin Solidity Contracts MCP server integrates OpenZeppelin's security and style rules into AI-driven development workflows, enabling AI assistants to generate safe, correct, and production-ready smart contracts. It automatically validates generated code against OpenZeppelin standards (including imports, modifiers, naming conventions, and security checks) and supports various contract types including ERC-20, ERC-721, ERC-1155, Stablecoins, RWA, Governor, and Account contracts through prompt-driven workflows.
Free MCP contract auditing for AI agents and developers. Check tool schemas, detect potential breaking changes between versions, and get structured compatibility findings before deployment. Static analysis only.
EVM audit (Slither + source + security.txt + MCP-probe + wallet-exposure). 6 tools + /trace.
Audit your MCP servers for poisoned tools and leaked secrets, and check AI-generated code for flaws.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables smart contract security auditing using Slither, Aderyn, and custom pattern analysis through the Model Context Protocol, allowing AI assistants to run static analysis and vulnerability checks on Solidity and Vyper contracts.1Apache 2.0

Slither MCP Serverofficial
AlicenseAqualityDmaintenanceEnables static analysis of Solidity smart contracts using Slither, including contract metadata, function details, inheritance, and security detectors through MCP tools.2399AGPL 3.0- AlicenseBqualityBmaintenanceCommit-time audit engine for AI coding agents. Scans git diffs with 24 audit rules, writes HMAC-signed tamper-evident audit history, and ships MCP tools for governance aggregation.10456MIT
- FlicenseNot gradedqualityNot gradedmaintenanceEnables automated Solidity smart contract auditing by analyzing callgraphs and control flow to detect reentrancy vulnerabilities. Integrates with MCP-compatible clients to provide deterministic, zero-dependency security assessments.-