@pandanpc/mcp-server 0.1.46 → 0.1.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/proxy.js +6 -0
package/package.json
CHANGED
package/proxy.js
CHANGED
|
@@ -184,6 +184,12 @@ class McpProxy {
|
|
|
184
184
|
if (this.current.trial) this.watchTrial(this.current)
|
|
185
185
|
return
|
|
186
186
|
}
|
|
187
|
+
// Before initialize the runtime only accepts initialize: it exits on anything else. Clients may
|
|
188
|
+
// probe first (Claude Code sends `server/discover`), so answer such requests here and drop the rest.
|
|
189
|
+
if (!this.clientInit && this.initKey == null) {
|
|
190
|
+
if (isRequest(message)) this.reply({ jsonrpc: '2.0', id: message.id, error: { code: -32601, message: `Method not found: ${message.method}` } })
|
|
191
|
+
return
|
|
192
|
+
}
|
|
187
193
|
if (isResponse(message)) return this.routeResponse(message)
|
|
188
194
|
if (isNotification(message) && message.method === 'notifications/cancelled') return this.routeCancel(message, line)
|
|
189
195
|
if (isNotification(message) && message.method === 'notifications/progress') {
|