Thank you for your interest in contributing to Claude Lens! This document provides guidelines and information for contributors.
- Node.js 18+
- pnpm 8+
- Chrome browser (for testing)
# Clone the repository
git clone https://github.com/melon-hub/claude-lens.git
cd claude-lens
# Install dependencies
pnpm install
# Build all packages
pnpm run buildDesktop App:
cd packages/desktop
pnpm run devVS Code Extension:
- Open
packages/vscode-extensionin VS Code - Press F5 to launch Extension Development Host
- Run command: "Claude Lens: Open Browser Panel"
MCP Server (standalone):
cd packages/mcp-server
pnpm run build
node dist/index.js| Package | Description | Key Files |
|---|---|---|
core |
Browser adapters, security, bridge (UI-agnostic) | cdp-adapter.ts, bridge/index.ts |
desktop |
Electron app with embedded browser | main/index.ts, renderer/main.ts |
mcp-server |
MCP tools for Claude Code | index.ts |
vscode-extension |
VS Code extension | extension.ts |
desktop → core
vscode-extension → core
mcp-server → core (via bridge)
The core package must remain UI-agnostic - no Electron or VS Code dependencies.
- TypeScript: Strict mode enabled
- Linting: ESLint with TypeScript rules
- Formatting: Consistent indentation (2 spaces)
- MCP Handlers: Never throw exceptions - return
{ isError: true }format - Input Validation: Use Zod schemas for all MCP tool inputs
- Security: All URLs validated through
isAllowedUrl()(localhost only) - Secrets: Console output passed through
redactSecrets()
- Check existing issues for related discussions
- For new features, open an issue first to discuss the approach
- Fork the repository and create a feature branch
- Make your changes
- Run type checking:
pnpm typecheck - Run linting:
pnpm lint - Build all packages:
pnpm run build - Test your changes manually
Currently, the project uses manual integration testing:
- Desktop: Launch app, verify MCP tools work
- VS Code Extension: Launch in Extension Development Host
- MCP Server: Test with Claude Code in terminal
- Branch naming:
feature/descriptionorfix/description - Commit messages: Use conventional commits format
feat: add new featurefix: resolve bugdocs: update documentationchore: maintenance tasks
- PR description: Clearly explain what changes were made and why
- Link issues: Reference related issues with
Fixes #123
- Code builds without errors (
pnpm run build) - Type checking passes (
pnpm typecheck) - Linting passes (
pnpm lint) - Changes are documented if needed
- No hardcoded paths or secrets
User clicks element in Browser
↓
CDP (Chrome DevTools Protocol)
↓
CDPAdapter captures element info
↓
Bridge Server (HTTP on :9333)
↓
MCP Server queries via Bridge Client
↓
Claude Code receives context
- HTTP Bridge: MCP server runs in separate process, HTTP enables cross-process communication
- Playwright via CDP: Playwright connected via
connectOverCDP()to Electron's BrowserView provides full automation (25+ tools) while controlling the embedded browser - Core as shared library: Keeps browser logic separate from UI implementations
- Issues: Open a GitHub issue for bugs or feature requests
- Discussions: Use GitHub Discussions for questions
By contributing, you agree that your contributions will be licensed under the MIT License.