My MCP Weather Server
@EnigmaticHarvest
A dummy MCP server to test the mcp-chat-cli at
Overview
What is My MCP Weather Server?
My MCP Weather Server is an example MCP (Model Context Protocol) server built with the @modelcontextprotocol/sdk for TypeScript. It exposes a single tool that returns dummy weather information for a few predefined cities, intended for use as a backend by MCP-compliant clients such as LLM‑powered agents.
How to use My MCP Weather Server?
Clone or create the project, install dependencies with npm install, then run npm run build (or use the development command with ts-node and nodemon). The server uses Streamable HTTP Transport; clients call the get_city_weather tool by providing a city string and an optional unit parameter.
Key features of My MCP Weather Server
- Implements the Model Context Protocol (MCP)
- Uses Streamable HTTP Transport for communication
- Exposes a
get_city_weathertool with structured output - Accepts optional unit parameter (metric/imperial, defaults to metric)
- Returns dummy weather data: temperature, description, humidity
- Demonstes simple in-memory session management
Use cases of My MCP Weather Server
- Prototyping an MCP‑compliant weather tool for an LLM agent
- Learning how to build and test an MCP server with TypeScript
- Demonstrating structured tool output and session handling
- Testing MCP client‑server integration without a real weather API
FAQ from My MCP Weather Server
What does the get_city_weather tool return?
It returns dummy weather information including temperature, description, and humidity, along with structuredContent matching a defined outputSchema for reliable client parsing.
What are the runtime dependencies?
Node.js v18 or higher and npm (or yarn/pnpm). The server uses the @modelcontextprotocol/sdk and runs via ts-node in development mode.
Does My MCP Weather Server use a real weather API?
No. All weather data is dummy/in‑memory for a few predefined cities (e.g., paris, london, tokyo). It is an example server, not a production service.
What transport does the server use?
It uses StreamableHTTPServerTransport, the recommended MCP transport for HTTP‑based communication.
Is authentication or session management included?
The server demonstrates basic in‑memory session handling, but no authentication mechanism is implemented.