feat(web): dashboard, wizard, server detail, WS build stream, install snippets

This commit is contained in:
Marco Sadjadi
2026-05-19 00:32:53 +02:00
parent f2238f2e6b
commit b07de86db6
8 changed files with 998 additions and 0 deletions

View File

@@ -0,0 +1,54 @@
import type { InstallTarget } from '@bmm/types';
export interface SnippetInput {
name: string;
slug: string;
publicUrl: string;
}
export function buildSnippet(target: InstallTarget, input: SnippetInput): { label: string; code: string; note?: string } {
const key = input.slug.replace(/[^a-zA-Z0-9_-]/g, '_');
const mcpUrl = `${input.publicUrl.replace(/\/$/, '')}/mcp`;
switch (target) {
case 'claude-desktop':
return {
label: 'claude_desktop_config.json',
code: JSON.stringify(
{
mcpServers: {
[key]: {
url: mcpUrl,
auth: 'oauth2',
},
},
},
null,
2,
),
note: '~/Library/Application Support/Claude/claude_desktop_config.json (macOS) — Settings → Developer (Windows). Restart Claude after saving.',
};
case 'cursor':
return {
label: '.cursor/mcp.json',
code: JSON.stringify(
{
mcpServers: {
[key]: {
url: mcpUrl,
auth: 'oauth2',
},
},
},
null,
2,
),
note: 'Place at the project root or in ~/.cursor/mcp.json for global use.',
};
case 'chatgpt':
return {
label: 'ChatGPT — Custom Connector',
code: `Name: ${input.name}\nURL: ${mcpUrl}\nAuth: OAuth 2.1 (Dynamic Client Registration)`,
note: 'ChatGPT → Settings → Connectors → Add custom connector. Paste the values above. OAuth handshake runs on first use.',
};
}
}