loading…
Search for a command to run...
loading…
A weather service built using Model-Context-Protocol (MCP) that provides current weather and forecasts for Indian cities using WeatherAPI.com.
A weather service built using Model-Context-Protocol (MCP) that provides current weather and forecasts for Indian cities using WeatherAPI.com.
A weather service built using Model-Context-Protocol (MCP) that provides current weather and forecasts for Indian cities using WeatherAPI.com.
git clone <your-repo-url>
cd mcp-server
.env file in the project root with your API keys:# WeatherAPI.com API Key
WEATHER_API_KEY=your_weather_api_key_here
# Groq API Key
GROQ_API_KEY=your_groq_api_key_here
uv pip install -e .
To run the weather service in development mode:
uv run mcp dev server/weather.py
To install and run the service on desktop claude:
uv run mcp install server/weather.py
The weather.json configuration file is required for the chat interface.
1, Testing your server with Claude for Desktop:
code $env:AppData\Claude\claude_desktop_config.json
{
"mcpServers": {
"weather": {
"command": "uv",
"args": [
"--directory",
"C:\\ABSOLUTE\\PATH\\TO\\YOUR\\mcp-server",
"run",
"server/weather.py"
]
}
}
}
C:\\ABSOLUTE\\PATH\\TO\\YOUR\\mcp-server with your actual project pathFor Chat Interface (client.py):
weather.json file should be in your server directory{
"mcpServers": {
"weather": {
"command": "uv",
"args": [
"--directory",
"C:\\ABSOLUTE\\PATH\\TO\\YOUR\\mcp-server",
"run",
"server/weather.py"
]
}
}
}
C:\\ABSOLUTE\\PATH\\TO\\YOUR\\mcp-server with your actual project pathRestart Claude for Desktop after making changes
Run the chat client to interact with the weather service:
python server/client.py
The chat interface supports:
Commands:
Current weather information:
3-day weather forecast:
mcp-server/
├── server/
│ ├── weather.py # Weather service implementation
│ ├── client.py # Chat interface
│ └── weather.json # MCP server configuration
├── .env # API keys configuration
├── pyproject.toml # Project dependencies
└── README.md # This file
WeatherAPI.com:
.env as WEATHER_API_KEYGroq API:
.env as GROQ_API_KEYFeel free to submit issues and enhancement requests!
Выполни в терминале:
claude mcp add mcp-weather-service -- npx Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development