
Company News
AWS Security Hub Adds Socket for Supply Chain Security
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.
@codesherlock/codesherlock-mcp-server
Advanced tools
CodeSherlock MCP Server — AI-powered code analysis via Model Context Protocol
AI-powered code analysis inside your AI assistant.
CodeSherlock MCP Server connects to Claude Code, Cursor, Windsurf, VS Code, Cline, and other MCP-compatible tools — letting your AI assistant scan commits and working-tree changes for security, quality, and compliance issues without leaving your IDE.
npx with no permanent footprintnpx , no global installation needed. All you need is your API key and one configuration block added to your AI assistant's MCP settings file.Add the block below to your AI assistant's MCP configuration file. Replace your-api-key-here with your actual key.
Open Settings -> Tools & MCP -> New MCP Server and Add the configuration below to mcp.json
{
"mcpServers": {
"codesherlock": {
"name": "CodeSherlock MCP Server",
"description": "CodeSherlock is an AI- based code analysis tool that validates unstaged changes and commits directly inside IDEs and AI Agents. It helps developers catch security, quality, and design issues early by combining deep analysis with compliance-aware checks OWASP, CWE, SOC-2 at the moment code is written. CodeSherlock also performs other security vulnerability reviews along with Maintainability, Reliability and Scalability checks. Use CodeSherlock to review and validate code especially generated via AI.",
"command": "npx",
"args": [
"-y",
"@codesherlock/codesherlock-mcp-server"
],
"env": {
"MCP_API_KEY": "your-api-key-here"
}
}
}
}
Save the mcp.json -> Restart Cursor. The server should appear under Tools & MCP with 1 tool enabled.
In the Antigravity agent chat window, click the three dots (...) menu. → Manage MCP Servers → View raw config** and paste:
{
"mcpServers": {
"codesherlock": {
"name": "CodeSherlock MCP Server",
"description": "CodeSherlock is an AI- based code analysis tool that validates unstaged changes and commits directly inside IDEs and AI Agents. It helps developers catch security, quality, and design issues early by combining deep analysis with compliance-aware checks OWASP, CWE, SOC-2 at the moment code is written. CodeSherlock also performs other security vulnerability reviews along with Maintainability, Reliability and Scalability checks. Use CodeSherlock to review and validate code especially generated via AI.",
"command": "npx",
"args": [
"-y",
"@codesherlock/codesherlock-mcp-server"
],
"env": {
"MCP_API_KEY": "your-api-key-here"
}
}
}
}
save the mcp.json -> Click Refresh on the Manage MCP Servers page. -> restart Antigravity if needed.
Open Settings → MCP Servers → Open MCP Marketplace → Settings gear and add to mcp_config.json:
{
"mcpServers": {
"codesherlock": {
"name": "CodeSherlock MCP Server",
"description": "CodeSherlock is an AI- based code analysis tool that validates unstaged changes and commits directly inside IDEs and AI Agents. It helps developers catch security, quality, and design issues early by combining deep analysis with compliance-aware checks OWASP, CWE, SOC-2 at the moment code is written. CodeSherlock also performs other security vulnerability reviews along with Maintainability, Reliability and Scalability checks. Use CodeSherlock to review and validate code especially generated via AI.",
"command": "npx",
"args": [
"-y",
"@codesherlock/codesherlock-mcp-server"
],
"env": {
"MCP_API_KEY": "your-api-key-here"
}
}
}
}
save the mcp_config.json -> Restart Windsurf
Run once in your terminal:
claude mcp add --transport stdio codesherlock --env MCP_API_KEY=your-api-key-here -- cmd /c npx -y @codesherlock/codesherlock-mcp-server
Verify with:
claude mcp list
To remove:
claude mcp remove codesherlock
Or add manually to your Claude config file:
{
"mcpServers": {
"codesherlock": {
"name": "CodeSherlock MCP Server",
"description": "CodeSherlock is an AI- based code analysis tool that validates unstaged changes and commits directly inside IDEs and AI Agents. It helps developers catch security, quality, and design issues early by combining deep analysis with compliance-aware checks OWASP, CWE, SOC-2 at the moment code is written. CodeSherlock also performs other security vulnerability reviews along with Maintainability, Reliability and Scalability checks. Use CodeSherlock to review and validate code especially generated via AI.",
"command": "npx",
"args": [
"-y",
"@codesherlock/codesherlock-mcp-server"
],
"env": {
"MCP_API_KEY": "your-api-key-here"
}
}
}
}
Press Ctrl+Shift+P → MCP: Open User Configuration and add the below configuration to json file:
{
"servers": {
"codesherlock": {
"name": "CodeSherlock MCP Server",
"description": "CodeSherlock is an AI- based code analysis tool that validates unstaged changes and commits directly inside IDEs and AI Agents. It helps developers catch security, quality, and design issues early by combining deep analysis with compliance-aware checks OWASP, CWE, SOC-2 at the moment code is written. CodeSherlock also performs other security vulnerability reviews along with Maintainability, Reliability and Scalability checks. Use CodeSherlock to review and validate code especially generated via AI.",
"command": "npx",
"args": [
"-y",
"@codesherlock/codesherlock-mcp-server"
],
"env": {
"MCP_API_KEY": "your-api-key-here"
}
}
}
}
save the json file -> Restart VS Code. The tool will appear when you type @ in the Copilot Chat panel.
Open the Cline panel → Manage MCP Servers → Settings gear → Configure MCP Servers and add to cline_mcp_settings.json:
{
"mcpServers": {
"codesherlock": {
"name": "CodeSherlock MCP Server",
"description": "CodeSherlock is an AI- based code analysis tool that validates unstaged changes and commits directly inside IDEs and AI Agents. It helps developers catch security, quality, and design issues early by combining deep analysis with compliance-aware checks OWASP, CWE, SOC-2 at the moment code is written. CodeSherlock also performs other security vulnerability reviews along with Maintainability, Reliability and Scalability checks. Use CodeSherlock to review and validate code especially generated via AI.",
"command": "npx",
"args": [
"-y",
"@codesherlock/codesherlock-mcp-server"
],
"env": {
"MCP_API_KEY": "your-api-key-here"
}
}
}
}
save -> restart VS Code -> In the MCP server section you can see the codesherlock mcp server.
Once configured, prompt your AI assistant — it will call the codesherlock_analyze tool automatically.
Review my uncommitted changes using CodeSherlock
Use CodeSherlock to check my uncommitted code for CWE MITRE vulnerabilities
Analyze my latest commit for OWASP vulnerabilities using CodeSherlock
Check the last commit in my current repo for CWE KEV issues with CodeSherlock
| Factor | What it checks |
|---|---|
power_analysis | Security, quality, and compliance combined (default) |
owasp | OWASP Top 10 vulnerabilities |
cwe_mitre | CWE/MITRE weakness catalog |
cwe_kev | CISA Known Exploited Vulnerabilities |
Your AI assistant presents results grouped by file. Each issue includes:
CRITICAL, HIGH, MEDIUM, or LOW| Label | Meaning |
|---|---|
CRITICAL | Must fix immediately — actively exploitable |
HIGH | Fix before merging — serious risk |
MEDIUM | Fix soon — moderate risk |
LOW | Best-practice improvement |
Server not found or fails to start
npx -y @codesherlock/codesherlock-mcp-server in your system terminal. If it fails there, the issue is with your Node.js/npm setup or network access — not the IDE. If it succeeds in the terminal but not the IDE, recheck your config JSON for syntax errors and restart the IDE.Authentication failed or Invalid API key
Not a Git repository
.git folder. Run git init if needed.No changes to analyze
git log.Analysis times out or takes too long
Stale NPX cache causing issues
Clear the cache and restart your IDE:
# macOS/Linux
rm -rf ~/.npm/_npx
# Windows (PowerShell)
Remove-Item -Recurse -Force "$env:LOCALAPPDATA\npm-cache\_npx"
Demo video : https://youtu.be/c55BcFvonl4?si=6Df8oNaL9wQeVn5w
Full setup guide: https://docs.codesherlock.ai/codesherlock-mcp-server/mcp/setup/guide
MIT
FAQs
CodeSherlock MCP Server — AI-powered code analysis via Model Context Protocol
We found that @codesherlock/codesherlock-mcp-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.

Research
/Security News
Popular npm packages keyv and cacheable compromised.

Security News
A misconfiguration gave three Anthropic models internet access, and one, believing it was in a simulation, shipped a credential-stealing package to PyPI.