OpenCode MCP (Model Context Protocol)

MCP (Model Context Protocol) allows OpenCode to connect AI models with real-world tools and systems through MCP servers.
Instead of responding with text only, models can browse websites, read repositories, automate workflows, and interact with external environments.
This page explains what MCP is, how MCP works in OpenCode, and when you should use it.

What is MCP in OpenCode?

MCP is a protocol that lets AI models access external tools through a standardized interface.
In OpenCode, MCP is used to:
  • Control browsers and web pages
  • Read and modify files or repositories
  • Trigger automation workflows
  • Interact with design tools and internal systems
MCP is not a plugin system and not simple tool calling.
It defines a consistent way for models, clients, and servers to communicate with tools safely and predictably.

How MCP Works in OpenCode

A typical MCP setup in OpenCode has four parts:
  1. Model
    The AI model (Claude, Gemini, local models, etc.)
  2. OpenCode MCP Client
    The MCP client built into OpenCode that manages connections and permissions.
  3. MCP Server
    A server that exposes tools and capabilities (browser, GitHub, automation, etc.)
  4. Tools / Skills
    Concrete actions the model can invoke, such as clicking a page, reading a file, or running a workflow.
OpenCode handles the MCP client layer, so you only need to configure which servers and tools are available.

MCP Servers in OpenCode

An MCP server exposes a set of tools that models can use.
Common MCP server types include:
  • Browser automation servers
  • Code and repository access servers
  • Workflow and automation servers
  • Custom internal tool servers
MCP servers can run locally or remotely, depending on your setup and security requirements.

Popular MCP Integrations

  • Playwright MCP – browser automation and testing
    Playwright MCP Guide
  • GitHub MCP – repository access and code workflows
  • Figma MCP – design file inspection and review
  • n8n MCP – workflow and automation pipelines
Each integration focuses on a specific domain and exposes only the tools it supports.

MCP Skills and Agent Skills

In OpenCode, skills are reusable capabilities that agents can apply across tasks.
MCP skills are typically built on top of MCP servers and allow agents to:
  • Perform multi-step tool interactions
  • Reuse workflows across sessions
  • Combine reasoning with real-world actions
Skills are especially useful for long-running or repeatable workflows, such as audits, reviews, and automation tasks.

When Should You Use MCP?

You should use MCP if your workflow requires more than pure text generation.
Common scenarios include:
  • Controlling a browser to test or scrape pages
  • Reading or modifying repositories and files
  • Reviewing design assets or structured data
  • Automating multi-step workflows
  • Integrating AI into internal tools or systems
If a task needs state, tools, or external context, MCP is usually the right choice.

MCP Configuration and Setup

To start using MCP in OpenCode, you need to:
  • Configure MCP servers
  • Define permissions and access rules
  • Enable tools or skills as needed
For step-by-step setup instructions, see:

MCP Use Cases (Real Examples)

MCP is commonly used for:
  • Browser automation – testing, scraping, and interaction
  • Design review – inspecting Figma files or assets
  • Code workflows – repository analysis and refactoring
  • Automation – triggering pipelines and integrations
  • Internal tooling – connecting AI to company systems
These use cases combine model reasoning with real-world actions.

Related Guides