opencode-server

A server that lets programs control OpenCode, an AI coding tool, through HTTP requests. It provides an API for sessions, messages, files, settings, tools, agents, and other OpenCode functions.

In plain words
What is it for?
Use it to start OpenCode as a local or network service, connect clients to it, configure access and browser permissions, discover it on a network, and integrate its API into other software.
Why use it?
It lets several clients—such as a web interface, IDE extension, or custom program—use the same OpenCode process. This avoids building separate control mechanisms for each client.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/timmy6942025/opencode-builder-skill/opencode-server
Any agent
npx skills add Timmy6942025/opencode-builder-skill --skill opencode-server
Clone the repo
git clone --depth 1 https://github.com/Timmy6942025/opencode-builder-skill

Made for: Claude Code, Codex.

Per session 106 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,590 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00106 $0.08590
Opus 5 $0.00053 $0.04295
Sonnet 5 $0.00021 $0.01718
Haiku 4.5 $0.00011 $0.00859

Measured yesterday against content hash d6884688d9d3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

opencode-server scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -N http://localhost:4096/event
skills/opencode-server/SKILL.md · 1,152 lines

How it starts

The opening of the file, as written. The whole thing — 1,152 lines — stays where its author put it; the contents beside it link to each section on GitHub.

OpenCode Server

📚 Official Docs: For the latest information, always refer to the official documentation: https://opencode.ai/docs/server/

OpenCode exposes a headless HTTP server that implements a full REST API and publishes an OpenAPI 3.1 specification. The TUI is a client that talks to this server. The server enables multiple clients (TUI, web, IDE plugins, custom integrations) to control OpenCode programmatically.


Usage

Start a standalone HTTP server:

opencode serve [--port <number>] [--hostname <string>] [--mdns] [--mdns-domain <string>] [--cors <origin>]

Flags

Flag Description Default
--port Port to listen on 0 (random available port)
--hostname Hostname to listen on 127.0.0.1
--mdns Enable mDNS discovery false
--mdns-domain Custom domain name for mDNS service opencode.local
--cors Additional browser origins to allow (repeatable) []

The --cors flag can be passed multiple times:

opencode serve --cors http://localhost:5173 --cors https://app.example.com

When you run opencode normally (without serve), it starts both a TUI and an internal server. The TUI is the client that talks to this server. Running opencode serve starts a standalone headless server without launching the TUI.


Authentication

Protect the server with HTTP basic auth using environment variables:

Variable Description Default
OPENCODE_SERVER_PASSWORD Password for HTTP basic auth (none — unauthenticated)
OPENCODE_SERVER_USERNAME Username for HTTP basic auth opencode
OPENCODE_SERVER_PASSWORD=your-password opencode serve

Authentication applies to both opencode serve and opencode web. If OPENCODE_SERVER_PASSWORD is not set, the server is unsecured — acceptable for local use, but should be set for network access.

Read the full file on GitHub · 1,152 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 1,152 lines · 106 tokens per session scan A d6884688d9d3

Subscribe to this mod's changes

opencode-server is a skill published in the GitHub repository Timmy6942025/opencode-builder-skill (2 stars, last pushed 3mo ago), licensed MIT. It adds 106 tokens to every session and 8,590 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

opendeck

Build animated, narrated HTML presentation decks — slides that reveal step-by-step as you click, hover tooltips, a thumbnail rail, fullscreen, plus AI voice narration generated in-browser via ElevenLabs that can be baked into a fully offline file. Use when the user wants a presentation, deck, or slides that animate…

open-deck-org/opendeck · 124 tokens

plannotator

Reference for using the Plannotator CLI: plan review, code review, annotating files, URLs, folders, and running local apps, annotating the last assistant message, browsing archived plan decisions, and exporting or sharing Guided Reviews. Invoke when asked to use Plannotator for anything not covered by a more specific…

backnotprop/plannotator · 73 tokens

plannotator-review

Open Plannotator's browser-based code review UI and address the returned feedback.

backnotprop/plannotator · 21 tokens

southwest

Search Southwest Airlines fares and points pricing via Patchright browser automation. SW is not in any GDS or API. Covers all fare classes, Companion Pass value, and fare drop monitoring.

borski/travel-hacking-toolkit · 40 tokens

headless-browser

Connects to Oxylabs remote headless browsers via Chrome DevTools Protocol (CDP) using Playwright or Puppeteer. Provides anti-detection, CAPTCHA handling, residential proxies, and geo-targeting built in. Use when browser automation needs remote execution, stealth capabilities, rendered pages, screenshots, PDFs, or…

oxylabs/agent-skills · 72 tokens

web-scraper-api

Production-grade web scraping with automatic anti-bot bypass, structured JSON parsing for 40+ targets, and geo-targeting. Use when the user needs to scrape web pages, extract product data, get search results, or collect structured data from supported e-commerce and search platforms without worrying about getting…

oxylabs/agent-skills · 72 tokens