MCPcopy Create free account
hub / github.com/modelcontextprotocol/mcpb / createMcpConfig

Function createMcpConfig

src/cli/init.ts:97–127  ·  view source on GitHub ↗
(
  serverType: "node" | "python" | "binary",
  entryPoint: string,
)

Source from the content-addressed store, hash-verified

95}
96
97export function createMcpConfig(
98 serverType: "node" | "python" | "binary",
99 entryPoint: string,
100): {
101 command: string;
102 args: string[];
103 env?: Record<string, string>;
104} {
105 switch (serverType) {
106 case "node":
107 return {
108 command: "node",
109 args: ["${__dirname}/" + entryPoint],
110 env: {},
111 };
112 case "python":
113 return {
114 command: "python",
115 args: ["${__dirname}/" + entryPoint],
116 env: {
117 PYTHONPATH: "${__dirname}/server/lib",
118 },
119 };
120 case "binary":
121 return {
122 command: "${__dirname}/" + entryPoint,
123 args: [],
124 env: {},
125 };
126 }
127}
128
129export function getDefaultEntryPoint(
130 serverType: "node" | "python" | "binary",

Callers 3

init.test.tsFile · 0.85
getDefaultServerConfigFunction · 0.85
promptServerConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…