We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eba6461 commit dbf560fCopy full SHA for dbf560f
src/server/mcp.ts
@@ -175,7 +175,13 @@ export class McpServer {
175
this._toolHandlersInitialized = true;
176
}
177
178
+ private _completionHandlerInitialized = false;
179
+
180
private setCompletionRequestHandler() {
181
+ if (this._completionHandlerInitialized) {
182
+ return;
183
+ }
184
185
this.server.assertCanSetRequestHandler(
186
CompleteRequestSchema.shape.method.value,
187
);
@@ -198,6 +204,8 @@ export class McpServer {
198
204
199
205
},
200
206
207
208
+ this._completionHandlerInitialized = true;
201
209
202
210
203
211
private async handlePromptCompletion(
0 commit comments