Skip to content

Commit b062c0e

Browse files
authored
fix: missing extension directory prefix in 'mcp_config' of python (#80)
1 parent 4fbb2ae commit b062c0e

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

MANIFEST.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,9 @@ The `mcp_config` object in the server configuration defines how the implementing
315315
```json
316316
"mcp_config": {
317317
"command": "python",
318-
"args": ["server/main.py"],
318+
"args": ["${__dirname}/server/main.py"],
319319
"env": {
320-
"PYTHONPATH": "server/lib"
320+
"PYTHONPATH": "${__dirname}/server/lib"
321321
}
322322
}
323323
```

src/cli/init.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export function createMcpConfig(
110110
command: "python",
111111
args: ["${__dirname}/" + entryPoint],
112112
env: {
113-
PYTHONPATH: "server/lib",
113+
PYTHONPATH: "${__dirname}/server/lib",
114114
},
115115
};
116116
case "binary":

test/init.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ describe("init functions", () => {
142142
command: "python",
143143
args: ["${__dirname}/server/main.py"],
144144
env: {
145-
PYTHONPATH: "server/lib",
145+
PYTHONPATH: "${__dirname}/server/lib",
146146
},
147147
});
148148
});
@@ -264,8 +264,8 @@ describe("init functions", () => {
264264
entryPoint: "server/main.py",
265265
mcp_config: {
266266
command: "python",
267-
args: ["server/main.py"],
268-
env: { PYTHONPATH: "server/lib" },
267+
args: ["${__dirname}/server/main.py"],
268+
env: { PYTHONPATH: "${__dirname}/server/lib" },
269269
},
270270
},
271271
[
@@ -325,8 +325,8 @@ describe("init functions", () => {
325325
entry_point: "server/main.py",
326326
mcp_config: {
327327
command: "python",
328-
args: ["server/main.py"],
329-
env: { PYTHONPATH: "server/lib" },
328+
args: ["${__dirname}/server/main.py"],
329+
env: { PYTHONPATH: "${__dirname}/server/lib" },
330330
},
331331
},
332332
tools: [

0 commit comments

Comments
 (0)