Skip to content

[20260312_DOCS] Updated onboarding links to match the current website docs and anchors.

New to Code Scalpel? Start Here 👋

Welcome! If you're new to Code Scalpel, this page will get you from "What is this?" to "I'm using it!" in under 5 minutes.


What is Code Scalpel? (10-second version)

Code Scalpel is an MCP server that gives AI assistants like Claude surgical precision for code analysis. Instead of sending entire files (~10,000 tokens), send only the function you need (~50 tokens).

Result: 200x token reduction = 200x faster responses = 200x lower costs.


Why Should I Care?

  • Save Money


    Real example: $450/month → $22/month in Claude API costs.

    That's $5,136 saved per year.

  • Get Faster Answers


    Before: 10-15 second waits for AI to process huge files.

    After: 1-2 second responses with surgical extracts.

  • Stay Within Limits


    Never hit Claude's 200K token limit again.

    Extract exactly what you need, every time.

  • No Hallucinations


    AI can't guess wrong when the server reads the file.

    Real AST parsing, not pattern matching.


Quick Visual Demo

Before Code Scalpel

# You send the ENTIRE file to Claude (10,247 tokens)
# 90% of the code is irrelevant to your question
# Claude has to read everything before answering
# Cost: $0.030 per query
# Time: 12 seconds

After Code Scalpel

# You ask: "Extract function calculate_tax"
# Code Scalpel returns ONLY that function (127 tokens)
# Claude answers instantly
# Cost: $0.0004 per query
# Time: 1.2 seconds

Savings: 98% cost reduction, 90% time reduction.


Is It Free?

Yes! Code Scalpel is free forever for individuals.

Tier Price What You Get
Community FREE All 24 MCP tools, unlimited use, perfect for individuals
Pro Coming Soon Team features, advanced analytics, priority support
Enterprise Contact Us On-premise, SOC2 compliance, custom SLAs

No credit card. No trial period. Free forever.


3-Step Quickstart

Step 1: Install Code Scalpel (30 seconds)

# Install via pip
pip install codescalpel

# Verify installation
codescalpel --version

Step 2: Configure Your AI Assistant (2 minutes)

Choose your AI assistant:

Fastest setup - recommended for beginners

  1. Open Claude Desktop settings
  2. Navigate to "Developer" → "MCP Servers"
  3. Add server configuration:
{
  "codescalpel": {
    "command": "uvx",
    "args": ["codescalpel", "mcp"]
  }
}
  1. Restart Claude Desktop

✅ Done! Claude can now use Code Scalpel tools.

Full Claude Desktop Guide →

  1. Install Code Scalpel extension from VS Code marketplace
  2. Restart VS Code
  3. Copilot now has Code Scalpel tools available

Full VS Code Guide →

  1. Open Cursor settings
  2. Add MCP server under "AI" settings
  3. Point to Code Scalpel installation

Full Cursor Guide →

from code_scalpel.mcp import Server

server = Server()
result = await server.extract_code(
    file_path="utils.py",
    target_type="function",
    target_name="calculate_tax"
)

Full API Guide →

Step 3: Try Your First Analysis (1 minute)

Ask Claude (or your AI assistant):

Use Code Scalpel to extract the `process_payment` function from payments.py

Claude will use Code Scalpel to: 1. Read your payments.py file 2. Parse the AST to find process_payment 3. Extract only that function (with dependencies if needed) 4. Return it to you

Instead of 10,000 tokens → 150 tokens.


What Can Code Scalpel Do?

Code Scalpel provides 24 MCP tools across 9 categories:

🔍 Analysis Tools

  • analyze_code - Parse file structure (functions, classes, imports)
  • get_file_context - Get context around specific code locations
  • get_symbol_references - Find all uses of a function/class

✂️ Extraction Tools

  • extract_code - Surgically extract functions/classes by name
  • get_cross_file_dependencies - Trace imports across files

🛡️ Security Tools

  • security_scan - Find SQL injection, XSS, command injection
  • cross_file_security_scan - Multi-file taint analysis
  • unified_sink_detect - Polyglot sink detection (Python/Java/JS/TS)

📊 Graph Tools

  • get_call_graph - Generate function call graphs
  • get_project_map - High-level project structure
  • get_graph_neighborhood - Extract k-hop subgraphs

🔧 Modification Tools

  • update_symbol - Safely replace functions/classes
  • rename_symbol - Rename throughout codebase
  • simulate_refactor - Verify changes are safe

🧪 Symbolic Execution

  • symbolic_execute - Explore execution paths
  • generate_unit_tests - Auto-generate tests

📋 Policy Tools

  • code_policy_check - Enforce style guides
  • verify_policy_integrity - Cryptographic policy verification

Full Tool Reference →


Common Use Cases

Use Case 1: Reduce AI Costs

Persona: Solo developer spending $450/month on Claude API

Problem: Sending entire files for simple questions Solution: Extract only the functions you need Result: $450/mo → $22/mo (95% savings)

Cost Optimization Guide →


Use Case 2: Security Scanning

Persona: AppSec engineer evaluating security tools

Problem: False positives from regex-based scanners Solution: Taint-based analysis with <10% false positive rate Result: Found 15 vulnerabilities missed by Semgrep

Security Guide →


Use Case 3: Team Rollout

Persona: Engineering manager with 10-person team

Problem: Team AI costs up $8K/month Solution: Standardize on Code Scalpel for 40% savings Result: $48K/year saved, 80% team adoption

Team Quickstart →


Next Steps

Now that you understand what Code Scalpel is, choose your path:


Frequently Asked Questions

Is this really free?

Yes. Community tier is free forever, no credit card, no time limits. All 22 core tools are available, with tool-specific Community limits designed for solo developers and small projects.

Does it work with my AI assistant?

If your AI assistant supports MCP (Model Context Protocol), yes. This includes Claude Desktop, GitHub Copilot, Cursor, and many others.

Does it send my code to the cloud?

No. Code Scalpel runs locally on your machine. Your code never leaves your computer.

What languages are supported?

Python, JavaScript, TypeScript, Java, JSX, TSX. More languages coming soon.

How is this different from GitHub Copilot?

GitHub Copilot generates code. Code Scalpel gives AI assistants surgical tools to analyze, extract, and modify existing code. They work great together!

I'm stuck. Where do I get help?


Success Stories

"I was spending $450/month on Claude API costs. After installing Code Scalpel, my bill dropped to $22/month. Same quality answers, 95% cost savings. This paid for itself in the first week."

— Sarah Chen, Freelance Developer

"Our AppSec team evaluated Code Scalpel alongside Semgrep and CodeQL. The taint analysis found 12 vulnerabilities the other tools missed, with a <8% false positive rate. We're rolling it out to 200 developers."

— Marcus Williams, Security Lead

"I set up Code Scalpel for my 10-person team in under an hour. We're now saving $4K/month in AI costs and my developers love the faster response times. ROI was immediate."

— David Park, Engineering Manager

More Team Rollout Examples →


Ready to Get Started?

Pick your path and dive in. You'll be up and running in under 5 minutes.


Questions? Check the FAQ or open a discussion.