mapbox-create-map-mcp 1.2.0 → 1.2.1

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/src/server.js +10 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mapbox-create-map-mcp",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "A Mapbox-based MCP tool for creating geographic data visualizations",
5
5
  "main": "dist/index.js",
6
6
  "module": "src/index.js",
package/src/server.js CHANGED
@@ -62,6 +62,12 @@ class McpServer {
62
62
  async handleRequest(request) {
63
63
  const { id, method, params } = request;
64
64
 
65
+ // 通知类型的消息不需要返回响应
66
+ if (method && method.startsWith('notifications/')) {
67
+ // 处理通知,不返回任何内容
68
+ return;
69
+ }
70
+
65
71
  try {
66
72
  let result;
67
73
 
@@ -82,6 +88,10 @@ class McpServer {
82
88
  result = this.handleResourcesList();
83
89
  break;
84
90
 
91
+ case 'ping':
92
+ result = {};
93
+ break;
94
+
85
95
  default:
86
96
  this.sendError(-32601, `Method not found: ${method}`, id);
87
97
  return;