- Home
- MCP servers
- Weather By Api Ninjas
Weather By Api Ninjas
- python
0
GitHub Stars
python
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
This MCP Server provides a structured, easily integrable way to access the Weather By Api Ninjas API through a configurable MCP interface. It enables you to run simple weather lookups from your applications with consistent API handling and centralized authentication.
How to use
You will run this MCP server as a local process and connect to it via an MCP client. Start it with your preferred method, then point your client at the MCP instance. If you are using a manager or platform that supports MCPs, install this server and provide your API key to enable authenticated weather queries.
How to install
Prerequisites: Python and pip, or a runtime that supports the MCP hosting method described below.
# Install via PyPI
pip install bach-weather_by_api_ninjas
# Or install from source (editable mode)
pip install -e .
Configuration and usage details
Set your API key to enable authenticated access to Weather By Api Ninjas.
export API_KEY="your_api_key_here"
Cursor MCP configuration
{
"mcpServers": {
"weather_by_api_ninjas": {
"command": "uvx",
"args": ["--from", "bach-weather_by_api_ninjas", "bach_weather_by_api_ninjas"],
"env": {
"API_KEY": "your_api_key_here"
}
}
}
}
Claude Desktop configuration
{
"mcpServers": {
"weather_by_api_ninjas": {
"command": "uvx",
"args": ["--from", "bach-weather_by_api_ninjas", "bach_weather_by_api_ninjas"],
"env": {
"API_KEY": "your_api_key_here"
}
}
}
}
Available tool: v1weather
This server exposes a Weather API Ninjas endpoint you can query to obtain weather data.
Endpoint: GET /v1/weather
Parameters:
- lat: latitude (number)
- lon: longitude (string)
- zip: 5-digit US ZIP code (US only)
- city: city name
- state: US state (US only)
- country: country name
Available tools
v1weather
Weather API Ninjas endpoint to fetch current weather data. Use the GET /v1/weather endpoint with parameters like lat, lon, city, state, country, or zip to retrieve weather information.