viewgate-mcp 1.0.46 → 1.0.47
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/dist/index.js +4 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -27,9 +27,10 @@ const __filename = fileURLToPath(import.meta.url);
|
|
|
27
27
|
const __dirname = path.dirname(__filename);
|
|
28
28
|
dotenv.config({ path: path.join(__dirname, "..", ".env") });
|
|
29
29
|
const port = process.env.PORT || 3000;
|
|
30
|
-
const BACKEND_URL = process.env.
|
|
30
|
+
const BACKEND_URL = process.env.VIEWGATE_BACKEND_URL || "https://view-gate.vercel.app";
|
|
31
31
|
console.error(`[MCP Config] BACKEND_URL: ${BACKEND_URL}`);
|
|
32
|
-
|
|
32
|
+
const LOG_API_KEY = (process.env.VIEWGATE_API_KEY || process.env.API_KEY || "");
|
|
33
|
+
console.error(`[MCP Config] API_KEY Prefix: ${LOG_API_KEY.substring(0, 5)}...`);
|
|
33
34
|
const agentId = `${os.hostname()}-${process.pid}`;
|
|
34
35
|
console.error(`[MCP Identity] Agent ID: ${agentId}`);
|
|
35
36
|
// Store active sessions for SSE: sessionId -> { server, transport }
|
|
@@ -753,7 +754,7 @@ Lang: ${rawData.preferredLanguage === 'es' ? 'ES' : 'EN'}
|
|
|
753
754
|
const useSSE = process.argv.includes("--sse") || process.env.MCP_TRANSPORT === "sse";
|
|
754
755
|
if (!useSSE) {
|
|
755
756
|
const apiKey = process.env.VIEWGATE_API_KEY || process.env.API_KEY || "";
|
|
756
|
-
const personalKey = process.env.VIEWGATE_PERSONAL_KEY || "";
|
|
757
|
+
const personalKey = process.env.VIEWGATE_PERSONAL_KEY || process.env.PERSONAL_KEY || "";
|
|
757
758
|
if (!apiKey) {
|
|
758
759
|
console.error("Error: VIEWGATE_API_KEY environment variable is required.");
|
|
759
760
|
process.exit(1);
|