Troubleshooting
Solutions for common issues when using MCP JetBrains Code Inspections.
Common Issues
IDE Not Found
Error: "No JetBrains IDE found" or "Cannot find inspect tool"
Solutions:
-
Verify IDE is installed:
ls /Applications/ | grep -E "(IntelliJ|WebStorm|PyCharm)"
-
Set explicit IDE path:
export FORCE_INSPECT_PATH="/path/to/your/IDE.app/Contents/bin/inspect.sh"
-
Check IDE process isn't blocking:
ps aux | grep -i "intellij\|webstorm\|pycharm"
Timeout Errors
Error: "Timeout getting diagnostics" or inspection takes too long
Solutions:
-
Increase timeout value:
{
"env": {
"INSPECTION_TIMEOUT": "600000" // 10 minutes
}
} -
Analyze smaller scopes:
// Instead of entire project
await get_jetbrains_code_inspections({
path: '/src/specific/file.ts',
}); -
Enable debug mode for more information:
{
"env": {
"DEBUG": "true"
}
}
No Diagnostics Returned
Error: Empty diagnostics array despite known issues
Solutions:
-
Check inspection profile exists:
ls .idea/inspectionProfiles/
-
Verify file is in project:
# File should be within project root
realpath --relative-to=. /path/to/file -
Test with MCP Inspector:
yarn inspect
# Then test with the file path in the web interface
Permission Denied
Error: "Permission denied" when running inspections
Solutions:
-
Check file permissions:
ls -la /path/to/inspect.sh
chmod +x /path/to/inspect.sh -
Verify temp directory access:
touch /tmp/test-mcp-inspection
-
Run with correct user:
whoami
ls -la .idea/
Profile Not Found
Error: "Inspection profile not found"
Solutions:
-
Create default profile:
- Open project in JetBrains IDE
- Go to Settings → Editor → Inspections
- Save profile as "Project Default"
-
Use unified profile:
cp src/resources/profiles/unified.xml .idea/inspectionProfiles/
-
Check profile settings:
<!-- .idea/inspectionProfiles/profiles_settings.xml -->
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="true" />
</settings>
</component>
Performance Issues
Slow Analysis
Optimize performance:
-
Exclude unnecessary files:
// Focus on source files only
await get_jetbrains_code_inspections({
path: '/project/src',
}); -
Use specific file types:
- Configure IDE to skip certain file types
- Use
.idea/fileTypes.xml
for exclusions
-
Disable expensive inspections:
- Edit inspection profile
- Disable data flow analysis for large files
Memory Issues
For large projects:
-
Increase IDE memory:
# In IDE's vmoptions file
-Xmx4096m
-XX:MaxPermSize=1024m -
Process files in batches
-
Clear IDE caches if needed
Debugging
Enable Debug Logging
-
Set debug environment:
export DEBUG=true
-
Check server logs:
DEBUG=true yarn dev 2>&1 | tee debug.log
-
Use interactive testing:
yarn test:mcp
Using MCP Inspector
yarn inspect
# or
npx @modelcontextprotocol/inspector node dist/index.js
In the inspector:
- Select
get_jetbrains_code_inspections
tool - Enter path parameter with test file
- Check request/response details
- Review any error messages
Platform-Specific Issues
macOS
- Check Gatekeeper permissions
- Verify app is in Applications folder
- Look for quarantine attributes
Windows
- Use forward slashes in paths
- Check Windows Defender exclusions
- Verify PATH environment variable
Linux
- Install IDE from official source
- Check desktop file associations
- Verify Java runtime version
Getting Further Help
If issues persist:
-
Collect debug information:
- IDE version
- Node.js version
- Error messages
- Debug logs
-
Check existing issues:
-
Create detailed bug report:
- Steps to reproduce
- Expected vs actual behavior
- Environment details