MCPcopy
hub / github.com/upstash/context7 / getJsonServerEntry

Function getJsonServerEntry

packages/cli/src/setup/mcp-writer.ts:187–196  ·  view source on GitHub ↗
(
  config: Record<string, unknown>,
  configKey: string,
  serverName: string
)

Source from the content-addressed store, hash-verified

185 * when the section, server, or entry shape is missing.
186 */
187export function getJsonServerEntry(
188 config: Record<string, unknown>,
189 configKey: string,
190 serverName: string
191): Record<string, unknown> | undefined {
192 const section = config[configKey];
193 if (!section || typeof section !== "object") return undefined;
194 const entry = (section as Record<string, unknown>)[serverName];
195 return entry && typeof entry === "object" ? (entry as Record<string, unknown>) : undefined;
196}
197
198function stripApiKeyPair(args: string[]): string[] {
199 const result: string[] = [];

Callers 1

setupAgentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected