{"id":50497102,"url":"https://github.com/j-plugins/ide-introspector-plugin","last_synced_at":"2026-06-02T08:30:49.444Z","repository":{"id":359195628,"uuid":"1244984488","full_name":"j-plugins/ide-introspector-plugin","owner":"j-plugins","description":"Intellij IDEA Plugin Exposes IDE internal stuctures via MCP and ToolWindow","archived":false,"fork":false,"pushed_at":"2026-05-21T17:21:40.000Z","size":2569,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-21T22:26:19.974Z","etag":null,"topics":["idea-plugin","intellij","intellij-platform","intellij-plugin","phpstorm-plugin"],"latest_commit_sha":null,"homepage":"https://plugins.jetbrains.com/plugin/31891-ide-introspect","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/j-plugins.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-20T19:48:14.000Z","updated_at":"2026-05-21T13:45:10.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/j-plugins/ide-introspector-plugin","commit_stats":null,"previous_names":["xepozz/introspector-plugin","j-plugins/ide-introspector-plugin"],"tags_count":null,"template":false,"template_full_name":"JetBrains/intellij-platform-plugin-template","purl":"pkg:github/j-plugins/ide-introspector-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-plugins%2Fide-introspector-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-plugins%2Fide-introspector-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-plugins%2Fide-introspector-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-plugins%2Fide-introspector-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/j-plugins","download_url":"https://codeload.github.com/j-plugins/ide-introspector-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-plugins%2Fide-introspector-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33814307,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-02T02:00:07.132Z","response_time":109,"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":["idea-plugin","intellij","intellij-platform","intellij-plugin","phpstorm-plugin"],"created_at":"2026-06-02T08:30:48.631Z","updated_at":"2026-06-02T08:30:49.433Z","avatar_url":"https://github.com/j-plugins.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IDE Introspector\n\n![Build](https://github.com/xepozz/introspector-plugin/workflows/Build/badge.svg)\n\nExposes the running IntelliJ-based IDE to MCP clients (Claude, Cursor, Codex, ...) as a\nset of tools for UI introspection, plugin-architecture exploration, and on-demand\nKotlin code execution. Ships with a **Platform Explorer** tool window for browsing the\nlive extension-point / plugin graph without an MCP client attached.\n\n## Architecture\n\nTwo tiers:\n\n| Tier | Coverage | Latency | Safety |\n|------|----------|---------|--------|\n| Tier 1: pre-built MCP tools | ~80% of routine introspection | 1–50 ms | whitelist of read-only operations |\n| Tier 2: `exec.execute_kotlin_in_ide` | the remaining 20% | 1–5 s (compile) | opt-in + per-call confirmation + textual blacklist |\n\n### Tier 1 — pre-built MCP tools\n\nRegistered via the `com.intellij.mcpServer.mcpToolset` extension point. All become visible\nto MCP clients once the bundled MCP Server plugin is enabled. There are 13 tools across\nfour groups: `ui.*` (5), `screenshot.*` (2), `arch.*` (5), `exec.*` (1, opt-in).\n\n**Full tool reference with every parameter and example:** [`docs/MCP_TOOLS.md`](docs/MCP_TOOLS.md)\n— generated from the source-level `@McpDescription` annotations at build time\n(`./gradlew generateToolsDoc`), so there's only one place to edit.\n\nComponent ids returned by `ui.*` tools are stable for the duration of the IDE session and\ncan be passed back into `ui.get_properties` / `screenshot.capture`.\n\n### Tier 1 — Platform Explorer tool window\n\nRight-side tool window with three view modes:\n\n1. **By Plugin** — each plugin with declared EPs and registered extensions.\n2. **By Extension Point** — each EP with the list of registered implementations.\n3. **By Plugin Dependencies** — declared `\u003cdepends\u003e` graph.\n\nFeatures: SpeedSearch, live filter input (200 ms debounce), HTML details panel,\nright-click \"Copy plugin id / EP name / class name\", refresh button.\n\n### Tier 2 — `exec.execute_kotlin_in_ide` (Phase 2 demo)\n\nCompiles and executes arbitrary Kotlin in the IDE JVM. **Disabled by default**;\ntoggle in Settings → Tools → IDE Introspector.\n\nUser code is wrapped with three implicit helpers (`read`, `write`, `onEdt`) and runs\ninside an auto-disposed `Disposable` scope so subscriptions are cleaned up between calls.\n\n**Security**:\n\n1. Off by default (`enabled = false` in `ExecSettings`).\n2. Per-call confirmation dialog inside the IDE (with session-only bypass).\n3. Textual blacklist: `Runtime.exec`, `ProcessBuilder`, `setAccessible(true)`,\n   `System.exit`, `Class.forName(\"sun.*\")`.\n4. Audit log to `idea.log` (category `ide-introspector-audit`).\n5. Hard execution timeout (default 30 s, capped at the configured `maxTimeoutMs`).\n\n**Demo implementation note**: the spec calls for forking LivePlugin's compiler bootstrap.\nThis demo takes a smaller shortcut and uses `kotlin-scripting-jsr223` (which internally\nwraps `kotlin-compiler-embeddable`). This keeps the diff small and gives us a fresh\nclassloader per call out of the box, but bundles ~50 MB of compiler classes into the\nplugin zip. A future iteration should either:\n\n- Switch to the LivePlugin fork once measured cold-start latency justifies the operational\n  cost of pinning Kotlin compiler versions, or\n- Reuse a single compiler daemon across calls to cut compilation overhead.\n\n## Manual verification\n\nAfter running `./gradlew runIde`:\n\n1. **Tool window**: open the *Platform Explorer* tool window on the right. Switch\n   between view modes; type in the filter to narrow the tree.\n2. **MCP tools (with MCP Inspector or Claude Desktop)**:\n   - `arch.list_extension_points` — should return ≥ 1000 EPs on a vanilla IDEA.\n   - `ui.get_tree` with default args — should return ≥ 50 nodes.\n   - `ui.find_by_xpath` with `//div[@class='ActionButton' and @text='Run']` — should find\n     the Run button on the main toolbar.\n   - `arch.find_extenders_of` with target `com.intellij.toolWindow` — should list every\n     `ToolWindowFactory` implementation.\n3. **Kotlin execution**: enable in Settings, then call `exec.execute_kotlin_in_ide` with\n   code like `1 + 1` or `project?.name`. A confirmation dialog should pop up; on accept,\n   the result should round-trip as JSON.\n\n## Project layout\n\n```\nsrc/main/kotlin/com/github/xepozz/introspector/\n├── core/         — ComponentRegistry, ComponentTreeWalker, PluginInventory, ExtensionPointInspector, XPathMatcher, ScreenshotCapture\n├── model/        — Serializable data classes (ComponentInfo, PluginInfo, …) + tool args\n├── tools/\n│   ├── ui/       — get_tree, find_by_*, get_properties\n│   ├── screenshot/ — capture, crop\n│   ├── arch/     — list_extension_points, list_extensions_for_ep, list_plugins, get_plugin_details, find_extenders_of\n│   └── exec/     — execute_kotlin_in_ide\n├── toolwindow/   — Platform Explorer (panel, tree model, cell renderer, details panel)\n├── exec/         — Settings, ConfirmationManager, AstSafetyChecker, AuditLogger, KotlinExecutor, ResultSerializer, CodeWrapper\n└── util/         — EdtHelpers, ImageEncoding\n```\n\n## Build\n\n```bash\n./gradlew buildPlugin\n# produces build/distributions/ide-introspector-\u003cversion\u003e.zip\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj-plugins%2Fide-introspector-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fj-plugins%2Fide-introspector-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj-plugins%2Fide-introspector-plugin/lists"}