界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
开发与工程 · SKILL.md

mcp-jetbrains-ide

mcp-jetbrains-ide

【开发与工程】Control JetBrains IDE (IntelliJ, WebStorm, PyCharm) via MCP. Use when manipulating IDE files, running configurations, searching code, or performing refactoring. Triggers on "open in IDE", "run configuration", "refactor code", "IDE search", "JetBrains".

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: mcp-jetbrains-ide description: Control JetBrains IDE (IntelliJ, WebStorm, PyCharm) via MCP. Use when manipulating IDE files, running configurations, searching code, or performing refactoring. Triggers on "open in IDE", "run configuration", "refactor code", "IDE search", "JetBrains".

JetBrains IDE Integration

MCP service at http://localhost:64342/sse (sse) with 22 tools.

Requirements

  • mh CLI must be installed. If not available, install with:
    curl -fsSL https://raw.githubusercontent.com/vaayne/mcphub/main/scripts/install.sh | sh
    
  • JetBrains IDE must be running with MCP plugin enabled

Usage

List tools: mh -u http://localhost:64342/sse -t sse list Get tool details: mh -u http://localhost:64342/sse -t sse inspect <tool-name> Invoke tool: mh -u http://localhost:64342/sse -t sse invoke <tool-name> '{"param": "value"}'

Notes

  • Run inspect before invoking unfamiliar tools to get full parameter schema
  • Timeout: 30s default, use --timeout <seconds> to adjust
  • SSE port may vary - check IDE MCP plugin settings if connection fails
  • All file paths are relative to project root unless absolute

Tools

File Operations

ToolDescription
createNewFileCreate a new file at specified path, auto-creates parent directories
getFileTextByPathRead file contents by project-relative path
replaceTextInFileReplace text in file with flexible find/replace options
reformatFileApply code formatting rules to a file
openFileInEditorOpen a file in the IDE editor
getAllOpenFilePathsGet paths of all currently open files

Search

ToolDescription
findFilesByNameKeywordFind files by name keyword (case-insensitive)
findFilesByGlobFind files matching glob pattern (e.g. **/*.ts)
searchInFilesByTextSearch for text substring across project files
searchInFilesByRegexSearch with regex pattern across project files

Code Intelligence

ToolDescription
getSymbolInfoGet documentation/info about symbol at position
getFileProblemsAnalyze file for errors and warnings
renameRefactoringRename symbol across entire project

Project

ToolDescription
listDirectoryTreeTree view of directory structure
getProjectModulesList all project modules with types
getProjectDependenciesList all project dependencies
getRepositoriesList VCS roots in project

Execution

ToolDescription
getRunConfigurationsList available run configurations
executeRunConfigurationRun a specific run configuration
executeTerminalCommandExecute shell command in IDE terminal

Other

ToolDescription
permissionPromptPermission prompt utility

Examples

# List project structure
mh -u http://localhost:64342/sse -t sse invoke listDirectoryTree '{"path": "."}'

# Search for text in files
mh -u http://localhost:64342/sse -t sse invoke searchInFilesByText '{"query": "TODO"}'

# Read a file
mh -u http://localhost:64342/sse -t sse invoke getFileTextByPath '{"path": "src/index.ts"}'

# Rename a symbol
mh -u http://localhost:64342/sse -t sse invoke renameRefactoring '{"path": "src/utils.ts", "line": 10, "column": 5, "newName": "newFunctionName"}'

# Run a configuration
mh -u http://localhost:64342/sse -t sse invoke executeRunConfiguration '{"name": "Run Tests"}'
我的收藏