{"id":"3f571d7a-cf12-436d-b800-6b728c5103f1","slug":"jbctl","kind":"mcp","name":"jbctl","summary":"CLI bridge for JetBrains IDE MCP Server","owner":"OrdinarySF","repoUrl":"https://github.com/OrdinarySF/jbctl","license":"Apache-2.0","licenseTier":"permissive","trust":"community","stars":4,"match":null,"fewStars":true,"format":"mcp","createdAt":"2026-04-09T20:26:34.000Z","addedAt":"2026-10-21T17:09:01.060Z","logoUrl":"https://avatars.githubusercontent.com/u/35167795?u=93ed5a53b4f00c8a707e349b16acaaaaecaa4a3d&v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["developer-tools","cloud-infra"],"tags":[],"runtime":"node","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-26T01:23:09.160Z","sample":false,"url":"https://conduits.dev/tools/jbctl","language":"TypeScript","transports":["stdio"],"install":{"npm":"jbctl"},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"# jbctl\n\n[English](README.md) | [中文](README.zh-CN.md)\n\nGive your AI agent access to 41+ JetBrains IDE tools — code analysis, search, refactoring, database queries, and more.\n\njbctl is an [Agent Skill](https://agentskills.io) that bridges AI agents (Claude Code, etc.) to the built-in [MCP Server](https://modelcontextprotocol.io) in WebStorm, IntelliJ IDEA, GoLand, PyCharm, and other JetBrains IDEs (2025.2+). The agent learns a `discover → doctor → inspect → call` workflow and can autonomously use any IDE tool.\n\n## What your agent can do\n\n| Category | Count | Examples |\n|----------|-------|---------|\n| File Operations | 12 | `read_file`, `create_new_file`, `replace_text_in_file`, `list_directory_tree` |\n| Search | 5 | `search_text`, `search_regex`, `search_symbol`, `find_files_by_name_keyword` |\n| Code Analysis | 2 | `get_symbol_info`, `get_file_problems` |\n| Refactoring | 2 | `rename_refactoring`, `reformat_file` |\n| Project Info | 3 | `get_project_modules`, `get_project_dependencies`, `get_run_configurations` |\n| Execution | 3 | `execute_terminal_command`, `execute_run_configuration`, `build_project` |\n| Database | 10 | `execute_sql_query`, `list_database_connections`, `preview_table_data` |\n| VCS & Inspection | 5 | `get_repositories`, `run_inspection_kts`, `generate_psi_tree` |\n\nTool availability varies by IDE product and version.\n\n## Prerequisites\n\n- A JetBrains IDE (2025.2+) with MCP Server enabled\n- Enable: **Settings → Tools → MCP Server → ☑ Enable MCP Server**\n\n## Setup\n\nPaste this into Claude Code to install both the CLI and the skill:\n\n> Install jbctl globally (`bun i -g jbctl`) and add the skill (`bunx skills add https://github.com/OrdinarySF/jbctl.git`).\n\n<details>\n<summary>Or install manually</summary>\n\n#### 1. Install the CLI\n\n```bash\nbun i -g jbctl\n```\n\nOr use npm: `npm i -g jbctl`. You can also run without installing via `bunx jbctl`.\n\n#### 2. Install the Skill\n\n```bash\nbunx skills add https://github.com/OrdinarySF/jbctl.git\n```\n\nThis adds the skill to `.claude/skills/jbctl` in your project.\n\n#### Alternative: Download binary\n\n```bash\n# macOS Apple Silicon\ncurl -fSL https://github.com/OrdinarySF/jbctl/releases/latest/download/jbctl-darwin-arm64 -o /usr/local/bin/jbctl\nchmod +x /usr/local/bin/jbctl\n\n# macOS Intel\ncurl -fSL https://github.com/OrdinarySF/jbctl/releases/latest/download/jbctl-darwin-x64 -o /usr/local/bin/jbctl\nchmod +x /usr/local/bin/jbctl\n\n# Linux x64\ncurl -fSL https://github.com/OrdinarySF/jbctl/releases/latest/download/jbctl-linux-x64 -o /usr/local/bin/jbctl\nchmod +x /usr/local/bin/jbctl\n```\n\n#### Alternative: Build from source (requires [Bun](https://bun.sh))\n\n```bash\ngit clone https://github.com/OrdinarySF/jbctl.git\ncd jbctl && bun install && bun scripts/build.ts\ncp dist/jbctl-* /usr/local/bin/jbctl\n```\n\n#### Skill: Add manually\n\nFor Claude Code:\n\n```bash\nmkdir -p .claude/skills\nln -s /path/to/jbctl/skills/jbctl .claude/skills/jbctl\n```\n\nFor other agents that support [Agent Skills](https://agentskills.io), point them at `skills/jbctl/SKILL.md`.\n\n</details>\n\nThe skill teaches your agent the full workflow — connection check, tool discovery, schema inspection, and tool invocation — with guardrails for destructive operations and error handling.\n\n## How it works\n\n```\nYour Agent (Claude Code, etc.)\n      |\n    jbctl CLI        ← skill teaches the agent how to call this\n      |\n  MCP Protocol       ← auto-detects transport (Streamable HTTP / SSE)\n      |\nJetBrains IDE        ← code analysis, indexing, type resolution, DB access\n```\n\nThe IDE does the heavy lifting (indexing, inspections, type resolution). jbctl gives your agent a clean CLI interface to call it. The agent doesn't need to know about MCP transports, endpoint ports, or `projectPath` injection — jbctl handles all of that.\n\n## Why jbctl instead of direct MCP?\n\nJetBrains IDEs expose an MCP Server that agents can connect to directly. But direct MCP has friction in real-world setups:\n\n| Scenario                    | Direct MCP                                                       | jbctl                                                                                      |\n|-----------------------------|------------------------------------------------------------------|--------------------------------------------------------------------------------------------|\n| Multiple IDEs running       | Manual port config per IDE                                       | `jbctl discover` auto-resolves by matching your project path to the correct IDE instance   |\n| Git worktree                | Broken — worktree path ≠ IDE project path, MCP config can't resolve | Works — pass `-p /path/to/ide/project` to route calls to the right IDE regardless of cwd |\n| IDE restarts (port changes) | Reconfigure MCP endpoint every time                              | Auto-discovers the new port on each call                                                   |\n| Agent learns new tools      | Agent must understand raw MCP protocol                           | Skill teaches a simple CLI workflow: `tools → inspect → call`                              |\n\nIn short: direct MCP works when you have one IDE, one project, no worktrees, and the port doesn't change. jbctl works everywhere else.\n\n## Key features\n\n- **Auto-discovery** — `jbctl discover` scans for running IDEs. Matches your project path against each IDE's opened projects to find the right instance — even with multiple IDEs running simultaneously.\n- **Schema-first** — The skill enforces `inspect` before `call`, so the agent never guesses parameter shapes.\n- **Safe by default** — Destructive DB operations require user confirmation. Brave mode warnings when IDE dialogs will block.\n- **Two transports** — Streamable HTTP (2026.1+) with automatic SSE fallback for older IDEs.\n\n## Example sessions\n\n### Reuse IDE database connections to query data\n\n> \"Look up the last 10 orders for user 42\"\n\nThe agent discovers the database connection already configured in your IDE — no DSN, no credentials, no `.env`:\n\n```bash\njbctl doctor -p /your/project\njbctl call list_database_connections -p /your/project --output json\n# → [{\"name\":\"prod-readonly\", ...}, {\"name\":\"local-dev\", ...}]\n\njbctl call execute_sql_query -p /your/project \\\n  --json '{\"connectionName\":\"local-dev\",\"query\":\"SELECT * FROM orders WHERE user_id = 42 ORDER BY created_at DESC LIMIT 10\"}' \\\n  --output json\n```\n\nNo driver install, no connection string — the IDE already has it.\n\n### Rename a function with full cross-reference safety\n\n> \"Rename `processOrder` to `handleOrder` across the whole project\"\n\nThe agent uses the IDE's refactoring engine, which understands types, imports, and string references — not just text replacement:\n\n```bash\njbctl call search_symbol -p /your/project \\\n  --json '{\"symbol\":\"processOrder\"}' --output json\n# → finds the definition and all usages\n\njbctl call rename_refactoring -p /your/project \\\n  --json '{\"path\":\"src/services/order.ts\",\"offset\":142,\"newName\":\"handleOrder\"}' --output json\n# → IDE renames the symbol everywhere: definitions, imports, type references, JSDoc\n```\n\nOne command, zero missed references.\n\n## Known limitations\n\n- **Dynamic port** — The IDE assigns a random port on startup. `jbctl discover` handles this automatically.\n- **Database tools** — Only available in IDE 2026.1+. The skill includes a JDBC fallback for older versions.\n- **Worktree detection** — Auto-discovery matches by project path. In a git worktree, pass `-p` pointing to the IDE's original project directory.\n\n## License\n\nMIT\n"}