OpenCode MCP Integration: Connect to MCP Servers (2026)
Sign in Book a demo
Sign in Book a demo
OpenCode MCP Integration Guide: Connect MCP Servers with Arcade.dev
Manveer Chawla<br>JULY 1, 2026<br>8 MIN READ<br>TUTORIALS
The Model Context Protocol (MCP) lets OpenCode trigger pipelines or interact with developer tools such as Git directly from the editor. Local command-based connections are straightforward, but adding more services can create configuration sprawl, credential management risk, and raw MCP tool wrappers that are hard for agents to use reliably.
Arcade.dev is an action runtime, not just a routing gateway. Through its MCP gateway, OpenCode gets access to agent-optimized tools through one endpoint, with native OAuth for gateway authentication and authorization, downstream token vaulting, structured execution logs, and managed tool execution.
This guide walks developers through testing a local MCP server in OpenCode and connecting OpenCode to Arcade through a user-bound OAuth gateway session.
TL;DR: OpenCode MCP Setup with Arcade.dev
Install the local Git test server integration: uvx mcp-server-git
Configure opencode.jsonc to define both your local test server and the remote Arcade MCP gateway.
Send a test prompt like List unstaged files in the repo. to verify the local connection.
Route tool calls through your Arcade MCP Gateway URL, for example https://api.arcade.dev/mcp/.
Use OpenCode’s remote MCP OAuth flow to authenticate with Arcade Auth. Do not put a static Arcade API key in the default OpenCode config.
Quickstart: Connect OpenCode to a Local MCP Server
Setting up locally first lets you confirm the OpenCode MCP workflow before connecting to a remote gateway with more services.
Step 1: Start the Local Git MCP Server
Use uvx to initialize a local Git MCP server.
Terminal Command:
uvx mcp-server-git<br>Step 2: Add the MCP Server to Your OpenCode Config
Add the local server to your OpenCode MCP configuration file.
Configuration File (opencode.jsonc):
// ~/.config/opencode/opencode.jsonc<br>"$schema": "https://opencode.ai/config.json",<br>"mcp": {<br>"git-mcp": {<br>"enabled": true,<br>"type": "local",<br>"command": ["uvx", "mcp-server-git"],<br>},<br>},<br>Step 3: Verify OpenCode Detects the MCP Connection
Restart OpenCode and open the MCP connections panel. A successful integration displays a connected status for the local server.
Test Prompt: Query Your Repository Through MCP
With the server connected, you can check your unstaged or specific files using natural language directly within your IDE.
User Prompt:
List unstaged SQL files in the repo.
Why Connect OpenCode to Arcade Instead of Raw MCP Servers
OpenCode can connect directly to individual MCP servers. That works for simple local tests, but it becomes tedious when every service has its own configuration block, credential format, timeout behavior, and raw tool schema.
Passing static tokens through environment variables or config files increases exposure through local process access, logs, accidental commits, and poorly isolated tool execution. Arcade’s MCP gateway addresses this by keeping downstream service credentials out of OpenCode config and prompts.
Raw MCP tool wrappers also hurt agent reliability. They can expose large schemas, require brittle parameters, and cause the assistant to spend extra context correcting malformed tool calls. Arcade’s tool catalog is optimized for natural-language intents, so OpenCode can request an action while Arcade handles the deterministic tool call behind the gateway.
OpenCode authenticates to Arcade with OAuth, and Arcade vaults downstream service tokens separately. That separation keeps service tokens out of the editor config while preserving a user-bound gateway session for tool execution.
Native OpenCode MCP vs Arcade Action Runtime
Native MCP: Static Tokens in Local Config
In the native approach, hardcoding an API key into configuration files means OpenCode sends the raw token directly to the MCP server. That token can leak through local files, logs, process access, accidental commits, or a poorly isolated tool path.
Native Configuration Snippet:
"environment": { "STRIPE_API_KEY": "sk_live_12345" } // Vulnerable<br>Arcade Action Runtime: OAuth, Token Vaulting, and Managed Tool Execution
In the Arcade approach, OpenCode authenticates to the Arcade gateway through OAuth. Arcade separately vaults downstream service credentials. This separates how OpenCode authenticates to Arcade from how Arcade authenticates to downstream services.
OpenCode sends an intent, and Arcade uses the vaulted downstream token at execution time. The gateway session is tied to the authenticated user, while downstream credentials stay out of the OpenCode configuration and model context.
Arcade Configuration Snippet:
"oauth": {} // OpenCode uses OAuth for the Arcade gateway session<br>OpenCode MCP Architecture Comparison
Technical DimensionNative OpenCode MCP SetupArcade Action Runtime ApproachAuthentication & Authorization...