@fundtracer/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/fundtracer-mcp.js +8 -4
- package/package.json +1 -1
package/fundtracer-mcp.js
CHANGED
|
@@ -258,9 +258,10 @@ function err(message) {
|
|
|
258
258
|
return { content: [{ type: "text", text: message }], isError: true };
|
|
259
259
|
}
|
|
260
260
|
function api() {
|
|
261
|
-
const key = process.env.FUNDTRACER_MCP_API_KEY || "";
|
|
261
|
+
const key = _mcpCtx?.apiKey || process.env.FUNDTRACER_MCP_API_KEY || "";
|
|
262
262
|
const headers = {
|
|
263
263
|
Authorization: `Bearer ${key}`,
|
|
264
|
+
"x-auth-token": key,
|
|
264
265
|
"Content-Type": "application/json"
|
|
265
266
|
};
|
|
266
267
|
if (_mcpCtx?.userId) {
|
|
@@ -513,7 +514,8 @@ async function validateWithFirestore(rawKey) {
|
|
|
513
514
|
return {
|
|
514
515
|
userId: data.userId,
|
|
515
516
|
tier: data.tier || "free",
|
|
516
|
-
apiKeyPrefix: rawKey.substring(0, 15)
|
|
517
|
+
apiKeyPrefix: rawKey.substring(0, 15),
|
|
518
|
+
apiKey: rawKey
|
|
517
519
|
};
|
|
518
520
|
}
|
|
519
521
|
const { hashAPIKey } = await import("../models/apiKey.js");
|
|
@@ -532,7 +534,8 @@ async function validateWithFirestore(rawKey) {
|
|
|
532
534
|
return {
|
|
533
535
|
userId: data.userId,
|
|
534
536
|
tier: data.tier || "free",
|
|
535
|
-
apiKeyPrefix: rawKey.substring(0, 15)
|
|
537
|
+
apiKeyPrefix: rawKey.substring(0, 15),
|
|
538
|
+
apiKey: rawKey
|
|
536
539
|
};
|
|
537
540
|
}
|
|
538
541
|
}
|
|
@@ -557,7 +560,8 @@ async function validateViaHttp(rawKey) {
|
|
|
557
560
|
return {
|
|
558
561
|
userId: data.userId,
|
|
559
562
|
tier: data.tier || "free",
|
|
560
|
-
apiKeyPrefix: rawKey.substring(0, 15)
|
|
563
|
+
apiKeyPrefix: rawKey.substring(0, 15),
|
|
564
|
+
apiKey: rawKey
|
|
561
565
|
};
|
|
562
566
|
}
|
|
563
567
|
async function trackUsage(userId, rawKey) {
|
package/package.json
CHANGED