This MCP server provides weather information using the National Weather Service API, implementing the Model Context Protocol over HTTP. Built with Express.js and Node.js, it offers tools for retrieving weather alerts and forecasts with deployment options for both local development and Azure cloud.
Clone the repository and install dependencies:
git clone <your-repo-url>
cd remote-mcp-webapp-node
npm install
Start the development server:
npm run dev
Access the server at:
Ensure you have the required tools:
Deploy using the following commands:
# Login to Azure
azd auth login
# Initialize the project
azd init
# Deploy to Azure
azd up
After deployment, your server will be available at:
https://<your-app>.azurewebsites.net/health
https://<your-app>.azurewebsites.net/mcp/capabilities
https://<your-app>.azurewebsites.net/test
Add MCP Server from command palette with the URL to your server:
http://localhost:8000
(or your Azure deployment URL)
List MCP Servers from command palette and start the server
In Copilot chat agent mode, enter a weather-related prompt:
What's the weather forecast for San Francisco?
When prompted to run the tool, click Continue
Install and run MCP Inspector:
npx @modelcontextprotocol/inspector
CTRL+click the URL displayed (typically http://localhost:5173/#resources)
Configure the connection:
HTTP
Click List Tools, select a tool, and click Run Tool
Retrieves current weather alerts for any US state.
Provides detailed weather forecasts for any US location.
The server includes a built-in testing interface accessible at the /test
endpoint, allowing you to interactively test the available weather tools.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "national-weather-service" '{"transportType":"http","url":"http://localhost:8000"}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"national-weather-service": {
"transportType": "http",
"url": "http://localhost:8000"
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"national-weather-service": {
"transportType": "http",
"url": "http://localhost:8000"
}
}
}
3. Restart Claude Desktop for the changes to take effect