MCPcopy Create free account
hub / github.com/oboard/claude-code-rev / getMCPUserAgent

Function getMCPUserAgent

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

Source from the content-addressed store, hash-verified

47}
48
49export function getMCPUserAgent(): string {
50 const parts: string[] = []
51 if (process.env.CLAUDE_CODE_ENTRYPOINT) {
52 parts.push(process.env.CLAUDE_CODE_ENTRYPOINT)
53 }
54 if (process.env.CLAUDE_AGENT_SDK_VERSION) {
55 parts.push(`agent-sdk/${process.env.CLAUDE_AGENT_SDK_VERSION}`)
56 }
57 if (process.env.CLAUDE_AGENT_SDK_CLIENT_APP) {
58 parts.push(`client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}`)
59 }
60 const suffix = parts.length > 0 ? ` (${parts.join(', ')})` : ''
61 return `claude-code/${MACRO.VERSION}${suffix}`
62}
63
64// User-Agent for WebFetch requests to arbitrary sites. `Claude-User` is
65// Anthropic's publicly documented agent for user-initiated fetches (what site

Callers 1

client.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected