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

Function getMcpServerHeaders

src/services/mcp/headersHelper.ts:125–138  ·  view source on GitHub ↗
(
  serverName: string,
  config: McpSSEServerConfig | McpHTTPServerConfig | McpWebSocketServerConfig,
)

Source from the content-addressed store, hash-verified

123 * @returns Combined headers object
124 */
125export async function getMcpServerHeaders(
126 serverName: string,
127 config: McpSSEServerConfig | McpHTTPServerConfig | McpWebSocketServerConfig,
128): Promise<Record<string, string>> {
129 const staticHeaders = config.headers || {}
130 const dynamicHeaders =
131 (await getMcpHeadersFromHelper(serverName, config)) || {}
132
133 // Dynamic headers override static headers if both are present
134 return {
135 ...staticHeaders,
136 ...dynamicHeaders,
137 }
138}
139

Callers 1

client.tsFile · 0.85

Calls 1

getMcpHeadersFromHelperFunction · 0.85

Tested by

no test coverage detected