mcp-tutorial
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-tutorialWhat's the temperature in Tokyo?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.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…
Geocoding, weather forecasts, and timezone lookups
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-
- FlicenseBqualityDmaintenanceEnables users to retrieve current weather information for any city location. Provides a simple interface to fetch weather data through natural language queries.1-
- AlicenseNot gradedqualityDmaintenanceEnables querying real-time weather and 5-day forecasts for any city using the OpenWeatherMap API.11 npm4MIT
- AlicenseNot gradedqualityBmaintenanceMCP server that provides tools to retrieve weather information from a weather API, supporting both local stdio and remote Streamable HTTP transports.360 npm1MIT