open-devtools
v0.5.2
Published
MCP server providing LSP diagnostics, linting, and code formatting - Complete developer tooling for AI assistants
Maintainers
Readme
open-devtools
All-in-one MCP server providing LSP diagnostics, linting, and code formatting for AI coding assistants.
What is this?
open-devtools is a comprehensive Model Context Protocol (MCP) server that brings professional developer tooling to AI assistants like Claude Desktop, Cline, and other MCP-compatible applications. It combines:
- LSP Diagnostics - Real-time errors, warnings, and hints from language servers
- Linting - Code quality checks via ESLint, Biome, and other linters
- Formatting - Auto-format code with industry-standard tools
Features
- 🔍 9 LSP Servers - ESLint, Biome, TypeScript, Python, Go, Ruby, Rust, C#, Java
- 🎨 11 Formatters - Prettier, Biome, gofmt, ruff, rubocop, clang-format, and more
- ⚡ 40+ File Extensions - Support for all major programming languages
- 🚀 Zero Configuration - Works out of the box with auto-detection
- ⚙️ Fully Configurable - Customize servers, formatters, and file extensions
- 🔧 3 MCP Tools -
get_diagnostics,format_file,lint_file
Supported Languages
LSP Servers (Diagnostics & Linting)
| Language | Server | Extensions | Features |
|----------|--------|------------|----------|
| JavaScript/TypeScript | ESLint | .js, .jsx, .ts, .tsx, .vue, .mjs, .cjs | Linting, code quality |
| JavaScript/TypeScript/JSON | Biome | .js, .jsx, .ts, .tsx, .json, .jsonc | Fast linting & formatting |
| TypeScript/JavaScript | TypeScript | .ts, .tsx, .js, .jsx, .mjs, .cjs, .mts, .cts | Type checking, intellisense |
| Python | Pyright | .py, .pyi | Type checking, imports |
| Go | gopls | .go | Go tooling |
| Ruby | ruby-lsp | .rb, .rake | Ruby analysis |
| Rust | rust-analyzer | .rs | Rust diagnostics |
| C# | OmniSharp | .cs | C# analysis |
| Java | JDTLS | .java | Java diagnostics |
Formatters
| Formatter | Languages | Extensions |
|-----------|-----------|------------|
| Prettier | JS/TS, HTML, CSS, Markdown, JSON, YAML | 20+ extensions |
| Biome | JS/TS, JSON | Same as Prettier |
| gofmt | Go | .go |
| ruff | Python | .py, .pyi |
| rubocop | Ruby | .rb, .rake, .gemspec, .ru |
| standardrb | Ruby | .rb, .rake, .gemspec, .ru |
| clang-format | C/C++ | .c, .cpp, .h, etc. |
| ktlint | Kotlin | .kt, .kts |
| zig fmt | Zig | .zig, .zon |
| mix format | Elixir | .ex, .exs, etc. |
| htmlbeautifier | ERB/HTML | .erb, .html.erb |
Installation
Prerequisites
Bun Runtime Required: This package uses Bun as its runtime. Install it first:
curl -fsSL https://bun.sh/install | bashImportant: The MCP server does not auto-install dependencies. You must manually install the language servers and formatters you need.
Auto-installed (via bunx): The following tools download automatically on first use:
- ESLint language server (requires ESLint installed in your project)
- TypeScript language server
- Biome language server and formatter (formatter requires
biome.jsonconfig) - Prettier formatter (requires Prettier in your project's
package.json)
Install other tools you'll use:
# JavaScript/TypeScript - install in your project for ESLint/Prettier to work
npm install --save-dev eslint prettier
# Python
pip install pyright ruff
# Go
go install golang.org/x/tools/gopls@latest
# Ruby
gem install ruby-lsp rubocop standardrb
# Rust
rustup component add rust-analyzer
# C/C++, Kotlin, Zig, Elixir (install as needed)
# See language-specific documentationUsing with Claude Desktop
Add to your Claude Desktop configuration:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"open-devtools": {
"command": "bunx",
"args": ["--bun", "open-devtools"]
}
}
}Note: This package requires Bun runtime. If you don't have Bun installed, run:
curl -fsSL https://bun.sh/install | bash
Using with Cline (VS Code)
{
"mcpServers": {
"open-devtools": {
"command": "bunx",
"args": ["--bun", "open-devtools"]
}
}
}Using with Amp
{
"amp.mcpServers": {
"open-devtools": {
"command": "bunx",
"args": ["--bun", "open-devtools"]
}
}
}Available Tools
get_diagnostics
Get LSP diagnostics (errors, warnings, hints) for a file. Automatically starts the appropriate language server if needed.
Parameters:
filePath(string, required) - Absolute path to the file
Example:
Diagnostics for /path/to/file.ts:
ERROR [10:5] Cannot find name 'foo'
WARN [15:12] 'bar' is declared but never used
INFO [20:1] File is a CommonJS moduleformat_file
Format a file using the appropriate formatter. Automatically detects the formatter based on file extension and project configuration.
Parameters:
filePath(string, required) - Absolute path to the file
Example:
Successfully formatted /path/to/file.ts using prettierlint_file
Get linting information for a file.
Note: Most linting is handled by LSP servers through get_diagnostics (ESLint, Biome, etc.). Use get_diagnostics for comprehensive linting diagnostics.
Configuration
Configure LSP servers and formatters using environment variables:
{
"mcpServers": {
"open-devtools": {
"command": "npx",
"args": ["-y", "open-devtools"],
"env": {
"OPEN_DEVTOOLS_LSP_CONFIG": "{\"eslint\":{\"disabled\":false}}",
"OPEN_DEVTOOLS_FORMATTER_CONFIG": "{\"prettier\":{\"disabled\":false}}"
}
}
}
}LSP Configuration Structure
{
"server-name": {
"disabled": false, // Set to true to disable
"command": ["cmd", "args"], // Override command
"extensions": [".ext"], // Override file extensions
"env": { // Environment variables
"VAR": "value"
},
"initialization": {} // LSP initialization options
}
}Formatter Configuration Structure
{
"formatter-name": {
"disabled": false, // Set to true to disable
"command": ["cmd", "$FILE"], // Override command ($FILE placeholder)
"extensions": [".ext"], // Override file extensions
"environment": { // Environment variables
"VAR": "value"
}
}
}Available Server and Formatter Names
LSP Servers:
eslint- JavaScript/TypeScript lintingbiome- Fast JS/TS/JSON linting & formattingtypescript- TypeScript type checkingpyright- Python type checkinggopls- Go language serverruby-lsp- Ruby language serverrust-analyzer- Rust language serveromnisharp- C# language serverjdtls- Java language server
Formatters:
prettier- Multi-language formatterbiome- Fast JS/TS/JSON formattergofmt- Go formatterruff- Python formatterrubocop- Ruby formatter with auto-correctstandardrb- Ruby standard style formatterclang-format- C/C++ formatterktlint- Kotlin formatterzig- Zig formattermix- Elixir formatterhtmlbeautifier- ERB/HTML formatter
Configuration Examples
Disable Built-in Servers/Formatters
{
"mcpServers": {
"open-devtools": {
"command": "npx",
"args": ["-y", "open-devtools"],
"env": {
"OPEN_DEVTOOLS_LSP_CONFIG": "{\"typescript\":{\"disabled\":true}}",
"OPEN_DEVTOOLS_FORMATTER_CONFIG": "{\"prettier\":{\"disabled\":true}}"
}
}
}
}Override File Extensions
{
"env": {
"OPEN_DEVTOOLS_LSP_CONFIG": "{\"biome\":{\"extensions\":[\".ts\",\".tsx\",\".js\"]}}",
"OPEN_DEVTOOLS_FORMATTER_CONFIG": "{\"prettier\":{\"extensions\":[\".js\",\".ts\"]}}"
}
}Add Custom LSP Server
{
"env": {
"OPEN_DEVTOOLS_LSP_CONFIG": "{\"lua-lsp\":{\"command\":[\"lua-language-server\",\"--stdio\"],\"extensions\":[\".lua\"]}}"
}
}Add Custom Formatter
{
"env": {
"OPEN_DEVTOOLS_FORMATTER_CONFIG": "{\"stylua\":{\"command\":[\"stylua\",\"$FILE\"],\"extensions\":[\".lua\"]}}"
}
}Configure with Environment Variables
{
"env": {
"OPEN_DEVTOOLS_LSP_CONFIG": "{\"eslint\":{\"env\":{\"NODE_ENV\":\"development\"}}}"
}
}Multiple Configurations
{
"env": {
"OPEN_DEVTOOLS_LSP_CONFIG": "{\"typescript\":{\"disabled\":true},\"pyright\":{\"disabled\":true},\"eslint\":{\"env\":{\"DEBUG\":\"true\"}}}"
}
}How It Works
- Auto-Detection: Detects language servers and formatters based on file extension and project configuration
- Smart Caching: Reuses language server instances across multiple requests to the same project
- Project-Aware: Finds project roots (e.g.,
package.json,tsconfig.json,go.mod) automatically - Config-Driven: Respects your project's formatter configs (
.prettierrc,biome.json, etc.)
Troubleshooting
No diagnostics/linting
- Ensure the language server is installed (
which typescript-language-server, etc.) - Check that your file is part of a valid project
- Some servers require config files (e.g.,
tsconfig.jsonfor TypeScript)
Formatter not found
Install the formatter for your language. See Installation.
ESLint not working
- Install ESLint language server:
npm install -g vscode-eslint-language-server - Ensure ESLint is configured in your project (
.eslintrc.*oreslint.config.js) - Make sure ESLint is installed in your project:
npm install --save-dev eslint
Contributing
Contributions are welcome! Please follow these steps:
- Fork the repository: https://github.com/thenamankumar/open-devtools
- Create a feature branch:
git checkout -b feature/your-feature - Make your changes and add tests
- Run tests:
bun test - Run typecheck:
bun run typecheck - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin feature/your-feature - Submit a pull request
Development Setup
# Clone the repository
git clone https://github.com/thenamankumar/open-devtools.git
cd open-devtools
# Install dependencies
bun install
# Run tests
bun test
# Run typecheck
bun run typecheck
# Run in development mode
bun run devAdding New LSP Servers or Formatters
Use the configuration system to test custom servers/formatters before submitting a PR. See the Configuration section for examples.
Issues & Support
- Bug Reports: GitHub Issues
- Feature Requests: GitHub Issues
- Discussions: GitHub Discussions
License
MIT License - see LICENSE file for details
Copyright (c) 2025 Naman Kumar
Related Projects
- Model Context Protocol - Protocol specification
- MCP Servers - Official MCP servers collection
Acknowledgments
This project combines functionality from various language servers and formatters. Thanks to all the maintainers of:
- TypeScript, ESLint, Biome, Prettier
- Pyright, gopls, rust-analyzer, ruby-lsp
- And all other tools integrated into this server
Star ⭐ this repo if you find it useful!
