MCP Weather Server + Streamlit Chat Client
This repository provides a working implementation of an MCP Server (Model Context Protocol) that exposes a custom tool to fetch live U.S. weather alerts from the National Weather Service (NWS). The MCP server can be accessed through:
-
✔ Local Python IDE (via MCPAgent)
-
✔ Streamlit Chat UI (visual interface)
-
✔ Any MCP-compatible LLM client
mcpserver/
├── server/
│ ├── weather.py # MCP server (FastMCP + NWS tool)
│ ├── weather.json # MCP config file
│ └── app.py # Streamlit chat UI
│ └── client.py # Local IDE chat server
├── requirements.txt
└── README.md
- Clone the repository
git clone https://github.com/Harshitpandey21/mcpserver.git
cd mcpserver
- Install dependencies
pip install -r requirements.txt
- Set OpenAI API KEY
OPENAI_API_KEY = "YOUR_KEY_HERE"
The MCP server is defined in weather.py.
To start the server:
uv run mcp dev server/weather.py
To start the server:
uv run server/client.py
To start the server:
streamlit run server/app.py
langchain-openai
langchain-groq
streamlit
"mcp[cli]"
mcp-use