Quick Start Guide¶
Get Code Scalpel running in under 5 minutes. This guide assumes you're comfortable with command-line tools and have an MCP-compatible AI assistant ready.
Prerequisites¶
- Python 3.10 or higher
- pip or uv package manager
- One of: Claude Desktop, VS Code with Copilot, or Cursor
Step 1: Install Code Scalpel¶
Choose your preferred installation method:
You should see output like:
Step 2: Configure Your AI Assistant¶
macOS:
Windows:
Linux:
Add Code Scalpel to the mcpServers section:
-
Open VS Code Settings (JSON):
Ctrl+Shift+P→ "Preferences: Open User Settings (JSON)" -
Add the MCP server configuration:
{
"servers": {
"code-scalpel": {
"command": "uvx",
"args": ["codescalpel", "mcp"],
"env": {
"CODE_SCALPEL_LICENSE_PATH": "${workspaceFolder}/.code-scalpel/license/"
}
}
}
}
- Reload VS Code:
Ctrl+Shift+P→ "Developer: Reload Window"
- Open Cursor Settings
- Navigate to Features → MCP Servers
- Click Add Server
- Configure:
- Name:
code-scalpel - Command:
uvx - Arguments:
codescalpel
- Name:
- Save and restart Cursor
Step 3: Verify It Works¶
Open a conversation with your AI assistant and try:
Test Prompt
"Analyze the structure of this Python code using Code Scalpel:"
You should see the AI invoke analyze_code and return:
{
"functions": [
{
"name": "calculate_total",
"line": 1,
"parameters": ["items", "tax_rate"],
"returns": "float"
}
],
"classes": [
{
"name": "ShoppingCart",
"line": 6,
"methods": ["__init__", "add_item"]
}
],
"imports": []
}
Step 4: Try More Tools¶
Now that you're set up, try these common operations:
Extract a Specific Function¶
"Use extract_code to get just the
calculate_totalfunction"
Run a Security Scan¶
"Use security_scan to check this code for vulnerabilities"
Get Project Overview¶
"Use get_project_map to show me the structure of this project"
Common Issues¶
Claude says it doesn't have access to Code Scalpel tools
- Make sure you restarted Claude Desktop after editing the config
- Check the config file syntax is valid JSON
- Verify the command path is correct for your system
VS Code shows 'MCP server failed to start'
- Check that
uvxorcodescalpelis in your PATH - Try using the full path to the executable
- Check VS Code's Output panel for error details
Tools return 'file not found' errors
- Make sure you're working in a project directory
- Use absolute paths when referencing files
- Check file permissions
Next Steps¶
-
Your First Analysis
Deep dive into running and understanding code analysis.
-
Tutorials
Step-by-step guides for common workflows.
-
Tool Reference
Explore all 22 Code Scalpel tools.