MCPcopy Index your code
hub / github.com/codeaashu/claude-code / getMCPUserAgent

Function getMCPUserAgent

src/utils/http.ts:37–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35}
36
37export function getMCPUserAgent(): string {
38 const parts: string[] = []
39 if (process.env.CLAUDE_CODE_ENTRYPOINT) {
40 parts.push(process.env.CLAUDE_CODE_ENTRYPOINT)
41 }
42 if (process.env.CLAUDE_AGENT_SDK_VERSION) {
43 parts.push(`agent-sdk/${process.env.CLAUDE_AGENT_SDK_VERSION}`)
44 }
45 if (process.env.CLAUDE_AGENT_SDK_CLIENT_APP) {
46 parts.push(`client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}`)
47 }
48 const suffix = parts.length > 0 ? ` (${parts.join(', ')})` : ''
49 return `claude-code/${MACRO.VERSION}${suffix}`
50}
51
52// User-Agent for WebFetch requests to arbitrary sites. `Claude-User` is
53// Anthropic's publicly documented agent for user-initiated fetches (what site

Callers 1

client.tsFile · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected