Skip to content

Commit e152a93

Browse files
committed
add injectEnv util, support env ref in mcp config (#2679)
1 parent d87023b commit e152a93

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/services/mcp/connection/handlers/StdioHandler.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
McpResourceTemplate,
1818
McpServer,
1919
} from "../../types"
20+
import { injectEnv } from "../../../../utils/config"
2021

2122
/**
2223
* Stdio connection handler
@@ -66,7 +67,7 @@ export class StdioHandler implements ConnectionHandler {
6667
command: config.command,
6768
args: config.args,
6869
env: {
69-
...config.env,
70+
...(config.env ? await injectEnv(config.env) : {}),
7071
...(process.env.PATH ? { PATH: process.env.PATH } : {}),
7172
},
7273
stderr: "pipe",

0 commit comments

Comments
 (0)