MCPcopy Index your code
hub / github.com/simstudioai/sim / generateMcpServerId

Function generateMcpServerId

apps/sim/lib/mcp/utils.ts:211–218  ·  view source on GitHub ↗
(workspaceId: string, url: string)

Source from the content-addressed store, hash-verified

209 * Format: mcp-<8 char hash>
210 */
211export 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.

Callers 2

utils.test.tsFile · 0.90
performCreateMcpServerFunction · 0.90

Calls 2

normalizeUrlForHashingFunction · 0.85
simpleHashFunction · 0.85

Tested by

no test coverage detected