weather-mcp-server-js
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@weather-mcp-server-jsWhat's the current weather in Tokyo?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
š¤ļø Weather MCP Server (Node.js)
A remote MCP (Model Context Protocol) server built on Node.js / Express.
It exposes the get_weather tool via Streamable HTTP transport, letting MCP clients such as Claude Code query the current weather of any city in real time.
Weather data comes from wttr.in ā free, no registration, no API key required.
⨠Features
š°ļø Remote MCP service: Implements Streamable HTTP transport based on the official
@modelcontextprotocol/sdk, supporting both JSON and SSE response modesš Global city support: Pass a city name directly (e.g.
Beijing,Tokyo,Paris) to look up local weatherš Full session management: Automatically generates/validates
Mcp-Session-Id, supporting session creation, reuse, and termination (DELETE)š§© Single-file ready to use: No database, zero configuration files, just one
server.jsto get started
Related MCP server: MCP Weather Server ā Demo
š¦ Requirements
Node.js ā„ 18 (built-in
fetch, no extra dependencies)
š Quick Start
# 1. å®č£
ä¾čµ
npm install
# 2. åÆåØęå”(é»č®¤ē«Æå£ 3000)
npm start
# åå°čæč”(ę„åæåå
„ logs/server.log)
npm run start:bgOnce started successfully, the service address is:
http://localhost:3000/mcpCommon scripts
Command | Description |
| Start the service in the foreground |
| Start in the background, logs written to |
| Development mode, auto-restart on file changes |
| Check whether the service on port 3000 is running |
| View logs in real time |
| Stop the service |
| Restart the service |
| Restart in the background |
š Configuring an MCP client
In Claude Code or another MCP client that supports Streamable HTTP, register the service as a remote MCP server.
Claude Code
Add it via the MCP server list (/mcp ā Add ā HTTP):
{
"type": "http",
"url": "http://localhost:3000/mcp"
}JSON configuration file method
{
"mcpServers": {
"weather": {
"type": "http",
"url": "http://localhost:3000/mcp"
}
}
}š§° Provided tools
get_weather
Get the current weather for a specified city.
Parameters
Parameter | Type | Required | Description |
| string | ā | City name, e.g. |
Example response
å½å Beijing ē天ę°ęÆę“(Sunny),ęø©åŗ¦ 28°C(ä½ę 30°C),湿度 45%,é£é 12 km/hćāļø Implementation notes
Session isolation: Each session holds its own
Server+transportinstance (the SDK'sconnect()only supports one transport), associated via theMcp-Session-Idrequest header.New session flow: A POST without
Mcp-Session-Idis treated as an initialization request; the server generates a session ID and returns it via theMcp-Session-Idresponse header (explicitly exposed to browser clients via CORSexposedHeaders).Compatibility handling: A GET SSE probe request without a session ID keeps an open SSE stream open (instead of returning 404/400), so clients like Claude Code can continue with the POST initialization flow.
Reliable error responses: When the weather API call fails, it returns a result with
isError: trueinstead of crashing the entire request.
šļø Project structure
.
āāā server.js # å
ØéØęå”é»č¾(åęä»¶)
āāā package.json # 锹ē®é
ē½®äøčę¬
āāā logs/ # čæč”ę¶ę„åæ(已被 .gitignore åæ½ē„)
āāā LICENSE # MIT 许åÆčÆš License
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseBqualityDmaintenanceA simple MCP server that provides a tool to fetch current weather information for cities using the Open-Meteo API, communicating through stdin/stdout.12
- Alicense-qualityDmaintenanceDemo MCP server that provides weather data for cities, with tools to get weather and list available cities.MIT
- AlicenseAqualityBmaintenanceMCP server that provides current weather for any city using Open-Meteo APIs. It exposes a single tool 'get_weather' returning temperature, humidity, wind, and other weather data.113MIT
- AlicenseAqualityBmaintenanceA simple MCP server that exposes a get_weather tool to fetch real-time weather for any GPS coordinates using the Open-Meteo API, no API key required.114ISC
Related MCP Connectors
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
MCP server exposing the Backtest360 engine API as tools for AI agents.
Remote ChromaDB vector database MCP server with streamable HTTP transport
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/yuxiaosenstar/weather-mcp-server-js'
If you have feedback or need assistance with the MCP directory API, please join our Discord server