grove-mcp 1.0.3 → 1.0.4
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/index.js +7 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -21,7 +21,7 @@ const readline = require('readline');
|
|
|
21
21
|
const HOSTNAME = 'mcp.lyra.tg';
|
|
22
22
|
const SSE_PATH = '/sse';
|
|
23
23
|
|
|
24
|
-
// Per-user downstream service tokens from the MCP config env block.
|
|
24
|
+
// Per-user downstream service tokens and session key from the MCP config env block.
|
|
25
25
|
// Forwarded as custom headers on every POST so the K8s pod can use them
|
|
26
26
|
// without storing tokens in the cluster environment.
|
|
27
27
|
const TOKEN_HEADERS = {};
|
|
@@ -29,6 +29,12 @@ if (process.env.GROVE_OUTLINE_TOKEN)
|
|
|
29
29
|
TOKEN_HEADERS['Grove-Outline-Token'] = process.env.GROVE_OUTLINE_TOKEN;
|
|
30
30
|
if (process.env.GROVE_MATTERMOST_TOKEN)
|
|
31
31
|
TOKEN_HEADERS['Grove-Mattermost-Token'] = process.env.GROVE_MATTERMOST_TOKEN;
|
|
32
|
+
// Per-user session isolation: scopes Redis session keys so multiple users
|
|
33
|
+
// on the shared 3-pod cluster never overwrite each other's auth tokens.
|
|
34
|
+
// Generate your key once with: grove_auth_start(email=...) and copy the
|
|
35
|
+
// returned session_key into your claude_desktop_config.json env block.
|
|
36
|
+
if (process.env.GROVE_SESSION_KEY)
|
|
37
|
+
TOKEN_HEADERS['X-Grove-Session-Key'] = process.env.GROVE_SESSION_KEY;
|
|
32
38
|
|
|
33
39
|
let sessionPath = null;
|
|
34
40
|
let affinityCookie = null; // sticky-session cookie from SSE response headers
|