fetch-weatherLABSCO SUMMARY
Read it before you write your own.
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.
What it is
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.
What you get
- 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
zodon 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
Requirements
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.
Setup effort
Build from source — git clone https://github.com/RaulCalderon/my-first-mcp.git
USE CASES
Learning how an MCP tool is declared
Read one file that covers the server, the tool schema and the API call end to end.
Watching a tool call happen
Run the inspector against it, list the tools and call the weather one from the browser.
Getting weather without an API key
Ask by city name and let the geocoding and forecast lookups run against public endpoints.
1 tool
Listed in project docs. Your client may show a different list.
BEFORE YOU INSTALL
What to know first
Tools you get
1 tool named in the project's documentation.
Requires
Node.js with npm
INSTALLATION
Connect your client
Server setup
git clone https://github.com/RaulCalderon/my-first-mcp.git
cd my-first-mcp
npm install
npx tsx main.tsMCP Clients
MCP Inspector
npx -y @modelcontextprotocol/inspector npx -y tsx main.ts