rishitha-max/MCP-Servers-with-Tools
If you are the rightful owner of MCP-Servers-with-Tools and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The MCP Weather Agent is a toolkit that integrates with the National Weather Service to provide weather alerts and forecasts through a Model Context Protocol (MCP) server.
MCP Server Agent
The MCP Agent is a small, MCP-compatible toolkit that wraps National Weather Service (NWS)(opensource API) alerts and forecasts as tools. It includes example clients for both SSE (Server-Sent Events) and chat-driven usage using ChatGroq. This toolkit demonstrates how to integrate external APIs into an MCP-compatible server and exposes data for interactive use.
Features
- MCP server exposing
get_alertsandget_forecastagainst NWS. - SSE client demo that lists tools and invokes
get_alerts. - Chat client using
mcp-use+ChatGroqwith built-in memory. - Minimal entry stub in
main.py.
Structure
mcpserver/server.py— FastMCP server (default SSE on port 8000).mcpserver/client-sse.py— Example SSE client.graphqlserver/graphql_example.py— GraphQL MCP server (Rick and Morty).graphqlserver/client.py— Chat client for the GraphQL server (graphql.json).server/client.py— Chat client configured viaserver/weather.json.server/weather.py— Alternate FastMCP server example.main.py— Simple script stub.
Requirements
- Python 3.11+
uv(recommended) orpipGROQ_API_KEYfor the chat client
Setup
Using uv:
uv sync
Using pip:
python -m venv .venv
source .venv/bin/activate
uv pip compile uv.lock > requirements.txt # optional helper
pip install -r requirements.txt
Run the MCP weather server (SSE)
uv run mcpserver/server.py
Defaults: host 0.0.0.0, port 8000, SSE transport.
Inspect with MCP Inspector
uv run mcp dev server/weather.py
Opens MCP Inspector and proxy for the server/weather.py MCP server (stdio transport).
Try the SSE client
uv run mcpserver/client-sse.py
Assumes the server is running on http://localhost:8000/sse.
Chat with the MCP tools (Groq + memory)
export GROQ_API_KEY=your_key
uv run server/client.py
- Uses
server/weather.jsonfor MCP client configuration. - Commands:
clearwipes conversation history;exit/quitstops.
Using GraphQL APIs
You can create MCP tools that interact with any open-source GraphQL API! See mcpserver/graphql_example.py for an example using the Rick and Morty GraphQL API.
Run the GraphQL example server:
uv run graphqlserver/graphql_example.py
Runs on port 8001 with a single tool for querying Rick and Morty characters.
Available tools:
get_character(character_id)- Get character details by ID
Chat client for the GraphQL server:
export GROQ_API_KEY=your_key
uv run graphqlserver/client.py
Uses graphqlserver/graphql.json to start the MCP server and chat with the get_character tool.
To create your own GraphQL tools:
- Use the
make_graphql_request()helper function fromgraphql_example.py - Write your GraphQL query as a string
- Create an
@mcp.tool()decorated function - Call
make_graphql_request()with your API endpoint, query, and variables
Notes
- NWS requires a user agent; the server sets
weather-app/1.0. - Forecasts return the next five periods for brevity.
- GraphQL tools use
httpxfor HTTP requests (already included in dependencies).