weather-tool-with-mcp
by rairai77
This tool leverages a weatherapi.com key and a custom Ollama model to provide weather information. It requires setting up the environment and running the main script.
Last updated: N/A
What is weather-tool-with-mcp?
A weather tool that utilizes the weatherapi.com API and a custom Ollama model (llama3.1-tool:8b) to fetch and process weather data.
How to use weather-tool-with-mcp?
- Install dependencies using
uv
. 2. Copy.example.env
to.env
and add your weatherapi.com key. 3. Create a custom Ollama model calledllama3.1-tool:8b
using the provided modelfile andllama3.1:8b
as the base. 4. Start the Ollama server withollama serve
. 5. Run the main script usinguv run main.py
.
Key features of weather-tool-with-mcp
Fetches weather data from weatherapi.com
Uses a custom Ollama model for further processing (likely natural language interaction related to weather)
Requires minimal setup with environment variables
Simple command-line execution
Use cases of weather-tool-with-mcp
Getting current weather conditions
Generating weather forecastsusing custom ai model tools
Integrating weather information into other applications
Learning about weather APIs and AI model integration
FAQ from weather-tool-with-mcp
What dependencies are required?
What dependencies are required?
The tool requires uv
for dependency management and a weatherapi.com API key.
How do I set up the environment?
How do I set up the environment?
Copy .example.env
to .env
and add your weatherapi.com API key.
What is the custom Ollama model?
What is the custom Ollama model?
The custom Ollama model is named llama3.1-tool:8b
and is based on llama3.1:8b
.
How do I run the tool?
How do I run the tool?
Start the Ollama server with ollama serve
and then run the main script using uv run main.py
.
Where can I get a weatherapi.com key?
Where can I get a weatherapi.com key?
You need to sign up for an account at weatherapi.com and obtain an API key from their website.