MCPcopy Index your code
hub / github.com/anomalyco/opencode / connect

Method connect

packages/opencode/test/mcp/lifecycle.test.ts:173–178  ·  view source on GitHub ↗
(transport: { start: () => Promise<void> })

Source from the content-addressed store, hash-verified

171 }
172
173 async connect(transport: { start: () => Promise<void> }) {
174 this.transport = transport
175 await transport.start()
176 // After successful connect, bind to the last-created client name
177 this._state = getOrCreateClientState(lastCreatedClientName)
178 }
179
180 setRequestHandler(schema: unknown, handler: (...args: any[]) => Promise<any>) {
181 this._state.requestHandlers.set(schema, handler)

Callers 5

lifecycle.test.tsFile · 0.45
mcp.tsFile · 0.45
index.tsFile · 0.45
mcp.tsFile · 0.45

Calls 2

getOrCreateClientStateFunction · 0.85
startMethod · 0.45

Tested by

no test coverage detected