Claude Desktop Installation¶
This guide walks you through setting up Code Scalpel with Claude Desktop, Anthropic's desktop application for Claude.
Prerequisites¶
Before you begin, ensure you have:
- Claude Desktop installed (download here)
- Python 3.10+ installed
- uv or pip package manager
Step 1: Install Code Scalpel¶
Choose your preferred installation method:
The fastest option—no global installation needed:
Traditional Python package installation:
Step 2: Locate Claude Desktop Config¶
Claude Desktop stores its configuration in a JSON file. The location depends on your operating system:
# Config file location
~/Library/Application Support/Claude/claude_desktop_config.json
# Open in default editor
open ~/Library/Application\ Support/Claude/claude_desktop_config.json
# Or create if it doesn't exist
mkdir -p ~/Library/Application\ Support/Claude
touch ~/Library/Application\ Support/Claude/claude_desktop_config.json
Step 3: Add Code Scalpel Configuration¶
Edit the config file to add Code Scalpel as an MCP server:
First, find your Python path:
Then use the full path in config:
{
"mcpServers": {
"code-scalpel": {
"command": "/usr/local/bin/python",
"args": ["-m", "code_scalpel"]
}
}
}
Use Absolute Paths
Always use the full absolute path to Python when using pip installation. Relative paths or python alone may not work reliably.
Step 4: Restart Claude Desktop¶
After saving the configuration file:
-
Quit Claude Desktop completely (not just close the window)
- macOS:
Cmd+Qor Claude → Quit Claude - Windows: Right-click tray icon → Exit
- Linux: Close all windows and check system tray
- macOS:
-
Reopen Claude Desktop
-
Verify the connection by looking for the MCP server indicator in Claude's interface
Step 5: Test the Installation¶
Start a new conversation with Claude and try:
Test Prompt
"What Code Scalpel tools do you have available?"
Claude should respond listing the available tools like analyze_code, extract_code, security_scan, etc.
Try a simple analysis:
Analysis Test
"Use Code Scalpel's analyze_code tool to analyze this Python code:
python def greet(name: str) -> str: return f'Hello, {name}!'"
You should see Claude invoke the analyze_code tool and return structured information about the function.
Configuration Options¶
Working Directory¶
To set a default working directory for file operations:
{
"mcpServers": {
"code-scalpel": {
"command": "uvx",
"args": ["codescalpel", "mcp"],
"cwd": "/path/to/your/project"
}
}
}
Multiple Servers¶
You can run Code Scalpel alongside other MCP servers:
{
"mcpServers": {
"code-scalpel": {
"command": "uvx",
"args": ["codescalpel", "mcp"]
},
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem"]
}
}
}
Pro/Enterprise License¶
To activate Pro or Enterprise features:
{
"mcpServers": {
"code-scalpel": {
"command": "uvx",
"args": ["codescalpel", "mcp"],
"env": {
"CODE_SCALPEL_LICENSE_PATH": "/path/to/your/license.jwt"
}
}
}
}
Troubleshooting¶
Claude doesn't show Code Scalpel tools
- Verify config file syntax: Use a JSON validator to check for errors
- Check file location: Ensure the config file is in the correct directory
- Full restart: Quit Claude Desktop completely and reopen
- Check logs: Look at Claude Desktop's developer console for errors
'uvx' command not found
Install uv first:
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
Then restart your terminal and try again.
Permission denied errors
- Check that the Python/uvx executable has execute permissions
- On macOS, you may need to allow the application in System Preferences → Security
- Try running the command manually in a terminal to see the full error
Tools work but file paths fail
- Use absolute paths when referencing files
- Set the
cwdoption in your config to your project directory - Check that Claude Desktop has permission to access the directories
Next Steps¶
- Your First Analysis - Learn to interpret Code Scalpel results
- Tutorials - Step-by-step guides for common tasks
- Tool Reference - Explore all available tools