This is an example project and says so — the value is that the whole path from tool declaration to a public API call fits in one file you can read in a sitting, with the inspector walkthrough included so you can watch the call happen. As a weather source it is fine; as a starting point for writing your own server it is the more likely use.
A sample MCP server built to be read. It exposes one tool that takes a city name and returns current weather from the Open-Meteo API, with the whole server and its tool in a single `main.ts`.
- Current weather for any city by name — `fetch-weather`
- Public APIs behind it: geocoding turns the city name into coordinates, then the weather lookup runs — no account in either step
- Argument validation with `zod` on top of `@modelcontextprotocol/sdk`, so the tool shape is declared rather than assumed
- A one-command inspector run — `npx -y @modelcontextprotocol/inspector npx -y tsx main.ts` — that lists the tool and lets you call it in a browser
Node with the repository cloned and `npm install`, then `npx tsx main.ts`. No key and no account. The inspector path needs the proxy session token printed at startup, passed as `MCP_PROXY_AUTH_TOKEN`, with transport set to STDIO.
One command — npx -y mcp
