@ecommaps/mcp 1.0.4 → 1.0.6
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/cli.js +12 -0
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -11,6 +11,10 @@ const args = process.argv.slice(2);
|
|
|
11
11
|
let apiKey = null;
|
|
12
12
|
|
|
13
13
|
// Simple arg parsing
|
|
14
|
+
if (process.env.MCP_API_KEY) {
|
|
15
|
+
apiKey = process.env.MCP_API_KEY;
|
|
16
|
+
}
|
|
17
|
+
|
|
14
18
|
for (let i = 0; i < args.length; i++) {
|
|
15
19
|
if (args[i].startsWith('sk_eco_')) {
|
|
16
20
|
apiKey = args[i];
|
|
@@ -74,6 +78,14 @@ async function main() {
|
|
|
74
78
|
try {
|
|
75
79
|
// Try to parse as JSON-RPC
|
|
76
80
|
const msg = JSON.parse(data);
|
|
81
|
+
|
|
82
|
+
// FIX: Some clients (Antigravity/Cursor) fail if they receive 'notifications/initialized'
|
|
83
|
+
// before they send their own 'initialize' handshake. The server sends this eagerly,
|
|
84
|
+
// so we filter it out here to keep the client happy.
|
|
85
|
+
if (msg.method === 'notifications/initialized') {
|
|
86
|
+
return; // Skip this message
|
|
87
|
+
}
|
|
88
|
+
|
|
77
89
|
// Forward to StdOut
|
|
78
90
|
console.log(JSON.stringify(msg));
|
|
79
91
|
} catch (e) {
|