Website audits in opencode
Run a website audit in opencode by adding the squirrelscan hosted MCP server to opencode.json and installing the CLI, then ask it to audit.
To run a website audit in opencode, add the squirrelscan hosted MCP server to opencode.json and ask opencode to audit your site. For a step-by-step walkthrough, see the opencode guide.
opencode connects to squirrelscan over the hosted MCP server, so it can run audits, read findings as tools, and fix them in your repo.
1. Install the CLI
Local audits and the skills run through the squirrel binary.
curl -fsSL https://install.squirrelscan.com | bashiwr -useb https://install.squirrelscan.com/install.ps1 | iexLocal audits run entirely on your machine. Signed out, they need no account and cost nothing; signed-in audits spend credits. Verify with squirrel --version.
2. Add the MCP server
Add squirrelscan to your opencode.json (project root) or ~/.config/opencode/opencode.json (global). A remote server uses type: "remote":
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"squirrelscan": {
"type": "remote",
"url": "https://mcp.squirrelscan.com/mcp",
"enabled": true
}
}
}On first connect opencode discovers the authorization server and runs a browser login. Check status with opencode mcp list.
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"squirrelscan": {
"type": "remote",
"url": "https://mcp.squirrelscan.com/mcp",
"enabled": true,
"headers": {
"Authorization": "Bearer {env:SQUIRRELSCAN_API_KEY}"
}
}
}
}Export SQUIRRELSCAN_API_KEY in your shell or CI. A static header disables the OAuth fallback, which is what you want for headless runs.
3. Run an audit
Ask opencode in natural language, it will call the squirrelscan tools:
Use squirrelscan to audit nutshop.squirrelscan.com, then fix the high-severity issues.Scope large sites to keep runs fast:
Audit only /blog/* on nutshop.squirrelscan.com, cap it at 20 pages, and fix the broken links.Next steps
A full worked example of the audit-and-fix loop.
The full tool list, auth, and credits.
Config for every other MCP client.
Every audit rule and how it’s fixed.
The squirrelscan skills: what each one does and how to install it.