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., "@MCP Weatherwhat's the current weather in London?"
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.
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
Installation
Requirements
Node.js (v16 or higher)
npm
Claude Desktop (https://desktop.anthropic.com/)
Setup
Clone the repository:
git clone <repository-url> cd mcp-weatherInstall dependencies:
npm installCreate 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:
If your .env file is in a different directory, update the path parameter accordingly.
Usage
To start the project:
Or to run the main file directly:
Build
To compile the TypeScript code:
Contributing
Contributions are welcome! Please open issues or submit pull requests for improvements or bug fixes.
License
MIT License