Caution
This project is deprecated but still functional. Starting from version 2025.2, JetBrains IDEs (WebStorm, IntelliJ IDEA, PyCharm, etc.) now include a built-in MCP server that provides native integration with external clients like Claude Desktop, Cursor, VS Code, and others.
| IDE Version | Recommended Solution | Link |
|---|---|---|
| 2025.2+ | Built-in MCP server | Official Documentation |
| Earlier versions | JetBrains MCP plugin | Plugin Marketplace |
- Direct IDE control without external tools
- 25+ tools comprehensive tool set
- Better performance and reliability
- Official support from JetBrains
[!IMPORTANT] The native
get_file_problemstool requires settingerrorsOnly: falsefor similar functionality to this project. Theget_project_problemstool only returns critical errors.
A Model Context Protocol (MCP) server that provides JetBrains IDE code inspections with automatic IDE selection and a unified inspection profile that works across all file types.
Tip
📚 Full Documentation Available: Visit our comprehensive docs at josedacosta.github.io/mcp-jetbrains-code-inspections
Note
Get started in under 2 minutes!
# Clone the repository
git clone https://github.com/josedacosta/mcp-jetbrains-code-inspections.git
cd mcp-jetbrains-code-inspections
# Install and build
yarn install && yarn build
# Test with MCP Inspector
yarn inspectThen configure your MCP client (Claude Desktop, Cursor, etc.) with the configuration below.
|
|
Note
Prerequisites: Node.js ≥20 and a JetBrains IDE installed
-
Install dependencies:
yarn install
-
Build the server:
yarn build
-
Configure MCP (see ⚙️ Configuration section below)
Tip
Use yarn inspect after installation to test the server with the MCP Inspector
The server provides three types of MCP features:
- get_jetbrains_code_inspections: Runs code inspections on specified files or directories
- analyze-project: Analyze a project for code quality issues
- check-file: Check a specific file for issues
- fix-issues: Get suggestions to fix detected issues
- inspection://profiles: List of available inspection profiles
- inspection://config: Current MCP server configuration
- inspection://ides: List of detected JetBrains IDEs on the system
Tip
For development, use yarn dev which includes hot-reload for faster iteration.
# 🔄 Run in development mode (with hot-reload)
yarn dev
# 📦 Run the built server (production)
yarn start
# 🧪 Use MCP Inspector for interactive testing
yarn inspectThe code inspections server can be configured through environment variables in .mcp.json:
{
"mcpServers": {
"mcp-jetbrains-code-inspections": {
"command": "node",
"args": ["./dist/index.js"],
"env": {
"EXCLUDE_INSPECTIONS": "SpellCheckingInspection"
}
}
}
}Important
The tool accepts only one parameter from the LLM:
| Parameter | Type | Description | Required | Example |
|---|---|---|---|---|
path |
string |
File or directory path to inspect | ✅ Yes | "src/index.ts" or "./src" |
Note
All configurations are managed through environment variables in .mcp.json. These settings control how the inspection server operates.
📑 Available Environment Variables (click to expand)
| Environment Variable | Type | Description | Default |
|---|---|---|---|
FORCE_INSPECT_PATH |
string |
Force specific IDE inspect tool (disables auto-detection) | Auto-detected |
FORCE_PROJECT_ROOT |
string |
Force project root directory (disables auto-detection) | Auto-detected |
FORCE_PROFILE_PATH |
string |
Force inspection profile path (disables defaults) | Project defaults |
INSPECTION_TIMEOUT |
number |
Maximum analysis time (ms) | 120000 |
EXCLUDE_INSPECTIONS |
string |
Comma-separated inspection codes to exclude | SpellCheckingInspection |
ONLY_INSPECTIONS |
string |
Only include these inspection codes | - |
RESPONSE_FORMAT |
'markdown'|'json' |
Output format for diagnostics | 'markdown' |
DEBUG |
boolean |
Enable debug logging | false |
Tip
📚 For detailed configuration options, see Configuration Documentation.
yarn test:mcpThis runs an interactive test that allows you to test the MCP server functionality directly.
# Launch the inspector (no installation needed)
yarn inspect
# Or for development mode with hot reload
yarn inspect:devThe inspector opens a web interface where you can:
- View available tools, prompts, and resources
- Test get_jetbrains_code_inspections tool interactively
- Use pre-configured prompts for common tasks
- Access server resources (profiles, config, detected IDEs)
- See requests/responses in real-time
Note
The server intelligently detects and selects the most appropriate JetBrains IDE for your project.
Priority order:
- IntelliJ IDEA - Ultimate Java/Kotlin IDE
- WebStorm - JavaScript/TypeScript specialist
- PyCharm - Python development
- PhpStorm - PHP development
- GoLand - Go programming
- Rider - .NET development
- CLion - C/C++ development
- RubyMine - Ruby/Rails
- DataGrip - Database management
- DataSpell - Data science
- AppCode - iOS/macOS development
Tip
Use FORCE_INSPECT_PATH to override auto-detection and specify a particular IDE.
Important
Key Innovation: The server uses temporary isolated configuration directories with -Didea.config.path and -Didea.system.path JVM properties. This allows inspections to run even when the IDE is already open!
Benefits:
- ✅ No IDE conflicts
- ✅ Parallel execution support
- ✅ Clean, isolated analysis
- ✅ No interference with your active IDE sessions
🔎 View Example Output (click to expand)
🔍 Searching for available JetBrains IDE inspect tools...
Following priority order: IntelliJ IDEA > WebStorm > PyCharm > PhpStorm > GoLand > ...
✅ WebStorm - Found and selected!
Path: /Applications/WebStorm.app/Contents/bin/inspect.sh
Note: Using isolated configuration - works even if IDE is already running
📊 Analysis Results:
⚠️ Warning: Unused variable 'config' at line 42
❌ Error: Missing semicolon at line 156
💡 Info: Consider using const instead of let at line 78Warning
This error occurs when no JetBrains IDE can be found in standard installation locations.
Solutions:
- ✅ Verify that a JetBrains IDE is installed in
/Applications/or~/Applications/ - ✅ Ensure the
inspect.shfile is executable - ✅ Use
FORCE_INSPECT_PATHenvironment variable to specify the exact path
Caution
Without an inspection profile, the tool cannot analyze your code properly.
Steps to fix:
- Open the project in a JetBrains IDE
- Go to Settings → Inspections
- Configure and save an inspection profile
- Alternatively, use
FORCE_PROFILE_PATHto specify a custom profile
Tip
Default timeout is 120 seconds. Large projects may need more time.
Solutions:
- 🔄 Increase timeout: Set
INSPECTION_TIMEOUT=300000(5 minutes) - 📊 Check that the IDE is not currently indexing
- 📦 For very large projects, consider inspecting specific directories
Note
✅ This is no longer an issue! The server automatically handles this by using isolated configuration directories, allowing inspections to run even when the IDE is already open.
Tip
🌐 Visit our comprehensive documentation at josedacosta.github.io/mcp-jetbrains-code-inspections
Available sections:
| Section | Description |
|---|---|
| 🏁 Getting Started | Installation and prerequisites |
| ⚙️ Configuration | Environment variables and profiles |
| 📖 Usage Guide | Basic and advanced usage |
| 🔬 Technical Details | Architecture and IDE detection |
| 💡 Guides | Best practices and troubleshooting |
Tip
Learn more about JetBrains code inspections and the command-line inspector:
| Resource | Description |
|---|---|
| 📘 Code Inspection Overview | Learn about code inspections, severity levels, and inspection profiles |
| 🔧 Command-Line Code Inspector | Detailed documentation on using the inspect.sh/inspect.bat tool |
Note
We welcome contributions! Please see our Contributing Guide for full details.
What we're looking for:
- 🐛 Bug fixes and issue reports
- ✨ New features and enhancements
- 📝 Documentation improvements
- 🧪 Test coverage expansion
- 🌍 Language/IDE support
Important
We follow Conventional Commits and use GitHub Flow.
# 1. Fork and clone the repository
git clone https://github.com/YOUR-USERNAME/mcp-jetbrains-code-inspections.git
# 2. Create a feature branch
git checkout -b feat/amazing-feature
# 3. Make your changes and commit
git commit -m 'feat(scope): add amazing feature'
# 4. Push to your fork
git push origin feat/amazing-feature
# 5. Open a Pull RequestTip
See CONTRIBUTING.md for branch naming, commit message standards, and PR guidelines.
🔍 SEO Keywords (click to expand)
MCP & AI Integration:
MCP server • Model Context Protocol • Claude Code integration • MCP JetBrains • Claude AI code inspection • MCP tools • Claude Code extensions • MCP inspector • Anthropic MCP • Claude.ai code analysis • LLM code analysis • AI code review
JetBrains IDEs:
JetBrains code inspection • WebStorm MCP • IntelliJ IDEA MCP integration • PyCharm MCP server • PhpStorm code inspection • GoLand analysis • Rider code quality • CLion inspection • RubyMine linter • DataGrip SQL analysis • Android Studio inspection • RustRover analysis
Technical Terms:
JetBrains command line inspector • inspect.sh • automated code inspection • JetBrains unified profile • IDE code diagnostics • static code analysis • inspection severity levels • inspection profiles • Node.js MCP server • MCP environment variables • code problems detection