The weather server works and needs one free key, but the reason to clone this is the layout: config, controller, service, entry point, repeated identically for both servers. If you are writing your first MCP server in TypeScript, copying a structure that already separates validation from logic saves the rewrite you would otherwise do on your second one.
A pair of MCP servers built to be read as much as run: a weather service that answers real queries, and a demo service that shows the same three-layer structure with nothing else in the way.
- The weather service: current conditions, a 5-day forecast, and queries across several cities
- The demo service: a minimal request-and-response example with basic error handling, commented for reading
- A fixed layout each service follows — config for constants and types, a controller for request handling and validation, a service for the business logic — so a third server is a matter of copying the shape
Build from source: clone the repo, `npm install`, then `npm run build` for everything or `npm run build:weather` for one service. Point the client at `build/weather/index.js` with `node`. Needs Node.js >= 16.0.0, npm >= 8.0.0 and TypeScript >= 4.5.0. The weather service reads an OpenWeather key from `OPENWEATHER_API_KEY`; the demo service needs no credentials.
One command plus a key — npx -y mcp-servers, then supply credentials
