MCPcopy Index your code
hub / github.com/forloopcodes/contextplus / buildMcpConfig

Function buildMcpConfig

src/index.ts:95–116  ·  view source on GitHub ↗
(runner: "npx" | "bunx")

Source from the content-addressed store, hash-verified

93}
94
95function buildMcpConfig(runner: "npx" | "bunx") {
96 const commandArgs = runner === "npx" ? ["-y", "contextplus"] : ["contextplus"];
97 return JSON.stringify(
98 {
99 mcpServers: {
100 contextplus: {
101 command: runner,
102 args: commandArgs,
103 env: {
104 OLLAMA_EMBED_MODEL: "nomic-embed-text",
105 OLLAMA_CHAT_MODEL: "gemma2:27b",
106 OLLAMA_API_KEY: "YOUR_OLLAMA_API_KEY",
107 CONTEXTPLUS_EMBED_BATCH_SIZE: "8",
108 CONTEXTPLUS_EMBED_TRACKER: "lazy",
109 },
110 },
111 },
112 },
113 null,
114 2,
115 );
116}
117
118function buildOpenCodeConfig(runner: "npx" | "bunx") {
119 const command = runner === "npx" ? ["npx", "-y", "contextplus"] : ["bunx", "contextplus"];

Callers 1

runInitCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected