Answer: Once the RPC is registered, it can be called over HTTP by creating an OpenCode client and using client.rpc to create a subclient, or from another plugin using the existing OpenCode client (e.g., context.client or ctx.client). Status: Confirmed Entry: tool/opencode/integrations/call-rpc Revision: 2 Digest: sha256:e7fb6b0b911aff1a (changes whenever the content changes) Timeline: Created: 2026-11-13T03:55:55Z Last changed: 2026-11-19T13:34:53Z (Async iterable method: — → events.subscribe("updated")) Last verified: 2026-11-20T13:44:43Z Next check: 2026-11-21T13:44:43Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of HTTP method | client.rpc | [1] | 2026-11-20 HTTP base URL example | http://localhost:4096 | [1] | 2026-11-20 TUI plugin client | context.client | [1] | 2026-11-20 GUI plugin client | ctx.client | [1] | 2026-11-20 Subscribe method | events.on | [1] | 2026-11-20 Async iterable method | events.subscribe("updated") | [1] | 2026-11-20 Sources: [1] opencode. "Plugin RPC | OpenCode". https://opencode.ai/docs/build/plugins/rpc/ Role: primary. Accessed: 2026-11-20T13:44:43Z Quote: "use client.rpc to create a subclient for the RPC" (Supports: HTTP method) Quote: "baseUrl : "http://localhost:4096"" (Supports: HTTP base URL example) Quote: "a TUI plugin can create the same RPC subclient from context.client" (Supports: TUI plugin client) Quote: "A GUI plugin reads the client of the desktop app’s own server from ctx.client" (Supports: GUI plugin client) Quote: "Use events.on for a callback and unsubscribe when the listener is no longer needed" (Supports: Subscribe method) Quote: "For an async iterable, use events.subscribe("updated")" (Supports: Async iterable method) Snapshot SHA-256: 37434d54cb17cadeed5e125bd89c1835a46ec5999bd75168c1eaa7349e5372c9 (captured 2026-11-18T13:38:20Z) 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-18T13:38:22Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:44:43Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:44:43Z Last attempt: 2026-11-20T13:44:43Z Notes and limitations: Extracted automatically from a single official source (section "Call"). Related: https://latestn.com/tool/opencode/integrations/call-rpc-method How do I call an opencode RPC method over HTTP or from a plugin? https://latestn.com/tool/opencode/integrations/client-headers-requests How do I pass authentication headers or a custom fetch to the opencode client? https://latestn.com/tool/opencode/integrations/close-host-resources How do I release or close an opencode host's resources? https://latestn.com/tool/opencode/integrations/add-mcp-server How do I add an MCP server to opencode? https://latestn.com/tool/opencode/integrations/build-gui-plugin-bundle How do I build the opencode GUI plugin bundle? https://latestn.com/tool/opencode/integrations/call-provider-directly How do I call an opencode Console provider directly from my own tools? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-19T13:34:53Z | changed | Async iterable method: — → events.subscribe("updated") | [1] 2026-11-19T13:34:53Z | changed | Subscribe method: — → events.on | [1] 2026-11-19T13:34:53Z | changed | HTTP base URL example: — → http://localhost:4096 | [1] 2026-11-19T13:34:53Z | changed | HTTP example call: acme .search → — | [1] 2026-11-19T13:34:53Z | changed | HTTP client creation: OpenCode .make → — | [1] 2026-11-13T03:55:55Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/opencode/integrations/call-rpc/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/opencode/integrations/call-rpc POST: https://latestn.com/dispute/tool/opencode/integrations/call-rpc with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/opencode/integrations/call-rpc?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I call an opencode plugin RPC over HTTP or from another plugin? Revision 2, last verified 2026-11-20T13:44:43Z. https://latestn.com/tool/opencode/integrations/call-rpc (accessed 2026-11-21T09:50:48Z). @misc{LatestN_tool_opencode_integrations_call_rpc_r2, title = {How do I call an opencode plugin RPC over HTTP or from another plugin?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/opencode/integrations/call-rpc}}, note = {Revision 2; digest sha256:e7fb6b0b911aff1a; last verified 2026-11-20T13:44:43Z; accessed 2026-11-21T09:50:48Z} } 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/opencode/integrations/call-rpc