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
- How It Works
- Configuration Examples
- Tool Reference
- Troubleshooting
- Security Best Practices
โก Quick Start
Too long; didn't read? Copy one of these configs:
๐ข Safest (Recommended for most users)
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:
| Mode | Tools Exposed | You Control | AI Controls |
|---|---|---|---|
assisted (default) | Read-only + breakpoints + UI prompts | Start/stop debugging, step operations | Inspect state, set breakpoints |
full | All 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"
]
}
}
}
๐ต Level 2: Assisted Mode with Breakpoints (Recommended)
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)
| Tool | Description | Available In |
|---|---|---|
get_debug_state | Check if debugger is running/paused | Both modes |
get_variables | Read variable values at current point | Both modes |
get_call_stack | View execution call stack | Both modes |
get_threads | List all threads | Both modes |
get_console_output | Read debug console output | Both modes |
list_breakpoints | Show all active breakpoints | Both 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
| Tool | Description | Risk Level |
|---|---|---|
set_breakpoint | Create breakpoints (with conditions) | ๐ก Low |
remove_breakpoint | Remove specific breakpoint | ๐ก Low |
toggle_breakpoint | Enable/disable breakpoint | ๐ก Low |
remove_all_breakpoints | Clear all breakpoints | ๐ก Low |
Why generally safe: Only affects debugging, not your actual code. Easy to undo manually via VS Code UI.
๐ Code Execution Tools
| Tool | Description | Safety Features |
|---|---|---|
evaluate_expression | Evaluate 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 Level | What Requires Approval | What Runs Automatically | Use 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) | โ ๏ธ Everything | Not recommended, trusted environments only |
Risk Levels Explained:
| Risk | Examples | Why It's Risky |
|---|---|---|
| ๐ด Critical | fs.unlink(), process.exit(), fetch() | Can modify files, exit app, make network requests |
| ๐ High | arr.push(), x = 5, eval() | Modifies state, can mask bugs or cause unexpected behavior |
| ๐ก Medium | myFunction(), customUtil() | User-defined functions may have side effects |
| ๐ข Low | getUser(), 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:
| Tool | Assisted Mode | Full Automation Mode |
|---|---|---|
continue | Prompts you to click in VS Code UI | โถ๏ธ Executes automatically |
step_over | Prompts you to click in VS Code UI | โถ๏ธ Executes automatically |
step_into | Prompts you to click in VS Code UI | โถ๏ธ Executes automatically |
step_out | Prompts you to click in VS Code UI | โถ๏ธ Executes automatically |
pause | Prompts you to click in VS Code UI | โถ๏ธ Executes automatically |
restart | Prompts you to click in VS Code UI | โถ๏ธ Executes automatically |
stop_debugging | Stops the session | Stops the session |
๐ด Full Automation Only Tools
| Tool | Description | Availability |
|---|---|---|
start_debugging | Start debug session programmatically | Only in full mode |
wait_for_breakpoint | Block until execution pauses | Only 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
expressionValidationLevelatmoderate - โ Don't expose remote access - Server is localhost-only by design
๐ Additional Security Layers
Debugssy has multiple security layers regardless of allowlist:
| Layer | Protection |
|---|---|
| Network | Localhost-only binding (127.0.0.1) |
| Origin | Origin header validation prevents DNS rebinding |
| Protocol | MCP version validation |
| Sessions | Cryptographic UUIDs |
| Expressions | Multi-level validation with elicitation |
| Input | Zod 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:
- Check VS Code Output panel:
View โ Output โ Debugssy - Restart VS Code
- 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"
| Tool | Required Mode |
|---|---|
start_debugging | Full only |
wait_for_breakpoint | Full only |
| All others | Both 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:
| Level | Asks Approval For | Runs Automatically |
|---|---|---|
strict | Critical, High, Medium, Low | Only safe built-ins |
moderate โญ | Critical, High, Medium | Safe built-ins + getter methods |
permissive | Critical, High | Safe built-ins + getters + user functions |
disabled | Nothing | Everything (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)
| Mode | Setting | Who 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
fullmode + all tools)
How much control do you want?
- Full control (you click buttons) โ Level 1 or 2 with
assistedmode - Let AI drive โ Level 3 with
fullmode
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
- README.md - Complete tool documentation and API reference
- MCP_COMPLIANCE.md - Security implementation details
- EXPRESSION_VALIDATION_GUIDE.md - Expression safety guide
- Model Context Protocol Specification - Official MCP docs
๐ฌ Need Help?
- Issues or bugs: Open an issue
- Questions: Check README.md FAQ
- Security concerns: See MCP_COMPLIANCE.md
Happy debugging! ๐โโ
Made with โค๏ธ for developers who want smarter workflows