npm met-mcpstreamable-httpMITupdated 17d ago
An MCP server for weather forecasts from MET Norway (Yr). Built as a learning project.
What can you do with met mcp?
met-mcp
An MCP server for weather forecasts from MET Norway (Yr). Built as a learning project.
Available three ways:
- npm:
met-mcp— run locally over stdio - Remote:
https://met-mcp.met-mcp-worker.workers.dev/mcp— Streamable HTTP on Cloudflare Workers, add it as a claude.ai connector - MCP registry:
io.github.trondbjoroy/met-mcp
Tools
geocode_location(name, count)— find coordinates for a place name. Uses the free Open-Meteo geocoder, because MET has no geocoding API.get_forecast(latitude, longitude, hours)— hourly forecast from MET Locationforecast 2.0. Works worldwide, best in the Nordics.get_nowcast(latitude, longitude)— radar-based precipitation for the next 2 hours. Nordics only.get_weather_alerts(latitude?, longitude?)— official Norwegian danger warnings (MetAlerts). Omit coordinates for all of Norway.get_sun_events(latitude, longitude, date, utc_offset)— sunrise, sunset, and solar noon. Worldwide.get_ocean_forecast(latitude, longitude, hours)— wave height and sea temperature along the Norwegian coast.find_weather_stations(latitude, longitude, count)— nearest official weather stations (Frost).get_historical_weather(station_id, from, to, elements)— daily historical observations from the Frost archive; some stations go back over 100 years.
The two Frost tools need a free client ID from https://frost.met.no/auth/requestCredentials.html, set as the FROST_CLIENT_ID env var (or a Cloudflare secret for the worker). The other tools need nothing.
Tool definitions live in src/tools.ts, shared between the stdio server and the worker.
Build and test
npm install
npm run build
npm test
The test spawns the server over stdio and calls both tools against the live APIs.
Use with Claude Code
claude mcp add met-weather -- node C:\Users\trond\met-mcp\dist\index.js
Then ask Claude: "What is the weather in Bergen tomorrow?"
MET terms of service
- Send an identifying User-Agent with contact info. Set the
MET_USER_AGENTenv var, e.g.met-mcp/0.1.0 you@example.com. - Send at most 4 decimals in coordinates. The server rounds for you.
- Data license: NLOD / CC BY 4.0. Credit MET Norway when you show the data.
Remote version
worker/ holds the Cloudflare Workers deployment: the same two tools served over MCP Streamable HTTP with createMcpHandler (MCP SDK v2). Develop with npm run dev, ship with npm run deploy (both from worker/).
How it works
src/index.tsis the whole server. It speaks MCP over stdio: JSON-RPC on stdin/stdout.- Each tool declares an input schema with Zod. The MCP client (Claude) reads the schema and validates arguments.
- Tool results are
contentblocks. This server returns JSON as text, trimmed to what an LLM needs — the raw MET response has ~90 timesteps with far more fields. - Never write to stdout with
console.log. It corrupts the protocol stream. Log to stderr.
Install
Add met mcp to your client. Pick the one you use.
{
"servers": {
"met-mcp": {
"type": "http",
"url": "https://met-mcp.met-mcp-worker.workers.dev/mcp"
}
}
}Add to `.vscode/mcp.json` in your workspace.
claude mcp add met-mcp -- npx -y met-mcpcodex mcp add met-mcp -- npx -y met-mcpamp mcp add met-mcp -- npx -y met-mcp{
"mcpServers": {
"met-mcp": {
"command": "npx",
"args": [
"-y",
"met-mcp"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"met-mcp": {
"command": "npx",
"args": [
"-y",
"met-mcp"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
{
"mcpServers": {
"met-mcp": {
"command": "npx",
"args": [
"-y",
"met-mcp"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"met-mcp": {
"command": "npx",
"args": [
"-y",
"met-mcp"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"met-mcp": {
"command": "npx",
"args": [
"-y",
"met-mcp"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"met-mcp": {
"type": "local",
"command": "npx",
"args": [
"-y",
"met-mcp"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"met-mcp": {
"command": {
"path": "npx",
"args": [
"-y",
"met-mcp"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y met-mcpRun `goose configure`, choose **Add Extension → Command-line Extension**, and paste this command.
Score
39 / 100
Incomplete
- Documentation22/25
- Maintenance25/25
- Trust13/20
- Capability0/15
- Install experience15/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 9 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 18 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint — no local install
Version history
| Versions | Published |
|---|---|
| 0.2.0Latest | Aug 22, 2026 |
| 0.1.2 | Aug 22, 2026 |
| 0.1.1 | Aug 22, 2026 |