Replies: 1 comment
-
Update: I'm not sure if this is the correct or recommended approach, but I was able to pass environment variables to the server using: mcp_client.transport.env = {"MY_ENV_VAR": "some_value"} Would appreciate confirmation if this is the proper way to pass environment variables dynamically |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
How to pass environment variables to the MCP server when using Gemini SDK ?
According to the Google GenAI SDK documentation, we can create
StdioServerParameters
and specify environment variables via theenv
argument, like this:However, in the FastMCP documentation, MCP servers are started like this:
Is there a way to pass environment variables to the server when using `fastmcp.Client("server.py")?
Any insights or examples would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions