Skip to content

Commit d3842e6

Browse files
committed
fix(mcp): finishAuth returns disabled instead of connected after OAuth
After successful OAuth, finishAuth called createAndStore with the raw config which may have enabled=false (e.g. server was previously disconnected). This caused create() to short-circuit and return status disabled instead of reconnecting. Pass { ...mcpConfig, enabled: true } to match what connect() already does. Fixes anomalyco#20278
1 parent b1e89c3 commit d3842e6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎packages/opencode/src/mcp/index.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,7 @@ export namespace MCP {
821821
const mcpConfig = yield* getMcpConfig(mcpName)
822822
if (!mcpConfig) return { status: "failed", error: "MCP config not found after auth" } as Status
823823

824-
return yield* createAndStore(mcpName, mcpConfig)
824+
return yield* createAndStore(mcpName, { ...mcpConfig, enabled: true })
825825
})
826826

827827
const removeAuth = Effect.fn("MCP.removeAuth")(function* (mcpName: string) {

0 commit comments

Comments
 (0)