@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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/proxy.js +6 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandanpc/mcp-server",
3
- "version": "0.1.46",
3
+ "version": "0.1.48",
4
4
  "description": "PandaNpc MCP Server — PandaNote and Agent connection management for Codex, Claude Code, and other MCP clients",
5
5
  "keywords": [
6
6
  "mcp",
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') {