home / mcp / weather by api ninjas mcp server
weather_by_api_ninjas - 由 MCP工厂自动创建
Configuration
View docs{
"mcpServers": {
"bach-ai-tools-weather_by_api_ninjas": {
"url": "https://mcp.example.com/mcp",
"headers": {
"API_KEY": "YOUR_API_KEY"
}
}
}
}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.
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.
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 .Set your API key to enable authenticated access to Weather By Api Ninjas.
export API_KEY="your_api_key_here"{
"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"
}
}
}
}{
"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"
}
}
}
}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
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.