Live survey315 models · 14 providers · 23,592 auditsAudited implement · SAFE →What changedHow we verifyllms.txt

MCP server · Audited from source

OpenCode MCP server

by alaeddinemessadi/opencode-mcpMIT licenceAudited 7 Oct 2026 · source aa814d1c2a88

npm opencode-mcp 3.0.0stdio★ 145
!CAUTIONGrade B · 89/100 · 7 Oct 2026 · aa814d1
145GitHub stars

Is it safe? With care — CAUTION, grade B (89/100). It exposes 86 tools: 68 read, 16 write and 2 destructive. The audit recorded 10 findings (0 critical, 0 high, 2 medium, 8 low). Maintainer's description: MCP server for OpenCode AI — 70 tools, 10 resources, 5 prompts. Use npx opencode-mcp with Claude Desktop, Claude Code, Cursor, Windsurf, or any MCP client.

Ask an AI about this pageGChatGPTCClaudePPerplexityGeGeminiXGrok
More
Cite

Cite this page

ModelsAtlas. “OpenCode MCP server (alaeddinemessadi/opencode-mcp)”. Retrieved 7 Oct 2026. https://modelsatlas.com/mcp/alaeddinemessadi/opencode

Copy of mcp/alaeddinemessadi/opencode-mcp: identical text; the original is the page to read and cite.

Trust audit

Audit 0.4.1 · full source read 7 Oct 2026

Trust score89/100!CAUTION B
0 critical0 high2 medium8 low0 info

10 findings, listed below with the file and line each was found on. Grade A needs a sandboxed behavioural run too; this audit read the source only.

What the source does

  • FilesystemDeclared1 observation
  • NetworkDeclared3 observations
  • ShellNone observedNothing seen in the source
  • DependenciesNot pinnedSome ranges float
  • SecretsNone foundNo keys in source

“Declared” means the server says it does this and the source agrees. Browser, file and shell access are expected of some kinds of server.

Five audit layers

LayerWhat we checkResult
L0 ProvenanceRepo owner, licence, archive status, activityPASS
L1 Static sourceSecrets, path traversal, supply chainWARN 8 findings
L2 InstructionsPrompt injection and authority framing in docs and tool descriptionsPASS 1 finding
L3 InventoryDeclared tools match the sourceWARN 1 finding
L4 SandboxRun in isolation and watch behaviourSKIPPED

Provenance & runtime

Who published it, and what the audit could and could not run

Provenance

  • Repository owner alaeddinemessadiUser accountAccount type recorded when we read the repository.
  • PackagePublished on npmopencode-mcp at version 3.0.0
  • LicenceMITFrom the repository, as read at the audited commit.
  • Last push18 days agoActivity of the repository when we read it.
  • Source commit readaa814d1c2a88The audit covers exactly this commit, read on 7 Oct 2026.

Runtime

  • Sandbox runNot run yetThis audit read the source only; it did not execute the server.
  • Tool inventory86 declaredRead from the source and classed read, write or destructive.

Every value here is read from the record's own repository and audit.Suggest a correction

Findings (10)

Sorted by severity

MEDIUMNetwork egressnet.raw_ip · src/helpers.ts:622
F-04 Network egressCWE-200 · CWE-319Layer L1
tips.push("- Verify OPENCODE_BASE_URL is correct (default: http://127.0.0.1:4096)");
Why
No further detail recorded for this rule.
Fix
—
MEDIUMFilesystem / pathmcp.destructive_tools
F-05 Filesystem / pathCWE-22 · CWE-59Layer L3
opencode_session_delete, opencode_tui_clear_prompt
Why
2 tool(s) can delete or overwrite
Fix
prefer a read-only mode or scoped tokens; the page states the blast radius
LOWFilesystem / pathfs.system_paths · tests/project-tool.test.ts:123
F-05 Filesystem / pathCWE-22 · CWE-59Layer L1
const result = await callInit({ path: "/etc/foo" });
Why
No further detail recorded for this rule.
Fix
—
LOWFilesystem / pathfs.system_paths · tests/tools.test.ts:1563
F-05 Filesystem / pathCWE-22 · CWE-59Layer L1
patterns: ["/etc/hosts"],
Why
No further detail recorded for this rule.
Fix
—
LOWNetwork egressnet.raw_ip · README.md:88
F-04 Network egressCWE-200 · CWE-319Layer L1
| `OPENCODE_BASE_URL` | Server endpoint; defaults to `http://127.0.0.1:4096` |
Why
No further detail recorded for this rule.
Fix
—
LOWNetwork egressnet.raw_ip · docs/configuration.md:9
F-04 Network egressCWE-200 · CWE-319Layer L1
| `OPENCODE_BASE_URL` | `http://127.0.0.1:4096` | OpenCode HTTP endpoint |
Why
No further detail recorded for this rule.
Fix
—
LOWNetwork egressnet.raw_ip · docs/configuration.md:44
F-04 Network egressCWE-200 · CWE-319Layer L1
claude mcp add opencode --env OPENCODE_BASE_URL=http://127.0.0.1:8080 -- npx -y opencode-mcp
Why
No further detail recorded for this rule.
Fix
—
LOWNetwork egressnet.raw_ip · scripts/mcp-smoke-test.mjs:20
F-04 Network egressCWE-200 · CWE-319Layer L1
baseUrl: env.OPENCODE_BASE_URL ?? "http://127.0.0.1:4096",
Why
No further detail recorded for this rule.
Fix
—
LOWSupply chainsupply.unpinned · package.json
F-08 Supply chainCWE-829 · CWE-1357Layer L1
@modelcontextprotocol/core, @modelcontextprotocol/server, @opencode-ai/sdk, zod, @modelcontextprotocol/client, @modelcontextprotocol/sdk, @types/node, @vitest/coverage-v8
Why
10 dependency range(s) float
Fix
pin exact versions or ship a lockfile
LOWPrompt injectionprompt.transfer_instruction · docs/getting-started.md:72
F-01 Prompt injectionCWE-94 · CWE-1427Layer L2
Check its current state and pending input. Use `opencode_job_list` to rediscover tracked work after reconnecting. A server/network error or `unknown` state is not a reason to submit the same prompt ag
Why
an instruction to move sensitive data to an outside destination
Fix
remove; a skill never needs the user's secrets off the machine

Tools it exposes

86 declared in source · 2 destructive

68 read16 write2 destructive

2 tools can delete or overwrite. An agent that can be talked into calling a tool can be talked into calling this one, so give it a token scoped to what you need.

ToolRiskWhat it does
opencode_session_deletedestructiveDelete a session and all its data
opencode_tui_clear_promptdestructiveClear the current prompt text in the TUI
opencode_auth_setwriteSet authentication credentials for a provider (e.g. API key). Credentials are stored globally and shared across all projects.
opencode_command_executewriteExecute a slash command in a session (e.g. /init, /undo, /redo)
opencode_config_updatewriteUpdate the opencode configuration. Pass a partial config object with fields to update.
opencode_logwriteWrite a log entry to the opencode server
opencode_mcp_addwriteAdd an MCP server dynamically to opencode
opencode_message_sendwriteSend a prompt message to a session and wait for the AI response. Use parts to send text, and optionally specify a model.
opencode_message_send_asyncwriteSend a prompt asynchronously and return its messageId. Pass sessionId and messageId to opencode_wait to observe this exact turn.
opencode_provider_oauth_authorizewriteStart OAuth authorization for a provider
opencode_replywriteSend a follow-up message to an existing session. Use this to continue a conversation started with opencode_ask or opencode_session_create.
opencode_runwriteSend a task and wait for its correlated response. Returns a durable job ID; an observation timeout leaves the remote job running and can be resumed with opencode_wait.
opencode_session_createwriteCreate a new session. Optionally provide a parentID to create a child session, and a title.
opencode_session_initwriteAnalyze the app and create AGENTS.md for a session. NOTE: This is a long-running operation that may take 30-60+ seconds depending on project size.
opencode_session_updatewriteUpdate session properties (e.g. title)
opencode_shell_executewriteRun a shell command through the opencode session
opencode_tui_execute_commandwriteExecute a slash command through the TUI (e.g.
opencode_tui_submit_promptwriteSubmit the current prompt in the TUI (equivalent to pressing Enter)
buildreadBuild agent
opencode_agent_listreadList all available agents with their names, descriptions, and modes (primary/subagent)
opencode_askreadAsk OpenCode a question in one step. Creates a new session, sends your prompt, and returns the AI response. This is the easiest way to interact with OpenCode.
opencode_checkreadGet current task status, pending input, todos and file counts. Uses session summary metadata instead of fetching patches. Pass jobId for exact durable turn correlation; detailed includes response text.
opencode_command_listreadList all available commands (built-in and custom slash commands)
opencode_config_getreadGet the current opencode configuration
opencode_config_providersreadList all configured providers and their default models
opencode_contextreadGet full project context in one call: current project, path, VCS info, config, and available agents. Useful to understand the current state before starting work.
opencode_conversationreadGet the full conversation history of a session, formatted for easy reading. Shows all messages with their roles and content.
opencode_events_pollreadPoll project events from OpenCode, or explicitly select global scope. Collects up to maxEvents within the duration. Connection failures are reported with any partial events; stopping observation does not abort remote work.
opencode_file_listreadList files and directories at a path
opencode_file_readreadRead the content of a file
opencode_file_statusreadGet status for tracked files (VCS changes: modified, added, deleted, etc.)
opencode_find_filereadFind files and directories by name (fuzzy match)
opencode_find_symbolreadFind workspace symbols by name (functions, classes, variables, etc.)
opencode_find_textreadSearch for text patterns in project files (regex supported). Returns file paths, line numbers, and matching lines.
opencode_firereadDispatch a durable background task and return its job, session and message IDs immediately. Use opencode_check or opencode_wait to observe; job_cancel stops the task.
opencode_formatter_statusreadGet the status of configured formatters
opencode_healthreadCheck server health and version
opencode_instance_disposereadDispose the current opencode instance (shuts it down). WARNING: This is destructive and will terminate the server.
opencode_job_inputreadRespond to a job
opencode_job_listreadList locally retained jobs in this OpenCode server and credential scope.
opencode_lsp_statusreadGet the status of LSP (Language Server Protocol) servers
opencode_mcp_statusreadGet the status of all MCP servers configured in opencode
opencode_message_getreadGet details of a specific message in a session
opencode_message_listreadList all messages in a session with formatted output showing roles and content
opencode_path_getreadGet the current working path of the opencode server
opencode_permission_listreadList all pending permission requests across all sessions. When a session is blocked waiting for approval (e.g. to run a shell command or access a file outside the project), it appears here. Respond with
opencode_project_currentreadGet the current active project
opencode_project_initreadNo description in the source
opencode_project_listreadList all projects known to the opencode server
opencode_provider_auth_methodsreadGet available authentication methods for all providers
opencode_provider_listreadList all configured providers with their connection status. Returns a compact summary — use opencode_provider_models to see models for a specific provider.
opencode_provider_modelsreadList available models for a specific provider. Call opencode_provider_list first to see provider IDs.
opencode_provider_oauth_callbackreadHandle OAuth callback for a provider
opencode_provider_testreadQuick-test whether a provider is working. Creates a temporary session, sends a trivial prompt, checks the response, and cleans up. Great for debugging auth issues.
opencode_question_listreadList pending OpenCode questions, optionally filtered to a session.
opencode_question_rejectreadReject a pending OpenCode question explicitly.
opencode_question_replyreadAnswer an OpenCode question request. Supply one array of selected labels or free text per question.
opencode_review_changesreadGet a formatted summary of all file changes made in a session. Shows diffs in a readable format.
opencode_session_abortreadAbort a running session
opencode_session_childrenreadGet child sessions of a session
opencode_session_diffreadGet the diff for a session, optionally for a specific message
opencode_session_forkreadFork an existing session, optionally at a specific message
opencode_session_getreadGet details of a specific session by ID
opencode_session_listreadList all sessions
opencode_session_permissionreadRespond to a permission request in a session. Use
opencode_session_revertreadRevert a message in a session
opencode_session_searchreadSearch sessions by keyword in title. Useful for finding a specific session among many.
opencode_session_sharereadShare a session publicly
opencode_session_statusreadGet status for all sessions (running, idle, etc.)
opencode_session_summarizereadSummarize a session using a specified model. NOTE: This is a long-running operation that may take 30-60+ seconds.
opencode_session_todoreadGet the todo list for a session
opencode_session_unrevertreadRestore all reverted messages in a session
opencode_session_unsharereadUnshare a previously shared session
opencode_sessions_overviewreadGet a quick overview of all sessions with their titles and status. Useful to find which session to continue working in.
opencode_setupreadCheck OpenCode status, provider configuration, and optionally initialize a project directory. Use this as the first step when starting work — it tells you what is ready and what still needs configuration.
opencode_statusreadGet a quick status dashboard: server health, provider count, session count, and VCS info. Lighter than opencode_setup — good for at-a-glance checks.
opencode_tool_idsreadList all available tool IDs that the LLM can use (experimental)
opencode_tool_listreadList tools with JSON schemas for a given provider and model (experimental)
opencode_tui_append_promptreadAppend text to the TUI
opencode_tui_open_helpreadOpen the help dialog in the TUI
opencode_tui_open_modelsreadOpen the model selector in the TUI
opencode_tui_open_sessionsreadOpen the session selector in the TUI
opencode_tui_open_themesreadOpen the theme selector in the TUI
opencode_tui_show_toastreadShow a toast notification in the TUI
opencode_vcs_inforeadGet VCS (version control) info for the current project (branch, remote, status)
opencode_waitreadWait for a session or durable job. Returns completed, failed, input_required, or a resumable timeout. Cancelling this wait stops observation; use job_cancel or session_abort to stop OpenCode.

Install

Package version 3.0.0 · audited commit aa814d1

Read the findings first. The most severe is Network egress (medium) at src/helpers.ts.

One-click links open your editor with the config below filled in, exactly as the snippets show it, pinned to version 3.0.0. The audit covers commit aa814d1 only.

claude mcp add opencode-mcp --env OPENCODE_SERVER_PASSWORD=${OPENCODE_SERVER_PASSWORD} -- npx -y [email protected]

The command pins the package version recorded in the source (3.0.0); the audit covers commit aa814d1c2a88. Transport: stdio. Reads this environment variable: OPENCODE_SERVER_PASSWORD. Give it the narrowest token it needs.

Audit history

  1. !CAUTION B 89 / 100

    First audit · aa814d1c2a88

Other ratings

Cited, never blended into our score

No third-party security ratings are recorded for this server yet. When they exist they appear here with their source and date, beside, not inside, our grade.

Questions about OpenCode MCP server

What is the OpenCode MCP server?
MCP server for OpenCode AI — 70 tools, 10 resources, 5 prompts. Use npx opencode-mcp with Claude Desktop, Claude Code, Cursor, Windsurf, or any MCP client.
What tools does OpenCode expose?
86 in total: 68 read-only, 16 that write, and 2 that can delete or overwrite (opencode_session_delete, opencode_tui_clear_prompt). Every one is listed on this page with its risk.
Is OpenCode safe to connect to an agent?
With care. The audit graded it B (89/100) and found 10 things worth knowing before you trust this server, listed below with the exact line each was found on. Separately from the audit: 2 of its tools can destroy data, so scope the token you give it to what you actually need.
What credentials does OpenCode need?
It reads OPENCODE_SERVER_PASSWORD from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does OpenCode run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as opencode-mcp at 3.0.0.
How current is this page?
The grade is for one exact copy of the source (aa814d1c2a88), read on 2026-10-07. The repository is watched and re-audited when it changes.

Sources

  • alaeddinemessadi/opencode-mcp on GitHub — the source we read, its licence, stars and activityObserved · 7 Oct 2026
  • ModelsAtlas trust audit — CAUTION verdict for commit aa814d1c2a88Observed · 7 Oct 2026

Spotted something wrong? Report a correction · Methodology

Keep going in your AI

Opens with this page as the source. We add nothing else to the prompt.