License Activation Guide¶
This guide walks you through activating your Pro or Enterprise license for Code Scalpel.
Community Tier
No license required! Code Scalpel Community tier is free forever and works out of the box. This guide is only needed for Pro or Enterprise tiers.
Quick Start¶
Already have your license file? Follow these 3 steps:
-
Create the license directory:
-
Place your license file:
-
Verify activation:
Step-by-Step Activation¶
Step 1: Obtain Your License¶
If you don't have a license yet:
- Sign up for Pro tier at codescalpel.dev/pricing
- Complete payment via Stripe
- Receive license JWT file via email:
code_scalpel_license_pro_[timestamp].jwt - Download the file (usually goes to
~/Downloads/)
- Contact sales: sales@codescalpel.dev
- Complete enterprise agreement
- Receive license JWT file:
code_scalpel_license_enterprise_[timestamp].jwt - Download the file
- Check your beta invitation email
- Download attached JWT file:
code_scalpel_license_beta_*.jwt - This is typically a time-limited Pro or Enterprise license
License File Security
Your license file is a cryptographic JWT token that proves your tier entitlement. Do not share it publicly or commit it to version control.
Step 2: Choose Installation Location¶
Code Scalpel searches for licenses in multiple locations (priority order):
| Priority | Location | Use Case |
|---|---|---|
| 1 | .code-scalpel/license/license.jwt | Recommended - Project-specific license |
| 2 | .code-scalpel/license.jwt | Alternate project-specific location |
| 3 | ~/.config/code-scalpel/license.jwt | User-wide license (XDG standard) |
| 4 | ~/.code-scalpel/license.jwt | User-wide license (legacy) |
Choose based on your setup:
Use: ~/.config/code-scalpel/license.jwt (user-wide)
mkdir -p ~/.config/code-scalpel
cp ~/Downloads/code_scalpel_license_*.jwt ~/.config/code-scalpel/license.jwt
Why: One license file shared across all your projects.
Use: .code-scalpel/license/license.jwt (project-specific)
mkdir -p .code-scalpel/license
cp /shared/licenses/team-license.jwt .code-scalpel/license/license.jwt
# Add to .gitignore
echo ".code-scalpel/license/" >> .gitignore
Why: Each project can have different license (e.g., different organizations).
Step 3: Install the License¶
Choose your installation method:
# Navigate to your project
cd /path/to/your/project
# Create license directory
mkdir -p .code-scalpel/license
# Copy license file (adjust source path as needed)
cp ~/Downloads/code_scalpel_license_pro_*.jwt .code-scalpel/license/license.jwt
# Verify file exists
ls -lh .code-scalpel/license/license.jwt
File Naming Flexibility
Code Scalpel auto-detects license files matching these patterns:
code_scalpel_license*.jwt(e.g., downloaded files)code-scalpel-license*.jwtlicense*.jwt(e.g.,license.jwt,license (1).jwt)*.license.jwt(e.g.,pro.license.jwt)
If multiple files exist, the most recently modified is used.
Step 4: Verify License Activation¶
Check that your license is active:
from code_scalpel.licensing.jwt_validator import get_current_tier, JWTLicenseValidator
# Check tier
tier = get_current_tier()
print(f"Active tier: {tier}")
# Get detailed license info
validator = JWTLicenseValidator()
license_data = validator.validate()
if license_data.is_valid:
print(f"✅ License valid!")
print(f" Tier: {license_data.tier}")
print(f" Organization: {license_data.organization}")
print(f" Expires: {license_data.expiration.strftime('%Y-%m-%d')}")
print(f" Days remaining: {license_data.days_until_expiration}")
else:
print(f"❌ License invalid: {license_data.error_message}")
Expected Output:
- Community:
Active tier: community - Pro:
Active tier: pro - Enterprise:
Active tier: enterprise
Using Your License with MCP Clients¶
Once your license is activated, it automatically works with all MCP clients. The license is detected when the Code Scalpel MCP server starts.
Claude Desktop¶
Your activated license works seamlessly with Claude Desktop:
1. Ensure license is installed (follow Step 3 above)
2. Configure Claude Desktop (if not already done):
Edit: ~/Library/Application Support/Claude/claude_desktop_config.json
Edit: %APPDATA%\Claude\claude_desktop_config.json
Auto-Discovery
If your license is in a standard location (.code-scalpel/license/license.jwt or ~/.config/code-scalpel/license.jwt), you don't need the env section—Code Scalpel will find it automatically:
3. Restart Claude Desktop
4. Verify tier in Claude:
Ask Claude: "What Code Scalpel tools are available?" and look for Pro/Enterprise-only tools like:
get_call_graphwith unlimited depth (Enterprise)cross_file_security_scanwith high module limits (Pro/Enterprise)get_graph_neighborhoodwith advanced resolution (Pro)
Claude CLI (Terminal Interface)¶
Claude CLI is a command-line interface to Claude that runs directly in your terminal. Your license works automatically when Claude CLI starts the Code Scalpel MCP server.
1. Install Claude CLI (if not already installed):
# Using pip
pip install claude-cli
# Or using Homebrew (macOS/Linux)
brew install anthropics/claude/claude-cli
2. Configure MCP servers for Claude CLI:
Edit: ~/.config/claude/config.json (create if it doesn't exist)
{
"mcpServers": {
"code-scalpel": {
"command": "uvx",
"args": ["codescalpel", "mcp"],
"env": {
"CODE_SCALPEL_LICENSE_PATH": "/home/yourname/.config/code-scalpel/license.jwt"
}
}
}
}
Alternative: Project-specific configuration:
Create .claude/config.json in your project directory:
{
"mcpServers": {
"code-scalpel": {
"command": "uvx",
"args": ["codescalpel", "mcp"],
"env": {
"CODE_SCALPEL_LICENSE_PATH": "./.code-scalpel/license/license.jwt"
}
}
}
}
Standard Location Auto-Discovery
If your license is in ~/.config/code-scalpel/license.jwt or .code-scalpel/license/license.jwt (relative to where you run claude), you don't need the env section:
3. Start Claude CLI with MCP servers:
# Start Claude CLI (automatically loads MCP servers)
claude
# Or start with specific project
cd /path/to/your/project
claude
4. Verify tier in Claude CLI:
You: What Code Scalpel tier am I using?
Claude: Let me check... [calls get_capabilities tool]
You're using Code Scalpel Pro tier (expires 2026-12-31).
5. Test Pro/Enterprise features:
Common CLI-specific scenarios:
# Place license in user config directory
mkdir -p ~/.config/code-scalpel
cp ~/Downloads/code_scalpel_license_*.jwt ~/.config/code-scalpel/license.jwt
# Configure Claude CLI
cat > ~/.config/claude/config.json << 'EOF'
{
"mcpServers": {
"code-scalpel": {
"command": "uvx",
"args": ["codescalpel", "mcp"]
}
}
}
EOF
# Start Claude from any project
cd /any/project
claude
# Place license in project
cd /path/to/project
mkdir -p .code-scalpel/license
cp ~/Downloads/team-license.jwt .code-scalpel/license/license.jwt
# Configure project-specific Claude settings
mkdir -p .claude
cat > .claude/config.json << 'EOF'
{
"mcpServers": {
"code-scalpel": {
"command": "uvx",
"args": ["codescalpel", "mcp"]
}
}
}
EOF
# Start Claude (uses project license)
claude
CLI-specific troubleshooting:
Issue: "License works in Claude Desktop but not in Claude CLI"
Cause: Different config files (claude_desktop_config.json vs config.json)
Solution: Configure both:
# Claude Desktop config
cp ~/Library/Application\ Support/Claude/claude_desktop_config.json ~/Desktop/backup.json
# Claude CLI config
mkdir -p ~/.config/claude
cat > ~/.config/claude/config.json << 'EOF'
{
"mcpServers": {
"code-scalpel": {
"command": "uvx",
"args": ["codescalpel", "mcp"],
"env": {
"CODE_SCALPEL_LICENSE_PATH": "/Users/yourname/.config/code-scalpel/license.jwt"
}
}
}
}
EOF
Issue: "License detected when running Python directly but not via Claude CLI"
Cause: Claude CLI may start MCP server with different working directory
Solution: Use absolute path for license:
{
"mcpServers": {
"code-scalpel": {
"env": {
"CODE_SCALPEL_LICENSE_PATH": "/home/yourname/.config/code-scalpel/license.jwt"
}
}
}
}
Viewing MCP server logs in Claude CLI:
# Start Claude CLI with debug logging
claude --verbose
# Or set environment variable
export CLAUDE_DEBUG=1
claude
Look for:
[MCP] Starting server: code-scalpel
[MCP] code-scalpel: License detected: Pro tier (expires 2026-12-31)
[MCP] code-scalpel: Server ready with 23 tools
GitHub Copilot (VS Code)¶
Your license works automatically when Copilot uses Code Scalpel as an MCP server:
1. Install the MCP extension (if not already done):
2. Configure workspace settings (.vscode/settings.json):
{
"mcp.servers": {
"code-scalpel": {
"command": "uvx",
"args": ["codescalpel", "mcp"],
"env": {
"CODE_SCALPEL_LICENSE_PATH": "${workspaceFolder}/.code-scalpel/license/license.jwt"
}
}
}
}
Alternative: User settings (for all workspaces):
Press Ctrl+Shift+P → "Preferences: Open User Settings (JSON)" and add:
{
"mcp.servers": {
"code-scalpel": {
"command": "uvx",
"args": ["codescalpel", "mcp"],
"env": {
"CODE_SCALPEL_LICENSE_PATH": "/full/path/to/license.jwt"
}
}
}
}
3. Reload VS Code window
Cline (VS Code Extension)¶
Cline can use your activated Code Scalpel license via MCP:
1. Open Cline settings in VS Code
2. Add MCP server configuration:
{
"cline.mcpServers": {
"code-scalpel": {
"command": "uvx",
"args": ["codescalpel", "mcp"],
"env": {
"CODE_SCALPEL_LICENSE_PATH": "${workspaceFolder}/.code-scalpel/license/license.jwt"
}
}
}
}
3. Restart Cline or reload VS Code
Continue.dev (VS Code Extension)¶
Configure Code Scalpel as an MCP server in Continue:
1. Open Continue settings: ~/.continue/config.json
2. Add to mcpServers section:
{
"mcpServers": [
{
"name": "code-scalpel",
"command": "uvx",
"args": ["codescalpel", "mcp"],
"env": {
"CODE_SCALPEL_LICENSE_PATH": "/home/yourname/.config/code-scalpel/license.jwt"
}
}
]
}
3. Restart Continue extension
Zed Editor¶
Zed has native MCP support. Configure Code Scalpel in your Zed settings:
1. Open Zed settings: ~/.config/zed/settings.json
2. Add MCP server:
{
"context_servers": {
"code-scalpel": {
"command": {
"path": "python",
"args": ["codescalpel", "mcp"]
},
"env": {
"CODE_SCALPEL_LICENSE_PATH": "/home/yourname/.config/code-scalpel/license.jwt"
}
}
}
}
3. Restart Zed
Windsurf Editor¶
Windsurf can integrate Code Scalpel via MCP:
1. Open Windsurf settings
2. Configure MCP server:
{
"mcp": {
"servers": {
"code-scalpel": {
"command": "uvx",
"args": ["codescalpel", "mcp"],
"env": {
"CODE_SCALPEL_LICENSE_PATH": "/Users/yourname/.config/code-scalpel/license.jwt"
}
}
}
}
}
3. Restart Windsurf
Cody (Sourcegraph)¶
Cody can use Code Scalpel as an MCP context provider:
1. Configure in VS Code settings (.vscode/settings.json):
{
"cody.experimental.mcp.servers": {
"code-scalpel": {
"command": "uvx",
"args": ["codescalpel", "mcp"],
"env": {
"CODE_SCALPEL_LICENSE_PATH": "${workspaceFolder}/.code-scalpel/license/license.jwt"
}
}
}
}
2. Enable MCP in Cody settings
3. Reload VS Code
Custom MCP Clients¶
For any MCP client that supports server configuration:
{
"command": "uvx",
"args": ["codescalpel", "mcp"],
"env": {
"CODE_SCALPEL_LICENSE_PATH": "/path/to/license.jwt"
}
}
Key points:
- Command:
uvx codescalpel mcp - Environment: Optional
CODE_SCALPEL_LICENSE_PATH(required if license not in standard location) - Working Directory: Set to your project root for best results
- Transport: Default is stdio (standard input/output)
Verifying License in MCP Clients¶
To confirm your license is active in any MCP client:
1. Ask the AI assistant:
2. Request tier-specific features:
Ask: "Use get_call_graph to analyze my project with depth=20"
- ✅ Pro/Enterprise: Works (depth limit 50+)
- ❌ Community: Fails (depth limit 3)
Ask: "Use get_call_graph with unlimited depth"
- ✅ Enterprise: Works (no depth limit)
- ⚠️ Pro: Limited to depth=50
- ❌ Community: Limited to depth=3
3. Check MCP server logs:
Most MCP clients show server logs. Look for:
INFO: Code Scalpel MCP Server v1.4.0
INFO: License detected: Pro tier (expires 2026-12-31)
INFO: MCP server ready with 23 tools
Common MCP Client Issues¶
Issue: "License detected locally but not in Claude Desktop"¶
Cause: Claude Desktop doesn't inherit your shell environment variables.
Solution: Explicitly set CODE_SCALPEL_LICENSE_PATH in claude_desktop_config.json:
{
"mcpServers": {
"code-scalpel": {
"command": "uvx",
"args": ["codescalpel", "mcp"],
"env": {
"CODE_SCALPEL_LICENSE_PATH": "/Users/yourname/.config/code-scalpel/license.jwt"
}
}
}
}
Issue: "Community tier in VS Code, Pro tier in terminal"¶
Cause: VS Code workspace has different working directory or environment.
Solution: Use absolute path in .vscode/settings.json:
{
"mcp.servers": {
"code-scalpel": {
"env": {
"CODE_SCALPEL_LICENSE_PATH": "/home/yourname/.config/code-scalpel/license.jwt"
}
}
}
}
Issue: "License works in Zed but not in Continue"¶
Cause: Each client has different working directory when launching MCP server.
Solution: Use user-wide license location (~/.config/code-scalpel/license.jwt) instead of project-specific location.
MCP Server Environment Variables¶
When configuring any MCP client, you can set these environment variables:
| Variable | Purpose | Example |
|---|---|---|
CODE_SCALPEL_LICENSE_PATH | Override license location | /path/to/license.jwt |
PYTHONPATH | Add Code Scalpel to Python path | /path/to/src |
CODE_SCALPEL_ROOT | Set project root | /path/to/project |
CODE_SCALPEL_LOG_LEVEL | Adjust logging | DEBUG, INFO, WARNING |
Example with all variables:
{
"command": "uvx",
"args": ["codescalpel", "mcp"],
"env": {
"CODE_SCALPEL_LICENSE_PATH": "/home/user/.config/code-scalpel/license.jwt",
"CODE_SCALPEL_ROOT": "${workspaceFolder}",
"CODE_SCALPEL_LOG_LEVEL": "INFO"
}
}
Troubleshooting¶
❌ "No license found" (defaulting to Community)¶
Cause: License file not in expected location.
Solutions:
-
Check file location:
-
Check file permissions:
-
Use explicit path:
-
Check directory structure:
❌ "Invalid token format" or "Failed to decode license"¶
Cause: Corrupted or incomplete license file.
Solutions:
- Check file contents:
Valid format:
- Re-download the license:
- Original file may have been corrupted during download
-
Check your email for fresh download link
-
Remove hidden characters:
❌ "Invalid signature - license may be tampered"¶
Cause: License signature verification failed.
Solutions:
-
Check file integrity:
-
Verify it's a valid JWT:
- Paste your license into jwt.io
-
Should show header + payload (don't share the full token publicly!)
-
Re-download from trusted source:
- License may have been modified
-
Get fresh copy from original email
-
Check system time:
Never Modify License Files
JWT licenses are cryptographically signed. Any modification (even adding a space) will break the signature and make the license invalid.
❌ "License expired X days ago"¶
Cause: License expiration date has passed.
Solutions:
-
Check expiration date:
-
Grace period (7 days):
- Expired licenses work for 7 days after expiration
-
Renew before grace period ends
-
Renew license:
- Pro: Automatic renewal via Stripe (check billing settings)
- Enterprise: Contact your account manager
-
Beta: Request extension via beta program
-
Emergency access (Community tier):
❌ "PyJWT not installed"¶
Cause: Missing dependency for Pro/Enterprise license validation.
Solution:
# Install PyJWT and cryptography
pip install PyJWT cryptography
# Or reinstall Code Scalpel with all dependencies
pip install --upgrade codescalpel
❌ License works locally but not in CI/CD¶
Cause: License file not accessible in container/CI environment.
Solutions:
-
GitHub Actions:
-
GitLab CI:
-
Docker:
Advanced Configuration¶
Multiple Organizations (Enterprise)¶
If you work with multiple Enterprise organizations:
# Project A (Org 1)
cd /projects/project-a
mkdir -p .code-scalpel/license
cp ~/licenses/org1-license.jwt .code-scalpel/license/license.jwt
# Project B (Org 2)
cd /projects/project-b
mkdir -p .code-scalpel/license
cp ~/licenses/org2-license.jwt .code-scalpel/license/license.jwt
Each project will use its own organization's license.
License Verification Logs¶
Enable debug logging to troubleshoot license issues:
import logging
logging.basicConfig(level=logging.DEBUG)
from code_scalpel.licensing.jwt_validator import JWTLicenseValidator
validator = JWTLicenseValidator()
license_data = validator.validate()
Look for these log messages:
Found license file: .code-scalpel/license/license.jwt✅No license file found in standard locations⚠️Invalid license signature❌License expired X days ago⚠️
License Caching¶
Code Scalpel caches license validation results for 24 hours to avoid repeated cryptographic operations.
Cache behavior:
- Cache key: File path + modification time + file size + CRL state
- Cache duration: 24 hours
- Cache invalidation: Automatic when license file changes
Force re-validation:
Security Best Practices¶
✅ Do:¶
-
Store licenses in
.gitignore: -
Use environment variables in CI/CD:
- Store license as secret (GitHub Secrets, GitLab Variables, etc.)
-
Inject at runtime, never commit
-
Restrict file permissions:
-
Rotate licenses periodically:
- Enterprise: Annual renewal recommended
- Pro: Automatic Stripe renewal
❌ Don't:¶
-
Never commit licenses to version control:
-
Never share license files publicly:
- Don't paste in Slack, Discord, forums
-
Don't share in screenshots
-
Never use production licenses in development:
-
Request separate dev/staging licenses from Enterprise account manager
-
Don't hardcode licenses in code:
License Tiers Comparison¶
| Feature | Community | Pro | Enterprise |
|---|---|---|---|
| Installation | No license needed | JWT file | JWT file |
| Activation | Automatic | File-based | File-based |
| Renewal | N/A (forever free) | Automatic (Stripe) | Manual (contract) |
| Expiration | Never | 1 year | Contract term |
| Grace Period | N/A | 7 days | 7 days |
| Multi-Org Support | N/A | No | Yes |
FAQ¶
Q: Can I use one Pro license across multiple machines?¶
A: Yes! Pro licenses are user-based, not machine-based. Install the same license.jwt file on all your development machines.
Q: What happens if my license expires during a long-running analysis?¶
A: Code Scalpel checks license status on startup and every 24 hours. A long-running analysis will complete, but new analyses will require license renewal.
Q: Can I upgrade from Pro to Enterprise?¶
A: Yes! Contact sales@codescalpel.dev. Your new Enterprise license will replace your Pro license—just overwrite the JWT file.
Q: Does Community tier require a license file?¶
A: No! Community tier works without any license. If Code Scalpel finds no valid license, it automatically falls back to Community tier (which is free forever).
Q: Where can I see my license details?¶
A: Decode your JWT at jwt.io to see: - Tier (pro/enterprise) - Expiration date - Organization - Features enabled - Customer ID
Q: My license was revoked. What should I do?¶
A: Contact support@codescalpel.dev immediately. License revocation typically occurs due to: - Payment failure (Pro tier) - Contract termination (Enterprise tier) - Terms of service violation
Getting Help¶
If you're still having issues with license activation:
- 📧 Email: support@codescalpel.dev
- 💬 Discord: discord.gg/codescalpel
- 📚 Docs: codescalpel.dev/docs
- 🐛 GitHub Issues: github.com/code-scalpel/code-scalpel/issues
Include in your support request:
- Tier you're trying to activate (Pro/Enterprise)
- Output of activation verification script
- Any error messages from logs
- Operating system and Python version
Next Steps¶
Once your license is activated: