Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
OPENCODE_MCP_MODENomanaged 또는 attachURL 설정 시 attach, 아니면 managed
CLAUDE_PROJECT_DIRNo기본 cwd fallback, 지정 시 절대 경로
OPENCODE_MCP_AIRGAPNomanaged 자식에 air-gap 기본값 적용true
OPENCODE_MCP_ON_EXITNoabort 또는 endabort
OPENCODE_MCP_LOG_LEVELNodebug, info, warn, errorinfo
OPENCODE_MCP_END_ACTIONNodelete 또는 archivedelete
OPENCODE_MCP_SERVER_URLNoattach 필수; 유효 http(s), userinfo 금지, 비-loopback은 HTTPS 기본
OPENCODE_MCP_SERVE_ARGSNo공백 구분 인자; --hostname, --port, --mdns*, --cors 금지
OPENCODE_MCP_DEFAULT_CWDNo절대 경로CLAUDE_PROJECT_DIR, 아니면 프로세스 cwd
OPENCODE_SERVER_PASSWORDNoattach 암호; managed 자식에는 임의 암호 생성
OPENCODE_SERVER_USERNAMENoOpenCode server 사용자명opencode
OPENCODE_MCP_MAX_SESSIONSNo동시 추적 세션(활성+quarantined) 상한, 양의 정수 ≤ 10000256
OPENCODE_MCP_OPENCODE_BINNo실행 파일 경로/이름opencode
OPENCODE_MCP_REMOTE_PATHSNo원격 경로의 local realpath 검사 생략false
OPENCODE_MCP_ALLOWED_ROOTSNopath.delimiter 구분 허용 루트; 각 항목은 trim되며 절대 경로여야 함; 명시적으로 설정했는데 유효 항목이 0개면 시작 실패기본 cwd
OPENCODE_MCP_DEFAULT_AGENTNo기본 agent
OPENCODE_MCP_DEFAULT_MODELNo기본 provider/model; 설정 시 반드시 provider/model 형식이어야 함(아니면 시작 실패)
OPENCODE_MCP_DEFAULT_SANDBOXNoread-only, workspace-write, danger-full-accessworkspace-write
OPENCODE_MCP_MAX_OUTPUT_CHARSNo양의 정수 content 제한20000
OPENCODE_MCP_HEARTBEAT_SECONDSNo진행 heartbeat 간격 초; 최대 600(Claude Code의 30분 idle 중단을 이 heartbeat로 막으므로 더 큰 값은 거부됩니다)15
OPENCODE_MCP_SSE_STALL_SECONDSNoSSE 무응답 제한 초35
OPENCODE_MCP_ALLOW_INSECURE_HTTPNoloopback 외 HTTP 허용false
OPENCODE_MCP_CHILD_ENV_ALLOWLISTNo쉼표 구분 이름/`PREFIX_*`; 비면 환경 상속 후 scrub
OPENCODE_MCP_READ_RETRY_ATTEMPTSNoadmission GET 시도 횟수(최초 포함), 1–3 정수3
OPENCODE_MCP_RESPONSE_LOOP_LIMITNo10초 안의 연속 응답 루프 임계값, 3–20 정수; 0은 비활성화6
OPENCODE_MCP_STATUS_POLL_SECONDSNo상태 polling 간격 초30
OPENCODE_MCP_TURN_TIMEOUT_SECONDSNo기본 turn 제한 초3600
OPENCODE_MCP_CLEANUP_TIMEOUT_SECONDSNo취소/정리 제한 초15
OPENCODE_MCP_DEFAULT_APPROVAL_POLICYNonever, on-requestnever
OPENCODE_MCP_REQUEST_TIMEOUT_SECONDSNoHTTP 요청 제한 초. Node fetch/undici의 headers/body timeout으로 실제 HTTP 대기는 최대 300초30
OPENCODE_MCP_STARTUP_TIMEOUT_SECONDSNo시작 제한 초. Node fetch/undici의 headers/body timeout으로 실제 HTTP 대기는 최대 300초60
OPENCODE_MCP_APPROVAL_TIMEOUT_SECONDSNo승인 대기 제한 초600
OPENCODE_MCP_MAX_TURN_TIMEOUT_SECONDSNo최대 turn 제한 초; 기본값 이상21600

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
opencodeA

Use this to delegate a new coding task to OpenCode and run its first turn. Blocks until the turn finishes (or wait-seconds elapses, up to the turn timeout). The final answer and status are in structuredContent.content / structuredContent.status; the text response mirrors the same content. Returns a session id (also usable as threadId/conversationId) to continue with opencode-reply. sandbox selects a cooperative permission profile for OpenCode's own tools (read-only / workspace-write / danger-full-access) — it is not OS-level isolation, OpenCode can still run arbitrary shell commands unless a rule denies it. approval-policy controls permission prompts raised by OpenCode: never (default) auto-denies them, on-request asks interactively when the client supports it. Cancelling or stopping the call that OWNS this turn (Esc, TaskStop, a client timeout) cancels the OpenCode turn; a call that only joined an existing turn as an observer (e.g. a duplicate request-id) detaches without cancelling anything. To stop waiting but keep the turn running, pass wait-seconds and poll opencode-status. Use detail/max-output-chars to keep this response small (the full answer stays readable with opencode-output); request-id makes a retried call safe to repeat; output-schema asks the final message to be one JSON value matching a schema. To run several tasks in parallel, start each with wait-seconds:0 and check them together with opencode-status ids/wait-for.

opencode-replyA

Use this to continue an existing OpenCode session started with opencode, after reading its previous result from structuredContent.content. Requires exactly one of sessionId, threadId or conversationId, plus a new prompt. Blocks until the turn finishes (or wait-seconds elapses, up to the turn timeout); the answer is in structuredContent.content. sandbox and approval-policy stay fixed for the life of the session. Cancelling or stopping the call that OWNS this turn (Esc, TaskStop, a client timeout) cancels the OpenCode turn; a call that only joined an existing turn as an observer (e.g. a duplicate request-id) detaches without cancelling anything. To stop waiting but keep the turn running, pass wait-seconds and poll opencode-status. Same detail/max-output-chars/request-id/output-schema options as opencode; output-schema applies only to this turn, never a stored default.

opencode-statusA

Use this to check on or wait for a running OpenCode turn, or — with no id — to list the sessions tracked by this server. With an id it can block up to wait-seconds (max 600) and will also relay any pending approval prompts to you, so it is not purely read-only: it can act on the session while waiting. Without an id it returns the tracked session list in structuredContent.sessions and structuredContent.content. Pass ids (up to 16, instead of a single sessionId/threadId/conversationId) to check several sessions in one call — pair with wait-seconds:0 on opencode/opencode-reply to fan work out in parallel, then wait-for "any" (default) or "all" here to collect the results; batch items are always compact and max-output-chars becomes the shared answer budget split across them. detail/max-output-chars shrink a single-session answer the same way as on opencode.

opencode-cancelA

Use this to stop the turn currently running on an OpenCode session without ending the session, so a new opencode-reply can be sent afterwards. Requires exactly one of sessionId, threadId or conversationId. Idempotent when the session is already idle; the result is in structuredContent.content.

opencode-outputA

Page through a turn's full retained answer, tool-call log, structured output, or the OpenCode-reported file diff for that turn. Use detail:"compact" and max-output-chars on opencode/opencode-reply/opencode-status to keep every normal answer small; come back here with the same turn number to read more of it, one page at a time (offset/limit), without paying for the full text on every call — useful together with wait-seconds:0 plus opencode-status ids/wait-for fan-out, reading each turn's full output here only for the ones that need it. Requires exactly one of sessionId, threadId or conversationId, plus turn; section defaults to "answer". Retained output expires (OUTPUT_UNAVAILABLE) and is dropped once opencode-end succeeds, so read what you need before ending the session. Read-only: never mutates OpenCode.

opencode-infoA

Discover this server's configuration and OpenCode's current catalogs without starting a session. section "server" (default) reports this server's version, mode, defaults and limits (maxOutputChars, maxBatchIds, output retention, request-id table size, …); "models" and "agents" list what OpenCode currently advertises for a given cwd; "roots" lists this server's allowed working-directory roots. "models"/"agents"/"roots" are paginated (offset/limit) and return a snapshot-id to keep reading the same consistent snapshot; pagination arguments are invalid for "server". Read-only; the "server" section never starts OpenCode.

opencode-endA

Use this to finish working with an OpenCode session: it stops any running turn, rejects any leftover permission prompts, then deletes or archives the session and forgets it (action, default 'delete' — this server's configured OPENCODE_MCP_END_ACTION). Requires exactly one of sessionId, threadId or conversationId. Idempotent: ending an unknown or already-ended session returns structuredContent.status "not_found" without contacting OpenCode.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.4/5.0

Scored across 7 tools

Disambiguation4/5

Each tool maps to a distinct stage of the session lifecycle (start, reply, status, cancel, output, info, end), so most are easy to tell apart. The only friction points are opencode-cancel vs opencode-end (both stop a running turn, though only end deletes the session) and opencode-status vs opencode-output (both surface turn content, though output pages the full retained text).

Naming Consistency4/5

All tools share a clear `opencode-` prefix in consistent kebab-case, which reads cleanly as a family. The only deviation is the bare `opencode` create tool and the fact that suffixes mix nouns (status, output, info) with verbs (reply, cancel, end), but the pattern is still predictable.

Tool Count5/5

Seven tools is well-scoped for a coding-agent delegation server, with each tool earning its place across session creation, continuation, monitoring, cancellation, output retrieval, discovery, and teardown. Nothing seems redundant or filler.

Completeness4/5

The surface covers a full session lifecycle: create, reply, status/list, cancel, output paging, config/catalog discovery, and end/cleanup. Coverage is strong; only minor conveniences (e.g. a dedicated session-list beyond the status-without-id path) are absent, which agents can work around.

Maintenance

ActivityMaintained
ResponsivenessNo issues