{"id":30581456,"url":"https://github.com/josedacosta/mcp-jetbrains-code-inspections","last_synced_at":"2026-05-07T10:34:28.061Z","repository":{"id":309012956,"uuid":"1032331051","full_name":"josedacosta/mcp-jetbrains-code-inspections","owner":"josedacosta","description":"MCP server for JetBrains IDE code inspections with automatic IDE detection and unified inspection profile","archived":false,"fork":false,"pushed_at":"2025-08-26T11:34:46.000Z","size":1057,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-26T14:59:04.107Z","etag":null,"topics":["code-inspection","code-quality","developer-tools","ide-integration","intellij","jetbrains","linting","mcp","mcp-server","static-analysis","typescript","webstorm"],"latest_commit_sha":null,"homepage":"https://josedacosta.github.io/mcp-jetbrains-code-inspections/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/josedacosta.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-05T06:43:59.000Z","updated_at":"2025-08-26T11:34:49.000Z","dependencies_parsed_at":"2025-08-09T09:17:34.183Z","dependency_job_id":"2b45ebb3-058f-4af2-a222-81f8414a3c1d","html_url":"https://github.com/josedacosta/mcp-jetbrains-code-inspections","commit_stats":null,"previous_names":["josedacosta/mcp-jetbrains-code-inspections"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/josedacosta/mcp-jetbrains-code-inspections","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josedacosta%2Fmcp-jetbrains-code-inspections","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josedacosta%2Fmcp-jetbrains-code-inspections/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josedacosta%2Fmcp-jetbrains-code-inspections/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josedacosta%2Fmcp-jetbrains-code-inspections/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/josedacosta","download_url":"https://codeload.github.com/josedacosta/mcp-jetbrains-code-inspections/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josedacosta%2Fmcp-jetbrains-code-inspections/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272641244,"owners_count":24968802,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-inspection","code-quality","developer-tools","ide-integration","intellij","jetbrains","linting","mcp","mcp-server","static-analysis","typescript","webstorm"],"created_at":"2025-08-29T06:23:16.473Z","updated_at":"2026-05-07T10:34:28.055Z","avatar_url":"https://github.com/josedacosta.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"static/img/logo.svg\" alt=\"MCP JetBrains Code Inspections\" width=\"120\" height=\"120\"\u003e\n\u003c/div\u003e\n\n# 🔍 MCP JetBrains Code Inspections\n\n[![License: OSL-3.0](https://img.shields.io/badge/License-OSL--3.0-yellow.svg)](https://opensource.org/licenses/OSL-3.0)\n[![Node.js](https://img.shields.io/badge/Node.js-%3E%3D20-brightgreen)](https://nodejs.org)\n[![TypeScript](https://img.shields.io/badge/TypeScript-%5E5.0-blue)](https://www.typescriptlang.org/)\n[![Documentation](https://img.shields.io/badge/docs-available-brightgreen)](https://josedacosta.github.io/mcp-jetbrains-code-inspections/)\n[![MCP SDK](https://img.shields.io/badge/MCP-SDK-green)](https://github.com/modelcontextprotocol/sdk)\n[![JetBrains](https://img.shields.io/badge/JetBrains-Compatible-orange)](https://www.jetbrains.com)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://makeapullrequest.com)\n\n\u003e [!CAUTION]\n\u003e\n\u003e ## ⚠️ Deprecated Notice\n\u003e\n\u003e [![Status: Deprecated](https://img.shields.io/badge/Status-Deprecated-red.svg)](https://github.com/josedacosta/mcp-jetbrains-code-inspections#deprecated-notice)\n\u003e\n\u003e **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.\n\u003e\n\u003e ### 🔄 Migration Options\n\u003e\n\u003e | IDE Version          | Recommended Solution | Link                                                                              |\n\u003e | -------------------- | -------------------- | --------------------------------------------------------------------------------- |\n\u003e | **2025.2+**          | Built-in MCP server  | [Official Documentation](https://www.jetbrains.com/help/webstorm/mcp-server.html) |\n\u003e | **Earlier versions** | JetBrains MCP plugin | [Plugin Marketplace](https://plugins.jetbrains.com/plugin/26071-mcp-server)       |\n\u003e\n\u003e ### ✅ Native Integration Benefits\n\u003e\n\u003e - **Direct IDE control** without external tools\n\u003e - **25+ tools** comprehensive tool set\n\u003e - **Better performance** and reliability\n\u003e - **Official support** from JetBrains\n\u003e\n\u003e \u003e [!IMPORTANT]\n\u003e \u003e The native `get_file_problems` tool requires setting `errorsOnly: false` for similar functionality to this project. The `get_project_problems` tool only returns critical errors.\n\u003e\n\u003e 📚 **[View Migration Guide \u0026 Comparison →](https://josedacosta.github.io/mcp-jetbrains-code-inspections/deprecated/jetbrains-native-mcp)**\n\nA **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.\n\n\u003e [!TIP]\n\u003e 📚 **Full Documentation Available**: Visit our comprehensive docs at [josedacosta.github.io/mcp-jetbrains-code-inspections](https://josedacosta.github.io/mcp-jetbrains-code-inspections/)\n\n## 🎯 Quick Start\n\n\u003e [!NOTE]\n\u003e Get started in under 2 minutes!\n\n```bash\n# Clone the repository\ngit clone https://github.com/josedacosta/mcp-jetbrains-code-inspections.git\ncd mcp-jetbrains-code-inspections\n\n# Install and build\nyarn install \u0026\u0026 yarn build\n\n# Test with MCP Inspector\nyarn inspect\n```\n\nThen configure your MCP client (Claude Desktop, Cursor, etc.) with the [configuration below](#️-configuration).\n\n## ✨ Features\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd width=\"50%\"\u003e\n\n### 🚀 Core Features\n\n- 🔍 **Automatic IDE Detection**\n  \u003cbr\u003eIntelligently selects the best JetBrains IDE\n- ⚡ **Configurable Timeout**\n  \u003cbr\u003eDefault 120s, adjustable for large projects\n- 🔄 **Cross-IDE Compatible**\n  \u003cbr\u003eWorks with all JetBrains IDEs\n\n\u003c/td\u003e\n\u003ctd width=\"50%\"\u003e\n\n### 🔧 Advanced Capabilities\n\n- 📊 **Smart Output Formats**\n  \u003cbr\u003eMarkdown for LLMs, JSON for tools\n- 🎯 **Concurrent Execution**\n  \u003cbr\u003eRun even when IDE is open\n- 🌐 **Universal Profiles**\n  \u003cbr\u003eOne profile for all languages\n- 💬 **Built-in Prompts**\n  \u003cbr\u003ePre-configured prompts for common tasks\n- 📚 **Server Resources**\n  \u003cbr\u003eAccess profiles, config, and IDE info\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n## 📦 Installation\n\n\u003e [!NOTE]\n\u003e **Prerequisites**: Node.js ≥20 and a JetBrains IDE installed\n\n### Step-by-step Installation\n\n1. **Install dependencies**:\n\n    ```bash\n    yarn install\n    ```\n\n2. **Build the server**:\n\n    ```bash\n    yarn build\n    ```\n\n3. **Configure MCP** (see [⚙️ Configuration](#️-configuration) section below)\n\n\u003e [!TIP]\n\u003e Use `yarn inspect` after installation to test the server with the MCP Inspector\n\n## 🚀 Usage\n\n### 📚 MCP Features\n\nThe server provides three types of MCP features:\n\n#### 🔨 Tools\n\n- **get_jetbrains_code_inspections**: Runs code inspections on specified files or directories\n\n#### 💬 Prompts\n\n- **analyze-project**: Analyze a project for code quality issues\n- **check-file**: Check a specific file for issues\n- **fix-issues**: Get suggestions to fix detected issues\n\n#### 📚 Resources\n\n- **inspection://profiles**: List of available inspection profiles\n- **inspection://config**: Current MCP server configuration\n- **inspection://ides**: List of detected JetBrains IDEs on the system\n\n### 🏃 Running the Server\n\n\u003e [!TIP]\n\u003e For development, use `yarn dev` which includes hot-reload for faster iteration.\n\n```bash\n# 🔄 Run in development mode (with hot-reload)\nyarn dev\n\n# 📦 Run the built server (production)\nyarn start\n\n# 🧪 Use MCP Inspector for interactive testing\nyarn inspect\n```\n\n### ⚙️ Configuration\n\nThe code inspections server can be configured through environment variables in `.mcp.json`:\n\n```json\n{\n    \"mcpServers\": {\n        \"mcp-jetbrains-code-inspections\": {\n            \"command\": \"node\",\n            \"args\": [\"./dist/index.js\"],\n            \"env\": {\n                \"EXCLUDE_INSPECTIONS\": \"SpellCheckingInspection\"\n            }\n        }\n    }\n}\n```\n\n### 📝 Available Parameters\n\n#### 🔧 Tool Parameter (Required)\n\n\u003e [!IMPORTANT]\n\u003e The tool accepts only one parameter from the LLM:\n\n| Parameter | Type     | Description                       | Required | Example                       |\n| --------- | -------- | --------------------------------- | -------- | ----------------------------- |\n| `path`    | `string` | File or directory path to inspect | ✅ Yes   | `\"src/index.ts\"` or `\"./src\"` |\n\n#### 🌍 Configuration via Environment Variables\n\n\u003e [!NOTE]\n\u003e All configurations are managed through environment variables in `.mcp.json`. These settings control how the inspection server operates.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e📑 Available Environment Variables\u003c/b\u003e (click to expand)\u003c/summary\u003e\n\n| Environment Variable  | Type                 | Description                                               | Default                   |\n| --------------------- | -------------------- | --------------------------------------------------------- | ------------------------- |\n| `FORCE_INSPECT_PATH`  | `string`             | Force specific IDE inspect tool (disables auto-detection) | Auto-detected             |\n| `FORCE_PROJECT_ROOT`  | `string`             | Force project root directory (disables auto-detection)    | Auto-detected             |\n| `FORCE_PROFILE_PATH`  | `string`             | Force inspection profile path (disables defaults)         | Project defaults          |\n| `INSPECTION_TIMEOUT`  | `number`             | Maximum analysis time (ms)                                | `120000`                  |\n| `EXCLUDE_INSPECTIONS` | `string`             | Comma-separated inspection codes to exclude               | `SpellCheckingInspection` |\n| `ONLY_INSPECTIONS`    | `string`             | Only include these inspection codes                       | -                         |\n| `RESPONSE_FORMAT`     | `'markdown'\\|'json'` | Output format for diagnostics                             | `'markdown'`              |\n| `DEBUG`               | `boolean`            | Enable debug logging                                      | `false`                   |\n\n\u003c/details\u003e\n\n\u003e [!TIP]\n\u003e 📚 For detailed configuration options, see [Configuration Documentation](docs/configuration/).\n\n## 🧪 Testing\n\n### 1️⃣ Interactive MCP Test\n\n```bash\nyarn test:mcp\n```\n\nThis runs an interactive test that allows you to test the MCP server functionality directly.\n\n### 2️⃣ Test with MCP Inspector (recommended)\n\n```bash\n# Launch the inspector (no installation needed)\nyarn inspect\n\n# Or for development mode with hot reload\nyarn inspect:dev\n```\n\nThe inspector opens a web interface where you can:\n\n- View available tools, prompts, and resources\n- Test get_jetbrains_code_inspections tool interactively\n- Use pre-configured prompts for common tasks\n- Access server resources (profiles, config, detected IDEs)\n- See requests/responses in real-time\n\n## ⚙️ How It Works\n\n### 🎯 Automatic IDE Selection\n\n\u003e [!NOTE]\n\u003e The server intelligently detects and selects the most appropriate JetBrains IDE for your project.\n\n**Priority order:**\n\n1. **IntelliJ IDEA** - Ultimate Java/Kotlin IDE\n2. **WebStorm** - JavaScript/TypeScript specialist\n3. **PyCharm** - Python development\n4. **PhpStorm** - PHP development\n5. **GoLand** - Go programming\n6. **Rider** - .NET development\n7. **CLion** - C/C++ development\n8. **RubyMine** - Ruby/Rails\n9. **DataGrip** - Database management\n10. **DataSpell** - Data science\n11. **AppCode** - iOS/macOS development\n\n\u003e [!TIP]\n\u003e Use `FORCE_INSPECT_PATH` to override auto-detection and specify a particular IDE.\n\n### 🔒 Isolated Configuration\n\n\u003e [!IMPORTANT]\n\u003e **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!\n\n**Benefits:**\n\n- ✅ No IDE conflicts\n- ✅ Parallel execution support\n- ✅ Clean, isolated analysis\n- ✅ No interference with your active IDE sessions\n\n### 💻 Example Output\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e🔎 View Example Output\u003c/b\u003e (click to expand)\u003c/summary\u003e\n\n```console\n🔍 Searching for available JetBrains IDE inspect tools...\n   Following priority order: IntelliJ IDEA \u003e WebStorm \u003e PyCharm \u003e PhpStorm \u003e GoLand \u003e ...\n\n   ✅ WebStorm - Found and selected!\n      Path: /Applications/WebStorm.app/Contents/bin/inspect.sh\n      Note: Using isolated configuration - works even if IDE is already running\n\n📊 Analysis Results:\n   ⚠️ Warning: Unused variable 'config' at line 42\n   ❌ Error: Missing semicolon at line 156\n   💡 Info: Consider using const instead of let at line 78\n```\n\n\u003c/details\u003e\n\n## 🛠️ Troubleshooting\n\n### ❌ \"JetBrains IDE inspect tool not found\"\n\n\u003e [!WARNING]\n\u003e This error occurs when no JetBrains IDE can be found in standard installation locations.\n\n**Solutions:**\n\n- ✅ Verify that a JetBrains IDE is installed in `/Applications/` or `~/Applications/`\n- ✅ Ensure the `inspect.sh` file is executable\n- ✅ Use `FORCE_INSPECT_PATH` environment variable to specify the exact path\n\n### ⚠️ \"No inspection profile found\"\n\n\u003e [!CAUTION]\n\u003e Without an inspection profile, the tool cannot analyze your code properly.\n\n**Steps to fix:**\n\n1. Open the project in a JetBrains IDE\n2. Go to **Settings** → **Inspections**\n3. Configure and save an inspection profile\n4. Alternatively, use `FORCE_PROFILE_PATH` to specify a custom profile\n\n### ⏱️ Timeout Issues\n\n\u003e [!TIP]\n\u003e Default timeout is 120 seconds. Large projects may need more time.\n\n**Solutions:**\n\n- 🔄 Increase timeout: Set `INSPECTION_TIMEOUT=300000` (5 minutes)\n- 📊 Check that the IDE is not currently indexing\n- 📦 For very large projects, consider inspecting specific directories\n\n### 🚫 \"Only one instance can be run at a time\"\n\n\u003e [!NOTE]\n\u003e ✅ **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.\n\n## 📚 Documentation\n\n\u003e [!TIP]\n\u003e 🌐 Visit our comprehensive documentation at [josedacosta.github.io/mcp-jetbrains-code-inspections](https://josedacosta.github.io/mcp-jetbrains-code-inspections/)\n\n**Available sections:**\n\n| Section                                                                                                 | Description                        |\n| ------------------------------------------------------------------------------------------------------- | ---------------------------------- |\n| 🏁 **[Getting Started](https://josedacosta.github.io/mcp-jetbrains-code-inspections/getting-started/)** | Installation and prerequisites     |\n| ⚙️ **[Configuration](https://josedacosta.github.io/mcp-jetbrains-code-inspections/configuration/)**     | Environment variables and profiles |\n| 📖 **[Usage Guide](https://josedacosta.github.io/mcp-jetbrains-code-inspections/usage/)**               | Basic and advanced usage           |\n| 🔬 **[Technical Details](https://josedacosta.github.io/mcp-jetbrains-code-inspections/technical/)**     | Architecture and IDE detection     |\n| 💡 **[Guides](https://josedacosta.github.io/mcp-jetbrains-code-inspections/guides/)**                   | Best practices and troubleshooting |\n\n## 📖 JetBrains Documentation\n\n\u003e [!TIP]\n\u003e Learn more about JetBrains code inspections and the command-line inspector:\n\n| Resource                                                                                                       | Description                                                            |\n| -------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |\n| 📘 **[Code Inspection Overview](https://www.jetbrains.com/help/webstorm/code-inspection.html)**                | Learn about code inspections, severity levels, and inspection profiles |\n| 🔧 **[Command-Line Code Inspector](https://www.jetbrains.com/help/webstorm/command-line-code-inspector.html)** | Detailed documentation on using the inspect.sh/inspect.bat tool        |\n\n## 🤝 Contributing\n\n\u003e [!NOTE]\n\u003e We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for full details.\n\n**What we're looking for:**\n\n- 🐛 Bug fixes and issue reports\n- ✨ New features and enhancements\n- 📝 Documentation improvements\n- 🧪 Test coverage expansion\n- 🌍 Language/IDE support\n\n### 🚀 Quick Start for Contributors\n\n\u003e [!IMPORTANT]\n\u003e We follow [Conventional Commits](https://www.conventionalcommits.org/) and use GitHub Flow.\n\n```bash\n# 1. Fork and clone the repository\ngit clone https://github.com/YOUR-USERNAME/mcp-jetbrains-code-inspections.git\n\n# 2. Create a feature branch\ngit checkout -b feat/amazing-feature\n\n# 3. Make your changes and commit\ngit commit -m 'feat(scope): add amazing feature'\n\n# 4. Push to your fork\ngit push origin feat/amazing-feature\n\n# 5. Open a Pull Request\n```\n\n\u003e [!TIP]\n\u003e See [CONTRIBUTING.md](CONTRIBUTING.md) for branch naming, commit message standards, and PR guidelines.\n\n## 🏷️ Keywords\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e🔍 SEO Keywords\u003c/b\u003e (click to expand)\u003c/summary\u003e\n\n**MCP \u0026 AI Integration:**\n`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`\n\n**JetBrains IDEs:**\n`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`\n\n**Technical Terms:**\n`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`\n\n\u003c/details\u003e\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**Made with ❤️ by the Runtima Team**\n\n[![Star on GitHub](https://img.shields.io/github/stars/josedacosta/mcp-jetbrains-code-inspections.svg?style=social)](https://github.com/josedacosta/mcp-jetbrains-code-inspections)\n[![Follow on GitHub](https://img.shields.io/github/followers/josedacosta.svg?style=social\u0026label=Follow)](https://github.com/josedacosta)\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosedacosta%2Fmcp-jetbrains-code-inspections","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjosedacosta%2Fmcp-jetbrains-code-inspections","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosedacosta%2Fmcp-jetbrains-code-inspections/lists"}