Thank you for your interest in contributing to mcp-debugger! We welcome contributions from the community and are grateful for your support.
- Code of Conduct
- Getting Started
- Development Workflow
- Code Style
- Testing
- Commit Messages
- Pull Request Process
- Project Structure
- Questions
This project adheres to a Code of Conduct that all contributors are expected to follow. Please be respectful and professional in all interactions.
- Node.js 18+ (20.x recommended)
- pnpm (required —
workspace:*protocol needs pnpm, not npm) - Python 3.7+ (for debugging Python code)
- Go 1.18+ and Delve (for debugging Go code, optional)
- Rust toolchain (for debugging Rust code, optional — CodeLLDB auto-downloads during install)
- JDK 21+ (for debugging Java code, optional — JDI bridge compiles on first use; compile target code with
javac -gfor variable inspection) - Docker (optional, for containerized development)
- Git
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/mcp-debugger.git cd mcp-debugger - Add upstream remote:
git remote add upstream https://github.com/debugmcp/mcp-debugger.git
- Install dependencies:
pnpm install
- Build the project:
npm run build
-
Sync with upstream:
git fetch upstream git checkout main git merge upstream/main
-
Create a feature branch:
git checkout -b feature/your-feature-name # or git checkout -b fix/your-bug-fix -
Make your changes following our code style guidelines
-
Build and test:
npm run build npm test npm run lint -
Commit your changes using conventional commits (see below)
-
Push to your fork:
git push origin feature/your-feature-name
-
Create a Pull Request from your fork to our
mainbranch
IMPORTANT: Never commit personal information to the repository. This includes:
- Personal file paths (e.g.,
C:\path\to\or/path/to/) - Personal email addresses (project emails like
debug@sycamore.llcare okay) - Cloud storage paths with personal folders
- Any other personally identifiable information
We have a pre-commit hook that automatically checks for personal information patterns. If detected, your commit will be blocked with instructions on how to fix it.
When documenting or writing examples, always use generic paths like:
/path/to/projectC:\path\to\project~/workspace/project
You can manually run the privacy check:
# Check staged files (what pre-commit does)
npm run check:personal-paths
# Check all files in the repository
npm run check:all-personal-pathsWe use ESLint and Prettier to maintain consistent code style.
# Run ESLint
npm run lint
# Fix auto-fixable issues
npm run lint:fix
# Format code with Prettier (if configured)
npm run format- Use TypeScript for all new code
- Follow the existing code structure and patterns
- Write self-documenting code with clear variable names
- Add JSDoc comments for public APIs
- Keep functions small and focused
- Use dependency injection patterns (see existing code)
We recommend configuring your editor to:
- Format on save using Prettier
- Show ESLint warnings/errors inline
- Use the project's TypeScript version
Example VS Code settings:
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"typescript.tsdk": "node_modules/typescript/lib"
}The project includes a comprehensive test suite. Please ensure all tests pass before submitting a pull request. If you're adding a new feature, please include tests for it.
The project uses Vitest as its test runner:
# Run all tests
npm test
# Run specific test suites
npm run test:unit # Unit tests only
npm run test:integration # Integration tests only
npm run test:e2e # End-to-end tests only
# Run tests with coverage
npm run test:coverage
# Run a specific test file
npx vitest run tests/unit/session/session-manager.test.tsOur tests follow a three-tiered approach:
- Unit Tests: Test individual components in isolation.
- Focus: Session management, debugger provider implementations, utility functions.
- Integration Tests: Test interactions between components.
- Focus: Complete debugging workflow tests, DAP message sequencing.
- End-to-End (E2E) Tests: Test the full system with actual
debugpyservers.- Focus: Full debugging scenarios from MCP request to
debugpyinteraction and back.
- Focus: Full debugging scenarios from MCP request to
- Write tests for all new features and bug fixes
- Aim for >90% code coverage
- Use descriptive test names that explain what is being tested
- Follow the AAA pattern: Arrange, Act, Assert
- Mock external dependencies appropriately
We follow the Conventional Commits specification:
<type>(<scope>): <subject>
<body>
<footer>
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, semicolons, etc.)refactor: Code refactoring without changing functionalityperf: Performance improvementstest: Adding or modifying testsbuild: Build system or dependency changesci: CI/CD configuration changeschore: Other changes that don't modify src or test files
feat(debugger): add support for conditional breakpoints
Added ability to set breakpoints with conditions that are evaluated
at runtime. This allows for more precise debugging workflows.
Closes #123fix(session): handle disconnect during stepping
Fixed race condition where disconnect during step operations
could leave the session in an invalid state.-
Before submitting:
- Ensure all tests pass
- Update documentation if needed
- Add tests for new functionality
- Run linting and fix any issues
- Update CHANGELOG.md if applicable
-
PR Guidelines:
- Use the PR template
- Link related issues
- Keep PRs focused on a single concern
- Write clear descriptions
- Add screenshots/demos for UI changes
-
Review Process:
- PRs require at least one review from @debugmcp
- Address all review comments
- Keep discussions professional and constructive
- Be patient - reviews may take a few days
-
After Approval:
- Squash commits if requested
- Ensure CI passes
- Maintainer will merge using "Squash and merge"
mcp-debugger/
├── packages/ # Monorepo workspace packages
│ ├── shared/ # Shared interfaces, types, and utilities
│ ├── adapter-python/ # Python debug adapter (debugpy)
│ ├── adapter-javascript/# JavaScript/Node.js adapter (js-debug)
│ ├── adapter-rust/ # Rust adapter (CodeLLDB)
│ ├── adapter-go/ # Go adapter (Delve)
│ ├── adapter-java/ # Java adapter (JDI bridge)
│ ├── adapter-mock/ # Mock adapter for testing
│ └── mcp-debugger/ # Self-contained CLI bundle (npx distribution)
├── src/ # Core server source code
│ ├── adapters/ # Adapter loading and registry
│ ├── cli/ # CLI commands and setup
│ ├── container/ # Dependency injection
│ ├── proxy/ # DAP proxy components
│ ├── session/ # Session management
│ └── utils/ # Utility functions
├── tests/ # Test files
│ ├── core/ # Core unit and integration tests
│ ├── adapters/ # Adapter-specific tests
│ ├── e2e/ # End-to-end tests
│ └── test-utils/ # Shared test utilities
├── examples/ # Example scripts
├── docs/ # Documentation
└── .github/ # GitHub templates and workflows
- Session Manager: Manages debugging session lifecycle
- DAP Proxy: Handles communication with debug adapters via DAP protocol
- Adapter Registry: Dynamically loads and manages language-specific adapters
- Adapter Policies: Language-specific behavior via policy pattern
- MCP Tools: Implements the 19 MCP protocol tools
To see mcp-debugger in action:
-
Build the project:
npm run build
-
Run with a demo script:
# Start the server in STDIO mode node dist/index.js stdio # Or start in SSE mode for web clients node dist/index.js sse -p 3001
-
Example debugging session:
- Create a debug session
- Set a breakpoint at line 10
- Start debugging swap_vars.py
- Step through and inspect variables
- See the bug and fix it!
- General questions: Open a Discussion
- Bug reports: Open an Issue
- Direct contact: debug@sycamore.llc
Thank you for contributing to mcp-debugger! 🙏