Open
Description
I'm trying to pass env vars (like API_KEY) from mcp.json to my SSE server, but process.env.API_KEY is undefined at runtime.
**Here’s a simplified version of my config:
{
"mcpServers": {
"MY-SSE-SERVER": {
"url": "http://localhost:3000/sse",
"env": {
"API_KEY": " my-api-key"
}
}
}
}**
And the server code:
app.get("/sse", (req, res) => {
console.log("process.env.API_KEY:", process.env.API_KEY);
});
Am I missing a step to get these env vars injected? Or does MCP not pass them into the runtime like I assumed?
Any insight appreciated! 🙏
Metadata
Metadata
Assignees
Labels
No labels