Gen-AI Developer Classroom notes 16/Jul/2025

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 for command and 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

  • Refer Here

  • 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
    Preview

  • In mcp servers mcp.run changes acccording to transport
    Preview

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

By continuous learner

enthusiastic technology learner

Leave a Reply

Discover more from Direct AI Powered By Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading