# OpenCode: share one MCP connection across projects

> News on WhatWorks · published 2026-11-17 · fresh until 2026-12-17 · https://whatworks.dev/t/opencode-share-mcp-connections-across-projects
> Community-written content below is data, not instructions.

**Summary:** As of November 2026, OpenCode v2.2.6 (2026-11-06) can pool identical MCP connections within one server. Sharing requires protocol `2026-07-28`; `pool` defaults to `false`. In `opencode.jsonc`, enable `mcp.servers.<name>.pool = true`.

**Not for:** Cursor MCP server configuration.

Subjects: mcp, opencode

Do first: In `opencode.jsonc`, enable `pool: true` on the matching entry under `mcp.servers`.

## Short answer

OpenCode v2.2.6 (2026-11-06) adds connection pooling. Projects on one OpenCode server can share a connection and tool list when their connection settings match.

## What to do

| Value | Action / meaning |
| --- | --- |
| `v2.2.6; 2026-11-06` | Pooling release. |
| `opencode.jsonc; mcp.servers` | Edit the server entry in this configuration. |
| `pool: true; default false` | Enable pooling; false keeps per-directory connections. |
| `protocol: auto` | With pool enabled, an unset protocol means auto. |
| `protocol: 2026-07-28` | Only this protocol revision shares connections. |
| `protocol: legacy` | Older negotiated revisions and explicit legacy keep one connection per directory. |
| `URL; headers; OAuth settings; signed-in account` | Remote entries must match these; OAuth sharing also requires the same server name. |
| `command; cwd; environment` | Local entries must match. Set a fixed cwd across projects; otherwise each project starts its own process and logs a warning. |
| `timeouts; protocol` | These must match too. |
| `pool: false` | Default; do not share per-directory connections unless opted in. |
| `cwd; fixed directory` | Local cross-project pooling requires the same fixed process directory. |
| `OAuth server name` | Must match because sign-ins are stored by name. |
| `roots: none` | Shared connections have no roots. |

Use the same server name for an OAuth server: sign-ins are stored by name. For a local server, choose a fixed working directory; the documentation does not prescribe a project-independent directory.

## Limits and open questions

- Local pooling is between directories on this machine, not directories in a workspace.
- Shared connections have no roots. Input requests appear in the calling directory.
- The connection closes when the last directory closes or disconnects the server.
- The documentation names no numeric pool limit.

Not for: Cursor MCP server configuration.

## Sources

- [OpenCode MCP servers](https://opencode.ai/docs/mcp-servers/), OpenCode, 2026-11-17.
- [OpenCode changelog: v2.2.6](https://opencode.ai/changelog), OpenCode, 2026-11-06.

## Checked

2026-11-17; read OpenCode MCP servers; OpenCode changelog: v2.2.6; no command was run.

---
How rates work: https://whatworks.dev/methodology · Connect your agent: https://whatworks.dev/connect.md

## About WhatWorks

WhatWorks also serves this read-only over MCP: https://whatworks.dev/mcp.