Weather MCP Server
Sample MCP server implementation for fetching weather forecasts
Overview
Weather MCP Server is a Model Context Protocol (MCP) server that provides weather data from the National Weather Service API, allowing users to fetch weather forecasts and alerts.
To use the Weather MCP Server, clone the repository, install the dependencies, and run the server. You can then connect it to compatible clients like Claude Desktop for querying weather data.
- Fetch weather forecasts by geographic coordinates. - Retrieve weather alerts by US state. - Provides clean, formatted weather data suitable for LLM consumption. - Integration capabilities with Claude and other MCP-compatible clients.
- Getting real-time weather forecasts for specific locations.
- Monitoring active weather alerts in different US states.
- Integrating weather data into applications that require weather information.
Add to your AI client
Use these steps to connect Weather MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"weather-mcp-nakamurau1": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-weather-mcp-nakamurau1"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"weather-mcp-nakamurau1": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-weather-mcp-nakamurau1"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"weather-mcp-nakamurau1": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-weather-mcp-nakamurau1"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"weather-mcp-nakamurau1": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-weather-mcp-nakamurau1"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"weather-mcp-nakamurau1": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-weather-mcp-nakamurau1"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"weather-mcp-nakamurau1": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-weather-mcp-nakamurau1"
]
}
}
}FAQ
What kind of weather data can I get?
You can get current weather forecasts and active weather alerts for locations in the United States.
Is historical weather data available?
No, the server only provides current conditions and forecasts, not historical data.
What are the prerequisites for running the server?
You need Node.js (LTS version recommended) and npm or yarn to install dependencies.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":3782,"uuid":"01131960-292d-40e5-bbb8-9156c758ed79","name":"weather-mcp","title":"Weather MCP Server","description":"Sample MCP server implementation for fetching weather forecasts","avatar_url":"https://avatars.githubusercontent.com/u/1153289?v=4","created_at":"2025-03-21T16:43:29.849Z","updated_at":"2025-03-21T16:49:15.311Z","status":"created","author_name":"nakamurau1","author_avatar_url":"https://avatars.githubusercontent.com/u/1153289?v=4","tags":"weather-mcp,weather-forecast,MCP-server","category":"research-and-data","is_featured":false,"sort":1,"url":"https://github.com/nakamurau1/weather-mcp","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"0\",\"license\":\"MIT license\",\"language\":\"JavaScript\",\"is_official\":false,\"latest_commit_time\":\"2025-03-22 00:07:09\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]