Resolution to the problem
- Ensure VIRTUAL_ENV Environment variable does not exist on your system
- In
StdioServerParameters, if relative paths are not working add full paths forcommandand full path for args
server_params = StdioServerParameters(
command=r"C:\khajaclassroom\GenerativeAI\agenticai\june25\langgraph-learning\.venv\Scripts\python.exe",
# Make sure to update to the full absolute path to your math_server.py file
args=[r"C:\khajaclassroom\GenerativeAI\agenticai\june25\langgraph-learning\experiments\mcp_math.py"],
)
Lets Build an MCP Server on Streamable HTTP Transport
-
To make mcp server host on HTTPS we need an external server and mcp client already has uvicorn (ASGI).
- Refer Here for changes
-
Now since the mcp servers are exposed over http, we can run them in containers or vms or cloud instances and access from mcp clients using https

-
In mcp servers mcp.run changes acccording to transport

-
In mcp clients we are creating client sessions with stdio_client , where as in streamable http we use streamablehttp_client

