@cybermem/dashboard 0.5.3 → 0.5.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.
|
@@ -83,29 +83,28 @@ export default function MCPConfigModal({ onClose }: { onClose: () => void }) {
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
const getMcpConfig = (clientId: string) => {
|
|
86
|
-
const isAntigravity = clientId === 'antigravity'
|
|
87
|
-
const urlKey = isAntigravity ? 'serverUrl' : 'url'
|
|
88
|
-
|
|
89
86
|
// Local mode: use stdio (command-based) - no server needed, runs via npx
|
|
90
87
|
if (isManaged) {
|
|
91
88
|
return {
|
|
92
89
|
mcpServers: {
|
|
93
90
|
cybermem: {
|
|
94
91
|
command: "npx",
|
|
95
|
-
args: ["@cybermem/mcp
|
|
92
|
+
args: ["@cybermem/mcp"]
|
|
96
93
|
}
|
|
97
94
|
}
|
|
98
95
|
}
|
|
99
96
|
}
|
|
100
97
|
|
|
101
|
-
// Remote mode: use
|
|
98
|
+
// Remote mode: use stdio with --url and --api-key args (universal for all clients)
|
|
102
99
|
return {
|
|
103
100
|
mcpServers: {
|
|
104
101
|
cybermem: {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
"
|
|
108
|
-
|
|
102
|
+
command: "npx",
|
|
103
|
+
args: [
|
|
104
|
+
"-y", "@cybermem/mcp",
|
|
105
|
+
"--url", baseUrl,
|
|
106
|
+
"--api-key", apiKey || "sk-your-generated-key"
|
|
107
|
+
]
|
|
109
108
|
}
|
|
110
109
|
}
|
|
111
110
|
}
|
|
@@ -119,9 +118,9 @@ export default function MCPConfigModal({ onClose }: { onClose: () => void }) {
|
|
|
119
118
|
// Handle TOML config (Codex)
|
|
120
119
|
if (config?.configType === 'toml') {
|
|
121
120
|
if (isManaged) {
|
|
122
|
-
return `# CyberMem Configuration (Local Mode)\n[mcp]\ncommand = "npx"\nargs = ["@cybermem/mcp
|
|
121
|
+
return `# CyberMem Configuration (Local Mode)\n[mcp]\ncommand = "npx"\nargs = ["@cybermem/mcp"]`;
|
|
123
122
|
}
|
|
124
|
-
return `# CyberMem Configuration\n[mcp]\
|
|
123
|
+
return `# CyberMem Configuration (Remote Mode)\n[mcp]\ncommand = "npx"\nargs = ["@cybermem/mcp", "--url", "${baseUrl}", "--api-key", "${maskKey ? displayKey : actualKey}"]`;
|
|
125
124
|
}
|
|
126
125
|
|
|
127
126
|
// Handle command-based configs (Claude Code, Gemini CLI, etc.)
|
|
@@ -134,16 +133,9 @@ export default function MCPConfigModal({ onClose }: { onClose: () => void }) {
|
|
|
134
133
|
cmd = config?.command?.replace("http://localhost:8080", baseUrl) || '';
|
|
135
134
|
}
|
|
136
135
|
|
|
137
|
-
// Substitute
|
|
138
|
-
cmd = cmd.replace('{{ENDPOINT}}',
|
|
139
|
-
|
|
140
|
-
// Remote mode - inject API key for SSE transport commands
|
|
141
|
-
if (!isManaged && cmd.includes('--transport sse')) {
|
|
142
|
-
const headerPart = `--header "x-api-key: ${maskKey ? displayKey : actualKey}"`;
|
|
143
|
-
if (!cmd.includes('x-api-key')) {
|
|
144
|
-
cmd = cmd.replace('mcp add', `mcp add ${headerPart}`);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
136
|
+
// Substitute placeholders with actual values
|
|
137
|
+
cmd = cmd.replace('{{ENDPOINT}}', baseUrl);
|
|
138
|
+
cmd = cmd.replace('{{API_KEY}}', maskKey ? displayKey : actualKey);
|
|
147
139
|
|
|
148
140
|
return cmd;
|
|
149
141
|
}
|
|
@@ -151,7 +143,12 @@ export default function MCPConfigModal({ onClose }: { onClose: () => void }) {
|
|
|
151
143
|
// Default to JSON config
|
|
152
144
|
const jsonConfig = getMcpConfig(selectedClient);
|
|
153
145
|
if (!isManaged && maskKey) {
|
|
154
|
-
|
|
146
|
+
// Mask the API key in args array
|
|
147
|
+
const args = (jsonConfig.mcpServers.cybermem as any).args;
|
|
148
|
+
const apiKeyIdx = args.indexOf('--api-key');
|
|
149
|
+
if (apiKeyIdx !== -1 && args[apiKeyIdx + 1]) {
|
|
150
|
+
args[apiKeyIdx + 1] = displayKey;
|
|
151
|
+
}
|
|
155
152
|
}
|
|
156
153
|
return JSON.stringify(jsonConfig, null, 2);
|
|
157
154
|
}
|
package/e2e/config-ui.spec.ts
CHANGED
|
@@ -72,10 +72,10 @@ test.describe('Dashboard Configuration UI', () => {
|
|
|
72
72
|
// Master API Key should NOT be visible in local mode
|
|
73
73
|
await expect(page.getByText('Master API Key')).not.toBeVisible();
|
|
74
74
|
|
|
75
|
-
// Code block should show stdio command with npx @cybermem/mcp
|
|
75
|
+
// Code block should show stdio command with npx @cybermem/mcp
|
|
76
76
|
await page.getByRole('button', { name: 'Gemini CLI' }).click();
|
|
77
77
|
const codeBlock = page.locator('pre');
|
|
78
|
-
await expect(codeBlock).toContainText('gemini mcp add cybermem npx @cybermem/mcp
|
|
78
|
+
await expect(codeBlock).toContainText('gemini mcp add cybermem npx @cybermem/mcp');
|
|
79
79
|
});
|
|
80
80
|
|
|
81
81
|
test('Remote Mode: shows API Key management', async ({ page }) => {
|
|
@@ -89,10 +89,10 @@ test.describe('Dashboard Configuration UI', () => {
|
|
|
89
89
|
// Master API Key should be visible
|
|
90
90
|
await expect(page.getByText('Master API Key')).toBeVisible();
|
|
91
91
|
|
|
92
|
-
// Gemini CLI should have
|
|
92
|
+
// Gemini CLI should have --url and --api-key args (universal stdio transport)
|
|
93
93
|
await page.getByRole('button', { name: 'Gemini CLI' }).click();
|
|
94
94
|
const codeBlock = page.locator('pre');
|
|
95
|
-
await expect(codeBlock).toContainText('--
|
|
96
|
-
await expect(codeBlock).toContainText('
|
|
95
|
+
await expect(codeBlock).toContainText('--url');
|
|
96
|
+
await expect(codeBlock).toContainText('--api-key');
|
|
97
97
|
});
|
|
98
98
|
});
|
package/package.json
CHANGED
package/public/clients.json
CHANGED
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"Navigate to **Features** > **MCP**",
|
|
28
28
|
"Click **Add New MCP Server**",
|
|
29
29
|
"Enter Name: `cybermem`",
|
|
30
|
-
"Enter Type: `
|
|
31
|
-
"
|
|
30
|
+
"Enter Type: `Command`",
|
|
31
|
+
"Copy the configuration from below"
|
|
32
32
|
],
|
|
33
33
|
"configType": "json"
|
|
34
34
|
},
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
"match": "antigravity",
|
|
39
39
|
"color": "#d946ef",
|
|
40
40
|
"icon": "/icons/antigravity.png",
|
|
41
|
-
"description": "Antigravity supports MCP via raw JSON configuration.
|
|
41
|
+
"description": "Antigravity supports MCP via raw JSON configuration.",
|
|
42
42
|
"steps": [
|
|
43
43
|
"Open Antigravity and go to the **Agents** tab",
|
|
44
44
|
"Click on the three dots menu and select **MCP Servers**",
|
|
45
45
|
"Click **Manage MCP Servers**",
|
|
46
46
|
"Click **View RAW Config**",
|
|
47
|
-
"Paste the configuration block below
|
|
47
|
+
"Paste the configuration block below"
|
|
48
48
|
],
|
|
49
49
|
"configType": "json"
|
|
50
50
|
},
|
|
@@ -107,8 +107,8 @@
|
|
|
107
107
|
"The server will be available in all Claude Code sessions"
|
|
108
108
|
],
|
|
109
109
|
"configType": "command",
|
|
110
|
-
"localCommand": "claude mcp add cybermem npx @cybermem/mcp
|
|
111
|
-
"remoteCommand": "claude mcp add --
|
|
110
|
+
"localCommand": "claude mcp add cybermem npx @cybermem/mcp",
|
|
111
|
+
"remoteCommand": "claude mcp add cybermem -- npx @cybermem/mcp --url {{ENDPOINT}} --api-key {{API_KEY}}"
|
|
112
112
|
},
|
|
113
113
|
{
|
|
114
114
|
"id": "chatgpt",
|
|
@@ -170,8 +170,8 @@
|
|
|
170
170
|
"The server persists across sessions"
|
|
171
171
|
],
|
|
172
172
|
"configType": "cmd",
|
|
173
|
-
"localCommand": "gemini mcp add cybermem npx @cybermem/mcp
|
|
174
|
-
"remoteCommand": "gemini mcp add --
|
|
173
|
+
"localCommand": "gemini mcp add cybermem npx @cybermem/mcp",
|
|
174
|
+
"remoteCommand": "gemini mcp add cybermem -- npx @cybermem/mcp --url {{ENDPOINT}} --api-key {{API_KEY}}"
|
|
175
175
|
},
|
|
176
176
|
{
|
|
177
177
|
"id": "other",
|
|
@@ -181,9 +181,8 @@
|
|
|
181
181
|
"icon": null,
|
|
182
182
|
"description": "For any other MCP-compliant client, use the following connection details:",
|
|
183
183
|
"steps": [
|
|
184
|
-
"**Transport**:
|
|
185
|
-
"**
|
|
186
|
-
"**Authentication**: `x-api-key` header (if required)",
|
|
184
|
+
"**Transport**: stdio (via npx command)",
|
|
185
|
+
"**Command**: `npx @cybermem/mcp` with `--url` and `--api-key` args",
|
|
187
186
|
"Refer to your client's documentation for config file location"
|
|
188
187
|
],
|
|
189
188
|
"configType": "json"
|