PlugWiki
opencode-mcp logo

OpenCode MCP Server: Setup for Claude, Cursor and Other Apps

CommunityLocal

Lets Claude, Cursor and other assistants hand coding tasks to OpenCode, track background jobs and review the changes.

This is a community server by Alaeddine Messadi that connects your assistant to OpenCode, the open source coding agent. Your assistant can send a task, watch it run in the background, answer its questions and permission requests, and review the file changes. It is not made by the OpenCode project.

It runs on your computer and needs an OpenCode server already running, started with the command in the install notes. It needs Node.js 22 or newer. OpenCode can edit files and run commands, so the assistant gets that reach too.

Good for

  • Developers who run OpenCode and want another assistant to delegate to it
  • Claude or Cursor users who want long coding jobs to run in the background
  • Teams who work across several projects or git worktrees

Works in

12 should work

Tap an app to see how to set it up and any known problems.

Install opencode MCP

Claude Code

  1. 1

    Copy this prompt.

    Add the opencode MCP server to Claude Code. Run this command:
    
    claude mcp add opencode -- npx -y opencode-mcp
    
    Then check that it loaded and tell me if I need to sign in or restart.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires Node.js, OpenCode server running (opencode serve --port 4096), Node.js 22+.

Start OpenCode first from your project folder with opencode serve --hostname 127.0.0.1 --port 4096. Then restart your app and call the setup tool to choose a provider and model. Set OPENCODE_BASE_URL if the server is somewhere else.

Built from the package data we hold. Not yet tested by us.

Tools

  • Checks OpenCode and your provider setup

    Reports whether OpenCode is reachable, which model providers are configured and what is still missing. Run it first.

    Try: “Check that OpenCode is ready to use.”

    Read · opencode_setup

  • Asks OpenCode a question in one step

    Starts a new session, sends your prompt and returns the answer. The OpenCode agent can act on the project, not just talk.

    Try: “Ask OpenCode how the auth flow works in this repo.”

    Runs code · opencode_ask

  • Sends a task and waits for the result

    Runs a coding task through OpenCode, waits for it and returns a job ID. If the wait times out the task keeps running.

    Try: “Have OpenCode add input validation to POST /api/users.”

    Runs code · opencode_run

  • Starts a background coding task

    Sends a task and returns job, session and message IDs at once, so you can check later.

    Try: “Start OpenCode on the refactor and report back later.”

    Runs code · opencode_fire

  • Checks progress of a task

    Shows current status, pending input, todos and file counts for a session or job.

    Try: “How is the OpenCode task going?”

    Read · opencode_check

  • Waits for a task to finish

    Waits until a session or job completes, fails, needs input or reaches a time limit. Cancelling the wait does not stop OpenCode.

    Try: “Wait for the OpenCode task to finish.”

    Read · opencode_wait

  • Sends a follow-up to a session

    Continues an existing session with another message.

    Try: “Tell OpenCode to also update the tests.”

    Runs code · opencode_reply

  • Summarizes file changes from a session

    Returns a readable summary of every file change a session made, with diffs.

    Try: “Show what OpenCode changed.”

    Read · opencode_review_changes

  • Shows a session's full conversation

    Returns all messages of a session with their roles and content.

    Try: “Show the conversation from the last session.”

    Read · opencode_conversation

  • Shows project context

    Returns the current project, path, version control info, config and available agents in one call.

    Try: “What project is OpenCode working in?”

    Read · opencode_context

  • Shows a quick status dashboard

    Reports server health, provider count, session count and version control info.

    Try: “Give me OpenCode's status.”

    Read · opencode_status

  • Overviews all sessions

    Lists sessions with titles and status to find one to continue.

    Try: “Which sessions are open?”

    Read · opencode_sessions_overview

Read from the source code

Permissions

high risk · 5 things to watch

High risk

Through OpenCode the assistant can edit your files, run shell commands, change OpenCode's settings and credentials, and delete sessions, and there is no read-only mode. Approve permission requests one at a time and avoid the always-allow reply.

What it can do

  • Read your data
  • Create and change things
  • Delete things
  • Read-only mode

Watch out for

  • It can run shell commands and edit your code

    The shell tool and the task tools make OpenCode act on the project and the machine it runs on. Keep OpenCode's own permission prompts on and review the diff afterwards. github.com

  • One tool shuts the OpenCode server down

    The dispose tool terminates the running OpenCode instance, and the session delete tool removes a session and its data. github.com

  • It can change OpenCode's settings and credentials

    Tools update the config, save provider API keys and add other MCP servers to OpenCode. Only allow these when you asked for them. github.com

  • The always-approve reply is permanent for matching requests

    Replying always to a permission request approves the same kind of request again later. Prefer approving once. github.com

  • The smaller tool profile still includes risky tools

    Setting OPENCODE_TOOL_PROFILE to essential gives 25 tools, but it keeps the run, fire, reply, ask and session abort tools, so OpenCode can still change code. github.com

Security advisories

No published security advisories as of Nov 1, 2026.

Technical details
Talks toThe OpenCode server at OPENCODE_BASE_URL (http://127.0.0.1:4096 by default). Whatever model providers OpenCode uses
Sign-in and keysNo sign-in by default. Optional server username and password, or a bearer token, can be set in environment variables. Job records are kept in a local state folder.

Questions

Is the OpenCode MCP server official, and is it the OpenCode client?

No. It is a community server by Alaeddine Messadi that lets your assistant drive an OpenCode server, and the OpenCode team (sst/opencode) did not make it. It is not the OpenCode client itself: you install and run OpenCode separately.

What do I need running first?

An OpenCode server on your computer, started from your project folder with the command in the install notes. You also need Node.js 22 or newer, and OpenCode 1.x.

Does it need an API key?

Not for this server. OpenCode itself needs a configured model provider, and you can pick it with the setup tool. A server username, password or bearer token is optional.

Can I use fewer tools?

Yes. Set OPENCODE_TOOL_PROFILE to essential for a 25-tool set. It still lets the assistant start coding work, so it is not read-only.

Can it run tasks in the background?

Yes. The fire tool starts a task and returns IDs, and the check and wait tools follow it later. A timeout while waiting does not mean the task failed.

Can two tasks run in the same project?

They can, but the README warns that independent sessions do not isolate file changes. Use separate folders or git worktrees for overlapping tasks.

How do I add it to Claude Code?

Use the Claude Code tab in the install box above, and start the OpenCode server first.

Information

updated Nov 2, 2026

Publisher
Community
Package
opencode-mcp
Registry
npm
Transport
stdio
Auth
None
Version
3.1.0
License
MIT
Last commit
Oct 29, 2026

GitHubnpmChangelogIssues

Sources

Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.

Show all 3
  1. github.com · github.com
  2. github.com · github.com
  3. www.npmjs.com · npmjs.com

Facts from the official MCP registry, GitHub, npm, PyPI and the Docker catalog. Updated Nov 2, 2026.