From ae68f5e2ae118fc2dfabd19db0a95a456dcdc38f Mon Sep 17 00:00:00 2001 From: Yoshi Tacke <77861115+YoshKoz@users.noreply.github.com> Date: Mon, 28 Sep 2026 15:12:11 +0200 Subject: [PATCH] fix(server): await plugin activation in mcp.list Co-Authored-By: Claude Opus 5.5 --- packages/server/src/handlers/mcp.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/server/src/handlers/mcp.ts b/packages/server/src/handlers/mcp.ts index 47933234585c..e5c844af9f1a 100644 --- a/packages/server/src/handlers/mcp.ts +++ b/packages/server/src/handlers/mcp.ts @@ -1,4 +1,5 @@ import { Mcp } from "@opencode/core/mcp/index" +import { Plugin } from "@opencode/core/plugin" import { McpServerNotFoundError } from "@opencode/protocol/errors" import { Effect } from "effect" import { HttpApiBuilder, HttpApiSchema } from "effect/unstable/httpapi" @@ -14,6 +15,8 @@ export const McpHandler = HttpApiBuilder.group(Api, "server.mcp", (handlers) => .handle( "mcp.list", Effect.fn(function* () { + // Config-sourced servers are registered by the opencode.config.mcp plugin; a cold location has none until it activates. + yield* Plugin.awaitActivation const service = yield* Mcp.Service return yield* response( service