opencode-server

opencode-server is a skill for Claude Code, Codex from Timmy6942025/opencode-builder-skill. It costs 106 tokens per session (8,590 once invoked), scanned A, original, MIT.

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

Written for no agent in particular: nothing here depends on one. Also seen: mentions AGENTS.md; mentions OpenCode.

Good fit 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.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/timmy6942025/opencode-builder-skill/opencode-server
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.

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.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for opencode-server

README.md
[![agentmods](https://agentmods.dev/badge/skills/timmy6942025/opencode-builder-skill/opencode-server/github.svg)](https://agentmods.dev/skills/timmy6942025/opencode-builder-skill/opencode-server)
Your own site
<a href="https://agentmods.dev/skills/timmy6942025/opencode-builder-skill/opencode-server"><img src="https://agentmods.dev/badge/skills/timmy6942025/opencode-builder-skill/opencode-server/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for opencode-server

Your own site · 80×15
<a href="https://agentmods.dev/skills/timmy6942025/opencode-builder-skill/opencode-server"><img src="https://agentmods.dev/badge/skills/timmy6942025/opencode-builder-skill/opencode-server.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00106 $0.08590
Opus 5.5 $0.00042 $0.03436
Sonnet 5.5 $0.00021 $0.01718
Haiku 4.5 $0.00011 $0.00859

Measured 1mo ago against content hash d6884688d9d3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo ago.

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. 1mo ago 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 4mo ago), licensed MIT. It adds 106 tokens to every session and 8,590 once invoked, about $0.0004 per session on Opus 5.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

api-design-document

Design a production-ready API specification aligned with OpenAPI 3.1 standards. Covers resource modeling, endpoint design, request/response contracts, authentication, versioning strategy, error handling, rate limiting, and pagination. Use when designing a new REST, GraphQL, or event-driven API.

fattain-naime/engineering-docs · 62 tokens

database-design-document

Design a production database schema including ERD, table definitions, data dictionary, indexing strategy, normalization decisions, and migration plan. Use when designing a new database, adding major entities, or documenting an existing schema.

fattain-naime/engineering-docs · 46 tokens

go-clean-architecture

Use when scaffolding or refactoring a Go service into a framework-agnostic clean (hexagonal) architecture: Domain, Usecase, Repository, Delivery layers, inward dependency rule, 'framework/database is a detail'. Apply when untangling a monolith or checking whether business logic is testable without HTTP or DB.

muratmirgun/gophers · 70 tokens

go-graphql

Use when building or reviewing a GraphQL API in Go. Covers library choice (gqlgen vs graph-gophers), schema design (nullability, pagination, mutation envelopes), thin resolver pattern, per-request DataLoaders for N+1, authentication via context plus schema directives, error presenters, subscription lifecycle (context…

muratmirgun/gophers · 107 tokens

go-grpc

Use when implementing or reviewing gRPC servers/clients in Go. Covers .proto organisation, code generation with protoc/buf, server bootstrap (interceptors, health, graceful shutdown), client patterns (reuse, deadlines, retries), status.Code error handling, streaming, TLS/mTLS, and bufconn testing. Apply when writing…

muratmirgun/gophers · 84 tokens

build-falco-web-app

Build or modify a Falco web application in idiomatic F#, using functional routing, request and response helpers, explicit ASP.NET Core integration, security boundaries, and focused tests.

gaelic-ghost/socket · 42 tokens