A professional Model Context Protocol (MCP) server built with Python and FastMCP. This server extends AI capabilities by providing real-time data and local system access.
- 🌦️ Weather Alerts: Fetches active US weather alerts from the National Weather Service.
- 📰 News Search: Real-time news searching using the NewsAPI.
- 📁 Directory Explorer: Allows the AI to list and explore local system directories safely.
- 🔐 Secure Secrets: Uses
.envfor safe API key management.
- Python 3.10+
- uv (Recommended)
- Clone the repository:
git clone https://github.com/Rahii123/mcp.git cd mcp - Install dependencies:
uv sync
Create a .env file in the root directory and add your NewsAPI key:
NEWS_API_KEY=your_actual_key_hereRun directly with uv:
uv run server.pyWe have provided two separate clients for testing:
Use this when you are developing on your own machine.
uv run client_local.pyThis starts the server as a background process and communicates directly.
Use this after you have deployed your server to the web (e.g., Railway).
uv run client_online.pyThis asks for your deployment URL and connects over the internet.
Ensure all your changes are committed and pushed to your GitHub repository:
git add .
git commit -m "Prepare for deployment"
git push origin main- Go to Railway.app and log in.
- Click + New Project > Deploy from GitHub repo.
- Select your
mcprepository.
- Environment Variables:
- Go to the Variables tab in Railway.
- Add
NEWS_API_KEY:(Your actual NewsAPI Key)
- Start Command:
- Railway should automatically detect
pyproject.toml, but if needed, set the start command to:uv run server.py
- Railway should automatically detect
- Networking:
- Railway will automatically detect the port from the
$PORTenvironment variable. Ensure yourserver.pyis usingmcp.run(transport='sse')(I've already configured this for you).
- Railway will automatically detect the port from the
Once the build is finished, Railway will provide a public URL (e.g., https://mcp-production.up.railway.app).
The MCP endpoint will be at: https://your-app-url.up.railway.app/sse