copilot-studio-weather-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@copilot-studio-weather-mcpWhat's the weather forecast for Denver, Colorado?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Python MCP Weather Server with Azure Deployment
A Model Context Protocol (MCP) server built with FastAPI and Python that provides weather information using the National Weather Service API. Ready for deployment to Azure App Service with Azure Developer CLI (azd).
π Features
FastAPI Framework: Modern, fast web framework for building APIs
MCP Protocol Compliance: Full support for JSON-RPC 2.0 MCP protocol
HTTP Transport: HTTP-based communication for web connectivity
Weather Tools:
get_alerts: Get weather alerts for any US stateget_forecast: Get detailed weather forecast for any location
Azure Ready: Pre-configured for Azure App Service deployment
Web Test Interface: Built-in HTML interface for testing
National Weather Service API: Real-time weather data from official US government source
Related MCP server: Python MCP Weather Server with OAuth 2.1 Authentication
π» Local Development
Prerequisites
Python 3.8+
pip (Python package installer)
Setup & Run
Clone and install dependencies:
git clone <your-repo-url> cd remote-mcp-webapp-python python -m venv venv .\venv\Scripts\Activate.ps1 # Windows # source venv/bin/activate # macOS/Linux pip install -r requirements.txtStart the development server:
.\start_server.ps1 # Windows # or manually: uvicorn main:app --host 0.0.0.0 --port 8000 --reloadAccess the server:
Server: http://localhost:8000/
Health Check: http://localhost:8000/health
Test Interface: http://localhost:8000/test
π Connect to the Local MCP Server
Using VS Code - Copilot Agent Mode
Add MCP Server from command palette and add the URL to your running server's HTTP endpoint:
http://localhost:8000List MCP Servers from command palette and start the server
In Copilot chat agent mode, enter a prompt to trigger the tool:
What's the weather forecast for San Francisco?When prompted to run the tool, consent by clicking Continue
Using MCP Inspector
In a new terminal window, install and run MCP Inspector:
npx @modelcontextprotocol/inspectorCTRL+click the URL displayed by the app (e.g. http://localhost:5173/#resources)
Set the transport type to
HTTPSet the URL to your running server's HTTP endpoint and Connect:
http://localhost:8000List Tools, click on a tool, and Run Tool
π Quick Deploy to Azure
Prerequisites
Active Azure subscription
Deploy with Azure Developer CLI
# 1. Login to Azure
azd auth login
# 2. Create an isolated environment in your subscription and region
azd env new weather-mcp-dev --subscription <subscription-id> --location eastus2
# 3. Deploy to Azure
azd up --no-promptThe deployment uses the tenant and subscription selected by your azd login and environment. No tenant ID, subscription ID, resource group name, or Application Insights key is stored in the Bicep files.
Deploy the Infrastructure with Bicep
To provision only the Azure infrastructure using the currently selected Azure CLI subscription:
az login
az account set --subscription <subscription-id>
az deployment sub create \
--name weather-mcp-infrastructure \
--location eastus2 \
--template-file infra/main.bicep \
--parameters environmentName=weather-mcp-dev location=eastus2This creates a new resource group, Linux B1 App Service plan, web app, Log Analytics workspace, and Application Insights instance. Use azd up when you also want to package and deploy the Python application.
After deployment, your MCP server will be available at:
Health Check:
https://<your-app>.azurewebsites.net/healthMCP Capabilities:
https://<your-app>.azurewebsites.net/mcp/capabilitiesMCP Streamable HTTP:
https://<your-app>.azurewebsites.net/mcp/streamTest Interface:
https://<your-app>.azurewebsites.net/test
π Connect to the Remote MCP Server
In Copilot Studio, configure an MCP tool with Streamable HTTP transport, no authentication, and this URL:
https://<your-app>.azurewebsites.net/mcp/streamπ§ͺ Testing
Visit /test endpoint for an interactive testing interface.
π¦οΈ Data Source
This server uses the National Weather Service (NWS) API:
Real-time weather alerts and warnings
Detailed weather forecasts
Official US government weather data
No API key required
High reliability and accuracy
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted MCP server for Xweather weather data: conditions, forecasts, alerts, and more.
Provide real-time and forecast weather information for locations in the United States using naturaβ¦
US weather & geo for AI agents: forecasts, alerts, earthquakes, elevation, geocoding. No keys.
US weather & geo for AI agents: forecasts, alerts, earthquakes, elevation, geocoding. No keys.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceProvides weather forecast data from the US National Weather Service API through MCP tools. Enables users to get detailed weather forecasts by ZIP code or coordinates using natural language queries.-
- FlicenseNot gradedqualityDmaintenanceProvides weather information from the National Weather Service API with full MCP OAuth 2.1 compliance, including weather alerts and forecasts for US locations through secure Azure AD authentication.27-
- FlicenseNot gradedqualityDmaintenanceProvides weather forecasts and alerts for US locations via the National Weather Service API, enabling AI assistants to deliver real-time weather information.9 npm-
- FlicenseBqualityDmaintenanceProvides weather forecasts and alerts for US locations using the National Weather Service API. Enables users to retrieve active alerts by state and detailed forecasts by coordinates via MCP tools.2-