MCP Allowlist Configuration Guide

December 5, 2025 ยท View on GitHub

Configure which Debugssy tools your AI can use automatically without asking for permission each time

This guide helps you set up allowlists for your MCP client (Claude Desktop, Cursor, Copilot) to streamline your debugging workflow while maintaining security.


๐Ÿ“‹ Table of Contents


โšก Quick Start

Too long; didn't read? Copy one of these configs:

Uses: assisted mode (default) + read-only tools only

{
  "mcpServers": {
    "debugssy": {
      "url": "http://localhost:3000/mcp",
      "allowlist": [
        "debugssy:get_debug_state",
        "debugssy:get_variables",
        "debugssy:get_call_stack",
        "debugssy:get_console_output",
        "debugssy:list_breakpoints"
      ]
    }
  }
}

โœ… You control debugging (F5, F10, F11 in VS Code)
โœ… AI can analyze bugs
โœ… AI can inspect variables
โœ… AI can trace execution
โŒ AI cannot set breakpoints or modify anything


๐Ÿ”„ How It Works

Automation Modes (VS Code Setting)

Debugssy has 2 automation modes set via debugssy.automationLevel:

ModeTools ExposedYou ControlAI Controls
assisted (default)Read-only + breakpoints + UI promptsStart/stop debugging, step operationsInspect state, set breakpoints
fullAll tools including start_debugging, continue, step_*Nothing (optional monitoring)Everything automatically

Why this matters: The AI only sees tools it can use, preventing confusing error messages.

Allowlist Levels (MCP Client Configuration)

Within each automation mode, you can further restrict which tools the AI can use without asking permission via allowlists. Below are 3 common configurations:


โš™๏ธ Configuration Examples

Choose the configuration that matches your workflow and AI client:

๐ŸŸข Level 1: Read-Only Tools (Safest)

Automation mode: assisted (default, no change needed)
Allowlist: Read-only inspection tools only
For: Code review, understanding bugs, learning
AI can: Inspect state, analyze execution
AI cannot: Set breakpoints, modify anything, control execution

๐Ÿ“‹ For Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (Mac) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "debugssy": {
      "url": "http://localhost:3000/mcp",
      "allowlist": [
        "debugssy:get_debug_state",
        "debugssy:get_variables",
        "debugssy:get_call_stack",
        "debugssy:get_console_output",
        "debugssy:list_breakpoints"
      ]
    }
  }
}
โšก For Cursor

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "debugssy": {
      "url": "http://localhost:3000/mcp",
      "allowlist": [
        "debugssy:get_debug_state",
        "debugssy:get_variables",
        "debugssy:get_call_stack",
        "debugssy:get_console_output",
        "debugssy:list_breakpoints"
      ]
    }
  }
}
๐Ÿค– For GitHub Copilot

Add to VS Code settings.json:

{
  "github.copilot.chat.mcp.servers": {
    "debugssy": {
      "url": "http://localhost:3000/mcp",
      "allowlist": [
        "debugssy:get_debug_state",
        "debugssy:get_variables",
        "debugssy:get_call_stack",
        "debugssy:get_console_output",
        "debugssy:list_breakpoints"
      ]
    }
  }
}

Automation mode: assisted (default, no change needed)
Allowlist: Read-only + breakpoint management + expression evaluation
For: Interactive debugging, guided workflows
AI can: Everything from Level 1 + set breakpoints + evaluate expressions
You control: Start/stop debugging, step operations via VS Code UI

๐Ÿ“‹ Configuration for all MCP clients
{
  "mcpServers": {
    "debugssy": {
      "url": "http://localhost:3000/mcp",
      "allowlist": [
        "debugssy:get_debug_state",
        "debugssy:get_variables",
        "debugssy:get_call_stack",
        "debugssy:get_threads",
        "debugssy:get_console_output",
        "debugssy:list_breakpoints",
        "debugssy:set_breakpoint",
        "debugssy:remove_breakpoint",
        "debugssy:evaluate_expression"
      ]
    }
  }
}

Note: In assisted mode, execution control tools (continue, step_over, etc.) return friendly messages prompting you to use VS Code UI.


๐Ÿ”ด Level 3: Full Automation (Advanced)

Automation mode: full โš ๏ธ Must set "debugssy.automationLevel": "full" in VS Code settings
Allowlist: All tools including execution control
For: Automated debugging, batch processing, experienced users
AI can: Complete control including starting/stopping sessions, continue, step operations
You control: Nothing (AI drives everything)

โš ๏ธ Only use in trusted environments

๐Ÿ“‹ Configuration for all MCP clients
{
  "mcpServers": {
    "debugssy": {
      "url": "http://localhost:3000/mcp",
      "allowlist": [
        "debugssy:get_debug_state",
        "debugssy:get_variables",
        "debugssy:get_call_stack",
        "debugssy:get_threads",
        "debugssy:get_console_output",
        "debugssy:list_breakpoints",
        "debugssy:wait_for_breakpoint",
        "debugssy:start_debugging",
        "debugssy:stop_debugging",
        "debugssy:set_breakpoint",
        "debugssy:remove_breakpoint",
        "debugssy:continue",
        "debugssy:pause",
        "debugssy:restart",
        "debugssy:evaluate_expression"
      ]
    }
  }
}

โš ๏ธ Warning: Full automation gives AI complete control over debugging. Not recommended for production debugging or untrusted code.


๐Ÿ“š Tool Reference

All Debugssy tools organized by category and safety level:

๐ŸŸข Read-Only Tools (Safest)

ToolDescriptionAvailable In
get_debug_stateCheck if debugger is running/pausedBoth modes
get_variablesRead variable values at current pointBoth modes
get_call_stackView execution call stackBoth modes
get_threadsList all threadsBoth modes
get_console_outputRead debug console outputBoth modes
list_breakpointsShow all active breakpointsBoth modes

Why safe: Cannot modify code, change execution, or execute expressions. Read-only access to what's visible in VS Code debugger UI.


๐ŸŸก Breakpoint Management Tools

ToolDescriptionRisk Level
set_breakpointCreate breakpoints (with conditions)๐ŸŸก Low
remove_breakpointRemove specific breakpoint๐ŸŸก Low
toggle_breakpointEnable/disable breakpoint๐ŸŸก Low
remove_all_breakpointsClear all breakpoints๐ŸŸก Low

Why generally safe: Only affects debugging, not your actual code. Easy to undo manually via VS Code UI.


๐ŸŸ  Code Execution Tools

ToolDescriptionSafety Features
evaluate_expressionEvaluate expressions in debug contextโœ… Built-in validation with user approval for unsafe operations

Safety: Expressions are validated for side effects. Safe operations (variable access, arithmetic) run automatically. Dangerous operations (function calls, assignments) require your approval via elicitation.

Expression Validation Levels

Configure how strictly expressions are validated via debugssy.expressionValidationLevel:

Validation LevelWhat Requires ApprovalWhat Runs AutomaticallyUse Case
strict๐Ÿ”ด Critical
๐ŸŸ  High
๐ŸŸก Medium
๐ŸŸข Low
โœ… Only safe built-ins
โœ… Variable access
โœ… Arithmetic
Maximum security, high interruption
moderate โญ Default๐Ÿ”ด Critical
๐ŸŸ  High
๐ŸŸก Medium
โœ… Safe built-ins
โœ… Variable access
โœ… Arithmetic
โœ… Getter methods
Balanced security/usability
permissive๐Ÿ”ด Critical
๐ŸŸ  High
โœ… Safe built-ins
โœ… Variable access
โœ… Arithmetic
โœ… Getter methods
โœ… User functions
Low interruption, experienced users
disabled(Nothing)โš ๏ธ EverythingNot recommended, trusted environments only

Risk Levels Explained:

RiskExamplesWhy It's Risky
๐Ÿ”ด Criticalfs.unlink(), process.exit(), fetch()Can modify files, exit app, make network requests
๐ŸŸ  Higharr.push(), x = 5, eval()Modifies state, can mask bugs or cause unexpected behavior
๐ŸŸก MediummyFunction(), customUtil()User-defined functions may have side effects
๐ŸŸข LowgetUser(), isValid(), hasPermission()Getter patterns, typically read-only

Example configuration:

{
  "debugssy.expressionValidationLevel": "moderate"
}

Learn more: See EXPRESSION_VALIDATION_GUIDE.md


๐Ÿ”ต Execution Control Tools (Mode-Aware)

Behavior changes based on automation mode:

ToolAssisted ModeFull Automation Mode
continuePrompts you to click in VS Code UIโ–ถ๏ธ Executes automatically
step_overPrompts you to click in VS Code UIโ–ถ๏ธ Executes automatically
step_intoPrompts you to click in VS Code UIโ–ถ๏ธ Executes automatically
step_outPrompts you to click in VS Code UIโ–ถ๏ธ Executes automatically
pausePrompts you to click in VS Code UIโ–ถ๏ธ Executes automatically
restartPrompts you to click in VS Code UIโ–ถ๏ธ Executes automatically
stop_debuggingStops the sessionStops the session

๐Ÿ”ด Full Automation Only Tools

ToolDescriptionAvailability
start_debuggingStart debug session programmaticallyOnly in full mode
wait_for_breakpointBlock until execution pausesOnly in full mode

Why restricted: These tools give AI complete control over debugging. Only visible when automationLevel is set to "full".


๐Ÿ›ก๏ธ Security Best Practices

โœ… Do's

  • โœ… Start with Level 1 (read-only) and add tools as needed
  • โœ… Use assisted mode by default - You maintain control
  • โœ… Trust the built-in validation - Expression validator protects against unsafe code
  • โœ… Test with simple queries first - "What's the value of x?"
  • โœ… Review allowlist periodically - Remove unused tools

โŒ Don'ts

  • โŒ Don't allowlist all tools blindly - Only add what you need
  • โŒ Don't use full automation for production - Too risky
  • โŒ Don't disable expression validation - Keep expressionValidationLevel at moderate
  • โŒ Don't expose remote access - Server is localhost-only by design

๐Ÿ”’ Additional Security Layers

Debugssy has multiple security layers regardless of allowlist:

LayerProtection
NetworkLocalhost-only binding (127.0.0.1)
OriginOrigin header validation prevents DNS rebinding
ProtocolMCP version validation
SessionsCryptographic UUIDs
ExpressionsMulti-level validation with elicitation
InputZod schema validation for all parameters

Learn more: See MCP_COMPLIANCE.md for complete security details


๐Ÿ”ง Troubleshooting

Tools Not Working?

โœ“ Check server is running
curl http://localhost:3000/health

Expected response:

{
  "status": "ok",
  "server": "debugssy-mcp",
  "version": "1.2.0",
  "transportInitialized": true
}

If it fails:

  1. Check VS Code Output panel: View โ†’ Output โ†’ Debugssy
  2. Restart VS Code
  3. Verify extension is installed
โœ“ Verify port configuration

Check VS Code settings match your allowlist config:

// In VS Code settings.json
"debugssy.mcp.port": 3000  // Should match your MCP client config

Common issue: Using port 3001 in settings but 3000 in allowlist.

โœ“ Check automation mode

Some tools only work in specific modes:

// In VS Code settings.json
"debugssy.automationLevel": "assisted"  // or "full"
ToolRequired Mode
start_debuggingFull only
wait_for_breakpointFull only
All othersBoth modes
โœ“ Test incrementally

Step 1: Start with ONE safe tool:

{
  "allowlist": ["debugssy:get_debug_state"]
}

Step 2: Verify it works without approval prompts

Step 3: Add more tools one at a time

Step 4: If a tool stops working, you know which one caused the issue

โœ“ Expression validation too strict or too lenient?

Adjust the validation level in VS Code settings:

// In VS Code settings.json
"debugssy.expressionValidationLevel": "moderate"  // strict, moderate, permissive, or disabled

If you're getting too many approval prompts:

  • moderate โ†’ permissive (allows user functions automatically)
  • Check which risk level is triggering prompts (shown in approval message)

If expressions aren't being validated enough:

  • moderate โ†’ strict (asks approval even for getter methods)

Understanding what gets validated:

LevelAsks Approval ForRuns Automatically
strictCritical, High, Medium, LowOnly safe built-ins
moderate โญCritical, High, MediumSafe built-ins + getter methods
permissiveCritical, HighSafe built-ins + getters + user functions
disabledNothingEverything (not recommended)

See the Expression Validation Levels section for details on risk levels.


๐ŸŽ“ Quick Decision Guide

Not sure which configuration to use? Answer these questions:

1. Choose Your Automation Mode (VS Code Setting)

ModeSettingWho Controls Debugging?
Assisted โญ"debugssy.automationLevel": "assisted" (default)You control via VS Code UI (F5, F10, F11)
Full"debugssy.automationLevel": "full"AI controls everything automatically

2. Choose Your Allowlist Level (MCP Client Config)

What's your goal?

  • Just understand bugs โ†’ Level 1 (Read-only tools only)
  • Interactive debugging โ†’ Level 2 (Add breakpoints + expressions)
  • Fully automated sessions โ†’ Level 3 (Requires full mode + all tools)

How much control do you want?

  • Full control (you click buttons) โ†’ Level 1 or 2 with assisted mode
  • Let AI drive โ†’ Level 3 with full mode

Is this production code?

  • Yes โ†’ Level 1 only (safest, read-only)
  • No โ†’ Any level based on your comfort

How much do you trust your AI?

  • Still learning โ†’ Level 1 (read-only)
  • Trust for guided help โ†’ Level 2 (breakpoints allowed)
  • Complete trust โ†’ Level 3 (full automation)

3. Choose Your Expression Validation Level

In VS Code settings (debugssy.expressionValidationLevel):

  • Maximum security, don't mind approvals โ†’ strict
  • Balanced (recommended) โ†’ moderate โญ
  • Experienced user, minimal interruption โ†’ permissive
  • Fully trusted environment only โ†’ disabled โš ๏ธ

๐Ÿ“š Additional Resources


๐Ÿ’ฌ Need Help?


Happy debugging! ๐Ÿ›โ†’โœ…

Made with โค๏ธ for developers who want smarter workflows