mcp-tutorial
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
One time setup
How we setup this repo
uv init mcp-tutorial
cd mcp-tutorial
uv add "mcp[cli]<2.0"The MCP Server
server.py contains the MCP Server. It is a one line changes to switch it from stdio transport
to streamable http transport
mcp.run() # stdio transport (subprocess)
-OR-
mcp.run(transport="streamable-http") # now an HTTP service on :8000The MCP Client
The MCP client host_with_loop.py can work with both stdio and streamable-http transport
# If the MCP Server were using stdio transport, then we would use stdio_client(server_params) to talk to it.
async with stdio_client(server_params) as (read, write):
# If it were using HTTP transport, we would use streamablehttp_client("http://localhost:8000/mcp")
async with streamablehttp_client("http://localhost:8000/mcp") as (read, write, _):Testing with STDIO
Make sure that
server.pyusesmcp.run() # stdio transport (subprocess)Make sure that
host_with_loopuses the stdio transport
Testing the MCP Server
Launch the inspector UI ( in browser )
uv run mcp dev server.pyRelated MCP server: Weather MCP Server
Testing the stand-alone MCP Client
This client runs the MCP Server as a subprocesses and then calls the tool. The key line is
# Tell the client HOW to launch the server (as a subprocess over stdio)
server_params = StdioServerParameters(command="python", args=["server.py"])Run it as
uv run client_only.pyTesting with Ollama
Check that Ollama is running
$ ollama ps
NAME ID SIZE PROCESSOR CONTEXT UNTIL
$ brew services list
Name Status User File
ollama started sdaas ~/Library/LaunchAgents/homebrew.mxcl.ollama.plist
...
$ curl http://localhost:11434/api/tags | jq
.... API response ....Simple host
Run the host
uv run host.pyHost with Loop
uv run host_with_loop.pyTesting with STDIO
Make sure that
server.pyuses http transportMake sure that
host_with_loopuses the http transport
Start the MCP server
$ uv run server.py
INFO: Started server process [75425]
INFO: Waiting for application startup.
[08/24/26 17:09:14] INFO StreamableHTTP session manager started streamable_http_manager.py:143
INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)Run the application
uv run host_with_loop.py
USER: What's the temperature in Tokyo?
MODEL: ...
MODEL: ...
ANSWER: The current temperature in Tokyo is 18°C.Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Provide real-time and forecast weather information for locations in the United States using natura…
Free, keyless real-time weather and 7-day forecasts for any city worldwide.
Get current weather for any city and create images from your prompts. Streamline planning, reports…
PROTOTYPE: Zimbabwe weather, geo, safe routing & journey risk via REST+MCP (stdio/HTTP).
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables natural language weather queries for global cities, integrating with OpenWeather API to provide real-time weather information in an easy-to-read format.1-
- AlicenseNot gradedqualityDmaintenanceEnables querying real-time weather and 5-day forecasts for any city using the OpenWeatherMap API.5ISC
- AlicenseNot gradedqualityBmaintenanceMCP server that provides tools to retrieve weather information from a weather API, supporting both local stdio and remote Streamable HTTP transports.547 npm1MIT
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to retrieve current weather conditions and 3-day forecasts for cities through standardized MCP tools over stdio.-