nemesgyadam/MCP-Boilerplate
3.1
If you are the rightful owner of MCP-Boilerplate and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A modern AI-powered weather application using Model Context Protocol (MCP) for seamless tool integration with large language models via OpenRouter.
Tools
1
Resources
0
Prompts
0
MCP Boilterplate Service
A modern AI-powered weather application using (MCP) https://github.com/modelcontextprotocol for seamless tool integration with large language models via OpenRouter. This package is based on the official anthropic tutorial, but fixes several bugs, and changes provider to openrouter.
Overview
This project demonstrates a client-server architecture built with MCP:
- MCP Client: Connects to LLMs via OpenRouter, handling conversation flows and tool execution
- Weather Service: An MCP server exposing weather data tools that can be called by any AI model
Features
- š¤ Connects Claude 3 (via OpenRouter) with external weather data tools
- š¦ļø Real-time US weather alerts and forecasts via the National Weather Service API
- š Tool augmentation pattern with full conversation context
- š Easy integration with any OpenAI-compatible API
Project Structure
metacortex/
āāā mcp-client/ # Client connecting OpenRouter with MCP servers
ā āāā client.py # Main client implementation
āāā weather/ # MCP server exposing weather tools
āāā weather.py # Weather service implementation
Getting Started
Prerequisites
- Python 3.11+
- OpenRouter API key
Setup
- Clone the repository
- Set up environment (each component has its own environment):
# For the MCP client
cd mcp-client
cp example.env .env # Edit to add your OpenRouter API key
uv venv
uv pip install -e .
# For the weather service
cd ../weather
uv venv
uv pip install -e .
Usage
- Start a conversation with the MCP client, pointing to the weather service:
cd mcp-client
python client.py ../weather/weather.py
- Ask questions about weather forecasts or alerts:
- "What's the weather forecast for New York City? Lat/Long is 40.7128, -74.0060"
- "Are there any weather alerts in California? The state code is CA"
Technologies
- (MCP) - Protocol for AI tool use
- OpenRouter - API gateway for accessing multiple LLM providers
- Claude 3 - Advanced LLM with function calling capabilities
- National Weather Service API - Source of weather data
License
MIT