Answer: Create a client with the server URL using OpenCode.make with a baseUrl, then call methods grouped by API resource. For example, import { OpenCode } from "@opencode/client" and call OpenCode.make({ baseUrl: "http://localhost:4096" }). Status: Confirmed Entry: tool/opencode/integrations/create-client Revision: 1 Digest: sha256:dc417898b32727b5 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:55:34Z Last changed: 2026-11-13T03:55:34Z Last verified: 2026-11-20T13:44:22Z Next check: 2026-11-21T13:44:22Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of baseUrl | http://localhost:4096 | [1] | 2026-11-20 import package | @opencode/client | [1] | 2026-11-20 client creation method | OpenCode .make | [1] | 2026-11-20 Sources: [1] opencode. "JavaScript | OpenCode". https://opencode.ai/docs/build/client/ Role: primary. Accessed: 2026-11-20T13:44:22Z Quote: "baseUrl : "http://localhost:4096"" (Supports: baseUrl) Quote: "import { OpenCode } from "@opencode/client"" (Supports: import package) Quote: "const client = OpenCode .make ({ baseUrl : "http://localhost:4096" , })" (Supports: client creation method) Snapshot SHA-256: b57c06b169f30d263d200c3ace3e4cf3d5ed6f2a7ad4d4bd5ef01f4334d32706 (captured 2026-11-13T03:55:34Z) 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:55:34Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:44:22Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:44:22Z Last attempt: 2026-11-20T13:44:22Z Notes and limitations: Extracted automatically from a single official source (section "Create a client"). Related: https://latestn.com/tool/opencode/integrations/create-effect-client How do I create an Effect client for the opencode HTTP API? https://latestn.com/tool/opencode/integrations/create-effect-host How do I create an opencode host with the Effect SDK? https://latestn.com/tool/opencode/integrations/create-host How do I create an embedded opencode host in my application? https://latestn.com/tool/opencode/integrations/console-mcp What is the OpenCode Console MCP integration in Pi? https://latestn.com/tool/opencode/integrations/console-mcp-claude-code How do I set up the Console MCP for Claude Code? https://latestn.com/tool/opencode/integrations/console-mcp-in-codex How do I set up opencode Console MCP in Codex? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:55:34Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/opencode/integrations/create-client/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/create-client POST: https://latestn.com/dispute/tool/opencode/integrations/create-client with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/opencode/integrations/create-client?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I create an opencode client and connect it to a server URL? Revision 1, last verified 2026-11-20T13:44:22Z. https://latestn.com/tool/opencode/integrations/create-client (accessed 2026-11-21T09:50:26Z). @misc{LatestN_tool_opencode_integrations_create_client_r1, title = {How do I create an opencode client and connect it to a server URL?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/opencode/integrations/create-client}}, note = {Revision 1; digest sha256:dc417898b32727b5; last verified 2026-11-20T13:44:22Z; accessed 2026-11-21T09:50:26Z} } 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/create-client