@goobits/codebuddy
v1.0.0
Published
MCP server for accessing LSP functionality
Maintainers
Readme
🔗 codebuddy
MCP server that bridges Language Server Protocol functionality to AI coding assistants
✨ Key Features
- 🎯 Symbol Navigation - Go to definition and find references with intelligent position resolution
- 🔧 Safe Refactoring - Rename symbols and files across entire codebases with confidence
- 🧠 Code Intelligence - Hover info, completions, diagnostics, and semantic analysis
- 🌐 Universal Language Support - Works with any LSP-compatible server (TypeScript, Python, Go, Rust, etc.)
- 🤖 AI-Optimized - Robust symbol resolution that handles imprecise line/column numbers from LLMs
- ⚡ Zero Configuration - Works out of the box with TypeScript, configurable for other languages
🚀 Quick Start
# Clone and build locally
git clone https://github.com/ktnyt/codebuddy.git
cd codebuddy
bun install
bun run build
# Smart setup with auto-detection
node dist/index.js init
# Check status of language servers
node dist/index.js status
# Fix any missing language servers
node dist/index.js fix📚 MCP Integration
# Add to your MCP client configuration (e.g., Claude Code)
{
"mcpServers": {
"codebuddy": {
"command": "node",
"args": ["/path/to/codebuddy/dist/index.js"],
"cwd": "/path/to/your/project"
}
}
}🛠️ Language Server Setup
# TypeScript/JavaScript
# Works out of the box via npx. Optional explicit install:
# npm install -g typescript-language-server typescript
# Python
pip install "python-lsp-server[all]"
# Go
go install golang.org/x/tools/gopls@latest
# Rust
rustup component add rust-analyzer
# View configuration and status
codebuddy status⚙️ Configuration
# Smart setup with auto-detection
node dist/index.js init
# Show current configuration
node dist/index.js config --show
# Manual configuration (creates .codebuddy/config.json)
cat > .codebuddy/config.json << 'EOF'
{
"servers": [
{
"extensions": ["py", "pyi"],
"command": ["pylsp"],
"restartInterval": 30
},
{
"extensions": ["js", "ts", "jsx", "tsx"],
"command": ["npx", "--", "typescript-language-server", "--stdio"]
}
]
}
EOF📖 Documentation
- Full API Reference - Complete tool documentation with examples
- Language Setup Guide - Installation for 15+ languages
- Configuration Reference - Advanced settings and options
- Troubleshooting Guide - Common issues and solutions
🔗 Related Projects
- Model Context Protocol - Protocol specification and ecosystem
- Language Server Protocol - LSP specification and implementations
🧪 Development
# Install dependencies
bun install
# Run in development mode
bun run dev
# Run tests
bun run test:fast # Quick unit tests (~8s)
bun run test:slow # Full integration tests
bun run test:ci # All tests for CI
# Adaptive test runner for slow systems
node test-runner.cjs # Auto-detects system capabilities
TEST_SHARED_SERVER=true bun test # Use shared server for faster tests
# Code quality
bun run lint # Check issues
bun run format # Format code
bun run typecheck # Type checking📝 License
MIT - see LICENSE for details
💡 Support
- GitHub Issues - Bug reports and feature requests
- Discussions - Questions and community support
