Weather MCP Server
Annihilater
README
Weather MCP Server
中文文档 | English
A simple weather information service built with Model Context Protocol (MCP).
Overview
Weather MCP Server provides weather information for cities around the world through a simple API interface. It uses the Model Context Protocol (MCP) to communicate with clients, allowing easy integration with AI assistants and other MCP-compatible applications.
Features
- Get current weather conditions by city name
- Returns temperature, weather description, humidity, and wind speed
- Fallback to generated data if external API is unavailable
- Simple and lightweight implementation
Tech Stack
- TypeScript
- Node.js
- MCP SDK (@modelcontextprotocol/sdk)
- Zod for validation
Installation
- Clone the repository
git clone https://github.com/Annihilater/mcp-server-get-weather
- Install dependencies:
npm install
- Build the project:
npm run build
Usage
Start the server:
npx @modelcontextprotocol/inspector node dist/index.js
MCP Configuration
要在Cursor中使用此天气服务,需要在~/.cursor/mcp.json
文件中添加以下配置:
"mcp-server-get-weather": {
"command": "node",
"args": [
"<path-to-your-project>/dist/index.js"
]
}
将<path-to-your-project>
替换为实际项目路径。配置完成后,可以通过MCP工具调用mcp_mcp_server_get_weather_get_weather
函数来获取天气信息。
Example
API Reference
get_weather
Gets weather information for a specified city.
Parameters
Name | Type | Description |
---|---|---|
cityName | string | The name of the city to get weather for |
Response
Returns a JSON object with the following structure:
{
"city": "London",
"current_condition": {
"temperature": "15",
"weatherDesc": "Partly cloudy",
"humidity": "71",
"windSpeed": "11",
"observation_time": "06:53 PM"
},
"forecast": {
"maxTemp": "16",
"minTemp": "9",
"sunHour": "7.4",
"date": "2023-04-12"
}
}
Development
Available Scripts
npm run build
- Builds the project and makes the entry point executablenpm run watch
- Watches for changes and rebuilds automaticallynpx @modelcontextprotocol/inspector node dist/index.js
- Starts the server
Project Structure
src/index.ts
- Entry point, sets up the MCP server with stdio transportsrc/server.ts
- Server implementation, defines the weather tool
License
MIT
Recommended Servers
Crypto Price & Market Analysis MCP Server
A Model Context Protocol (MCP) server that provides comprehensive cryptocurrency analysis using the CoinCap API. This server offers real-time price data, market analysis, and historical trends through an easy-to-use interface.
MCP PubMed Search
Server to search PubMed (PubMed is a free, online database that allows users to search for biomedical and life sciences literature). I have created on a day MCP came out but was on vacation, I saw someone post similar server in your DB, but figured to post mine.
dbt Semantic Layer MCP Server
A server that enables querying the dbt Semantic Layer through natural language conversations with Claude Desktop and other AI assistants, allowing users to discover metrics, create queries, analyze data, and visualize results.
mixpanel
Connect to your Mixpanel data. Query events, retention, and funnel data from Mixpanel analytics.

Sequential Thinking MCP Server
This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.

Nefino MCP Server
Provides large language models with access to news and information about renewable energy projects in Germany, allowing filtering by location, topic (solar, wind, hydrogen), and date range.
Vectorize
Vectorize MCP server for advanced retrieval, Private Deep Research, Anything-to-Markdown file extraction and text chunking.
Mathematica Documentation MCP server
A server that provides access to Mathematica documentation through FastMCP, enabling users to retrieve function documentation and list package symbols from Wolfram Mathematica.
kb-mcp-server
An MCP server aimed to be portable, local, easy and convenient to support semantic/graph based retrieval of txtai "all in one" embeddings database. Any txtai embeddings db in tar.gz form can be loaded
Research MCP Server
The server functions as an MCP server to interact with Notion for retrieving and creating survey data, integrating with the Claude Desktop Client for conducting and reviewing surveys.