-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Open
Labels
P2Moderate issues affecting some users, edge cases, potentially valuable featureModerate issues affecting some users, edge cases, potentially valuable featuredocumentationImprovements or additions to documentationImprovements or additions to documentationquestionFurther information is requestedFurther information is requestedready for workEnough information for someone to start working onEnough information for someone to start working on
Description
Question
I haven't been able to figure out how to get environment variables in tool functions on an MCP server, or if they're actually supported.
This should be a valid client configuration:
{
"mcpServers": {
"php-calculator": {
"command": "python",
"args": ["/absolute/path/to/your/mcp-server.py"],
"env": {"API_KEY": "xxxx"}
}
}
}How can I get the API_KEY environment variable on the server?
Additional Context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Moderate issues affecting some users, edge cases, potentially valuable featureModerate issues affecting some users, edge cases, potentially valuable featuredocumentationImprovements or additions to documentationImprovements or additions to documentationquestionFurther information is requestedFurther information is requestedready for workEnough information for someone to start working onEnough information for someone to start working on