Answer: To build a Gemini CLI companion plugin for your IDE, you must run a local HTTP server implementing the Model Context Protocol (MCP) on a dynamically assigned port, create a discovery file in os.tmpdir()/gemini/ide/ named gemini-ide-server-${PID}-${PORT}.json containing the port, workspacePath, authToken, and ideInfo, and optionally implement context and diffing interfaces. Status: Confirmed Entry: tool/gemini-cli/ide-and-apps/build-companion-plugin Revision: 1 Digest: sha256:c8056a50393aad75 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:18:38Z Last changed: 2026-11-13T03:18:38Z Last verified: 2026-11-20T12:53:12Z Next check: 2026-11-21T12:53:12Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of transport protocol | Model Context Protocol (MCP) | [1] | 2026-11-20 port | 0 | [1] | 2026-11-20 discovery file directory | os.tmpdir()/gemini/ide/ | [1] | 2026-11-20 discovery file name pattern | gemini-ide-server-${PID}-${PORT}.json | [1] | 2026-11-20 context notification | ide/contextUpdate | [1] | 2026-11-20 diff tools | openDiff | [1] | 2026-11-20 last updated | September 15, 2025 | [1] | 2026-11-20 Sources: [1] Google. "Gemini CLI companion plugin: Interface specification". https://geminicli.com/docs/ide-integration/ide-companion-spec.md Role: primary. Accessed: 2026-11-20T12:53:12Z Quote: "The plugin **MUST** run a local HTTP server that implements the **Model Context Protocol (MCP)**." (Supports: transport protocol) Quote: "The server **MUST** listen on a dynamically assigned port (that is, listen on port `0`)." (Supports: port) Quote: "The file must be created in a specific directory: `os.tmpdir()/gemini/ide/`." (Supports: discovery file directory) Quote: "The filename is critical and **MUST** follow the pattern: `gemini-ide-server-${PID}-${PORT}.json`" (Supports: discovery file name pattern) Quote: "The plugin **MAY** send an `ide/contextUpdate`" (Supports: context notification) Quote: "The plugin **MUST** register an `openDiff` tool on its MCP server." (Supports: diff tools) Quote: "> Last Updated: September 15, 2025" (Supports: last updated) Published: 2026-10-16T02:36:07Z Snapshot SHA-256: 60333b0b98053520fc9c9a5a6d8f4158d9e1a509b9e80ad6ca21de4a497b9822 (captured 2026-11-13T03:18:38Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T03:18:38Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:53:12Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:53:12Z Last attempt: 2026-11-20T12:53:12Z Notes and limitations: Extracted automatically from a single official source. Related: https://latestn.com/tool/gemini-cli/ide-and-apps/diffing-interface-tools What tools and notifications must a Gemini CLI companion plugin implement for diffing? https://latestn.com/tool/gemini-cli/ide-and-apps/port-file-discovery How does Gemini CLI discover a companion plugin's port file? https://latestn.com/tool/gemini-cli/ide-and-apps/transport-port-requirements What transport and port requirements must a Gemini CLI companion plugin server meet? https://latestn.com/tool/gemini-cli/features/web-search-tool-use-cases When should I use the Gemini CLI google_web_search tool? https://latestn.com/tool/gemini-cli/features/write-file-tool How do I write or overwrite a file using Gemini CLI's write_file tool? https://latestn.com/tool/gemini-cli/ide-and-apps/acp-ide-integrations Which IDEs and editors can integrate with Gemini CLI via ACP? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:18:38Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/gemini-cli/ide-and-apps/build-companion-plugin/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/gemini-cli/ide-and-apps/build-companion-plugin POST: https://latestn.com/dispute/tool/gemini-cli/ide-and-apps/build-companion-plugin with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/gemini-cli/ide-and-apps/build-companion-plugin?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I build a Gemini CLI companion plugin for my IDE? Revision 1, last verified 2026-11-20T12:53:12Z. https://latestn.com/tool/gemini-cli/ide-and-apps/build-companion-plugin (accessed 2026-11-21T10:01:22Z). @misc{LatestN_tool_gemini_cli_ide_and_apps_build_companion_plugin_r1, title = {How do I build a Gemini CLI companion plugin for my IDE?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/gemini-cli/ide-and-apps/build-companion-plugin}}, note = {Revision 1; digest sha256:c8056a50393aad75; last verified 2026-11-20T12:53:12Z; accessed 2026-11-21T10:01:22Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/gemini-cli/ide-and-apps/build-companion-plugin