MCP Weather
A TypeScript-based Model Context Protocol server that enables Claude Desktop to fetch real-time weather data via external weather APIs. It provides a simple integration for users to query current weather information through natural language interactions.
README
MCP Weather - Claude Desktop Integration
This project is an example MCP (Model Context Protocol) server designed for use with the Claude Desktop application. It is built to work seamlessly with Claude Desktop.
Features
- TypeScript-based MCP server
- Weather query via OpenWeather API
- Easy integration with Claude Desktop
Project Structure
.
├── package.json
├── tsconfig.json
├── src/
│ └── index.ts
├── claude_desktop_config.json
Installation
Requirements
- Node.js (v16 or higher)
- npm
- Claude Desktop (https://desktop.anthropic.com/)
Setup
- Clone the repository:
git clone <repository-url> cd mcp-weather - Install dependencies:
npm install - Create a
.envfile and fill it as follows:WEATHER_API_URL=https://api.weatherapi.com/v1/current.json WEATHER_API_KEY=<your_API_KEY>
Claude Desktop Integration
-
In Claude Desktop, go to
File -> Settings -> Developer -> Edit Config. -
Add a block similar to the example below to the config file (edit the file paths to match your own system):
{ "mcpServers": { "weather": { "command": "npx", "args": ["tsx", "C:/your/path/mcp-weather/src/index.ts"], "cwd": "C:/your/path/mcp-weather" } } }Note: Replace
C:/your/path/with the actual path to your project on your computer. -
Save the settings and restart Claude Desktop.
.env File and Path Setting
In src/index.ts, the path to the .env file is set to the project root by default:
import dotenv from "dotenv";
dotenv.config({
// Path to your .env file. Edit as needed, e.g.: path: "C:/your/path/.env"
path: ".env", // By default, uses the .env file in the project root
});
If your .env file is in a different directory, update the path parameter accordingly.
Usage
To start the project:
npm start
Or to run the main file directly:
npx ts-node src/index.ts
Build
To compile the TypeScript code:
npm run build
Contributing
Contributions are welcome! Please open issues or submit pull requests for improvements or bug fixes.
License
MIT License
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.