MCPcopy Create free account
hub / github.com/Noumena-Network/code / getMCPUserAgent

Function getMCPUserAgent

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

Source from the content-addressed store, hash-verified

29}
30
31export function getMCPUserAgent(): string {
32 const parts: string[] = []
33 if (process.env.CLAUDE_CODE_ENTRYPOINT) {
34 parts.push(process.env.CLAUDE_CODE_ENTRYPOINT)
35 }
36 if (process.env.NCODE_AGENT_SDK_VERSION) {
37 parts.push(`agent-sdk/${process.env.NCODE_AGENT_SDK_VERSION}`)
38 }
39 if (process.env.NCODE_AGENT_SDK_CLIENT_APP) {
40 parts.push(`client-app/${process.env.NCODE_AGENT_SDK_CLIENT_APP}`)
41 }
42 const suffix = parts.length > 0 ? ` (${parts.join(', ')})` : ''
43 return `ncode/${MACRO.VERSION}${suffix}`
44}
45
46// User-Agent for WebFetch requests to arbitrary sites.
47export function getWebFetchUserAgent(): string {

Callers 1

client.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected