How do I run a smart contract audit from Claude Code?
To run a smart contract audit from Claude Code, add the QuillShield MCP server with claude mcp add, pass it an API key that an owner or admin of your QuillShield organization created, and ask Claude to quote an audit of your Foundry repo. Claude shows you the fixed price and waits for your yes, then QuillShield runs the full audit and Claude reads the findings and the report back to you once it is complete.
What does QuillShield add to Claude Code?
Claude Code connects to outside tools through MCP servers. The QuillShield MCP server, the npm package @quillaudits/mcp, gives it the tools to quote, start and follow a QuillShield audit, which runs on QuillShield's side: it builds a security graph of your Solidity, a separate reviewer agent tries to disprove every finding before you see it, and full audits come with proofs of concept. The report downloads as Markdown or PDF.
It suits Foundry teams who already write and fix code in Claude Code and want an audit before a manual audit, or between audits, without leaving the session. Claude Code Review, Anthropic's pull request reviewer, is a different product, and our page on how QuillShield works next to Claude Code Review explains the split.
How do I add QuillShield to Claude Code?
- Sign up for QuillShield, then have an owner or admin of the organization create a key at Settings, API keys. The
qs_live_key is shown once, and Claude can't create it for you. - Check that Node.js 18 or later is installed, because the server runs through
npx. - In your project folder, run the
claude mcp addcommand below. Claude Code's MCP docs say--envneeds another option, such as--transport stdio, between it and the server name, and that everything after--is the command that starts the server. - Run
claude mcp list, or/mcpinside Claude Code, to check thatquillauditsis connected. - Ask Claude “Check my QuillAudits wallet”, then ask it to quote an audit of the Solidity in
src/and to wait for your confirm before anything is charged.
Add the QuillShield MCP server to Claude Code at local scope terminal
claude mcp add --env QUILLSHIELD_API_KEY=qs_live_... --transport stdio quillaudits \
-- npx -y @quillaudits/mcp
claude mcp list
Without --scope, Claude Code adds the server at local scope: it loads only in this project, stays private to you and is stored in ~/.claude.json, so the key stays out of the repository. --scope user makes it available in all your projects. To run the CLI's copy of the server, end the command with -- npx -y @quillaudits/cli mcp, which needs QuillShield CLI 0.2.3 or later.
How do I share the setup with my team without sharing the key?
Commit a .mcp.json file at the root of the repository. Claude Code loads it as a project-scoped server and expands ${QUILLSHIELD_API_KEY} in the env block from each person's environment, so the file holds no key. In interactive sessions, Claude Code asks each person to approve a project server from .mcp.json before it uses it.
.mcp.json at the repository root, with the key read from each person's environment .mcp.json
{
"mcpServers": {
"quillaudits": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@quillaudits/mcp"],
"env": {
"QUILLSHIELD_API_KEY": "${QUILLSHIELD_API_KEY}"
}
}
}
}
Each person then sets QUILLSHIELD_API_KEY in their own shell, with a key an owner or admin gave them. If the variable is missing, Claude Code warns about it when it loads the config. The QuillShield docs ask you to keep keys out of chat messages, prompts, commits and pull requests, and this file does that.
What happens when Claude runs the audit?
- Claude reads the wallet with
get_wallet, so you see your prepaid balance and any credit. - It sends the repository or folder with
submit_auditandpay: false, and shows you the fixed US dollar quote. A full audit starts at $49, and 1,000 lines of Solidity cost $379, as of November 2026. - When you say yes and the wallet covers the quote, it calls
pay_quotewithconfirm: trueand the audit starts. Without that confirm, nothing is spent. - If the wallet is short, Claude shows you the shortfall and the top-up link, and you top up by card in the dashboard. Claude never takes a card in the chat.
- It follows the audit with
watch_audit, then lists the findings withlist_findingsand fetches the report withget_reportonce the audit is complete.
For a ready-made prompt, use our guide How do I run a first QuillShield audit from Cursor or Claude?. Once the findings are in, you can work through the fixes in the same session.
What stays outside Claude Code?
- Creating the API key. QuillShield has no headless or device-code sign-in, so an owner or admin makes the key in Settings and Claude can't.
- Card payments and top-ups, which stay in the dashboard under Billing.
- Ask AI chat about findings and share links, which are dashboard features.
- Pull request checks. They need a GitHub or GitLab.com repository and are switched on in the dashboard, as our QuillShield GitHub App page shows. An uploaded zip gets a full audit and no checks.
- Code that is not Solidity in a Foundry project. QuillShield supports Solidity in Foundry projects today, and our Foundry page covers what to put in scope.
The MCP for Cursor and Claude page in the QuillShield docs lists every tool and error. Our QuillShield MCP server page covers the server and its 18 tools, and the same server works in Cursor. For audits started from scripts or CI, use the QuillShield CLI.
FAQ
Is this the same as the QuillShield Security Skills for Claude?
No. QuillShield Security Skills are free, open-source skills for AI agents such as Claude and Cursor, published by QuillAudits as QuillShield Security Skills on GitHub, that bring the QuillShield auditing method to an agent you run yourself. They are not the QuillShield product, which runs the full audit with proofs of concept and the pull request checks.
Can Claude pay for the audit with my card?
No. Through the MCP server Claude spends only from your organization wallet, and only after an explicit confirm step. Card payments and top-ups stay in the dashboard.
How much does an audit from Claude Code cost?
The same as in the dashboard: from $49, and 1,000 lines of Solidity cost $379, as of November 2026. You see the exact price before anything is charged. New accounts get $50 in credit, good for up to half of an order, and because Claude can't take a card, the rest comes from a top-up in the dashboard.
Does the same setup work in Claude Desktop?
Yes. The QuillShield docs give one config for Cursor and Claude Desktop, so you paste the same mcpServers block into Claude Desktop's MCP config.
Does a QuillShield audit replace a manual audit?
No. QuillShield reviews the code before and between audits, and you can request a manual audit from QuillAudits when the code is ready for one.
Sources
- Connect Claude Code to tools via MCP, Claude Code docs, Anthropic checked 3 December 2026
- MCP for Cursor and Claude, QuillShield docs, QuillAudits checked 3 December 2026
- API keys, QuillShield docs, QuillAudits checked 3 December 2026
- @quillaudits/mcp 0.1.0 on npm, npm checked 3 December 2026