MCPcopy Create free account
hub / github.com/bytebase/dbhub / getClientIdentifier

Function getClientIdentifier

src/utils/client-identifier.ts:13–22  ·  view source on GitHub ↗
(extra: any)

Source from the content-addressed store, hash-verified

11 * @returns Client identifier string (User-Agent or "stdio")
12 */
13export function getClientIdentifier(extra: any): string {
14 // MCP SDK 1.23+ passes requestInfo in extra.requestInfo for HTTP transport
15 const userAgent = extra?.requestInfo?.headers?.["user-agent"];
16 if (userAgent) {
17 return userAgent;
18 }
19
20 // Default for STDIO mode
21 return "stdio";
22}

Callers 1

trackToolRequestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected