(workspaceId: string, url: string)
| 209 | * Format: mcp-<8 char hash> |
| 210 | */ |
| 211 | export function generateMcpServerId(workspaceId: string, url: string): string { |
| 212 | const normalizedUrl = normalizeUrlForHashing(url) |
| 213 | |
| 214 | const input = `${workspaceId}:${normalizedUrl}` |
| 215 | const hash = simpleHash(input) |
| 216 | |
| 217 | return `mcp-${hash}` |
| 218 | } |
| 219 | |
| 220 | /** |
| 221 | * Normalize URL for consistent hashing. |
no test coverage detected