local-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., "@local-mcpwhat's the forecast for 37.7749, -122.4194?"
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.
local-mcp
An extensible local Model Context Protocol (MCP) server for building and running tools from VS Code. Weather is the first tool set in the repository, and additional tools can be added over time.
The server communicates over stdio. The current implementation exposes two weather tools backed by the US National Weather Service API:
get_alerts: returns active weather alerts for a two-letter US state code, such asCAorNY.get_forecast: returns the forecast for a latitude and longitude. The National Weather Service API supports US locations only.
Requirements
Node.js 20 or later
npm
VS Code with MCP support
Related MCP server: Weather MCP Server
Set up locally
Clone the repository and install its dependencies:
git clone <repository-url>
cd local-mcp
npm installBuild the TypeScript source:
npm run buildThe compiled server is written to build/index.js. To run it directly:
node build/index.jsThe server uses stdio, so it is intended to be started by an MCP client rather than used as an interactive terminal command. It logs status and errors to stderr while MCP messages use stdin/stdout.
Use with VS Code
After building the project, add an MCP configuration file at .vscode/mcp.json in this repository, or add the same server to your user-level MCP configuration. The configuration starts the whole local MCP server, so tools registered in the server become available through the same entry point:
{
"servers": {
"local-mcp": {
"type": "stdio",
"command": "node",
"args": ["${workspaceFolder}/build/index.js"]
}
}
}Start or restart the local-mcp server from VS Code. The registered tools will then be available to supported chat experiences in the workspace.
If the project is stored outside the active workspace, replace ${workspaceFolder}/build/index.js with the absolute path to the compiled build/index.js file.
Current tools: weather
get_alerts
{
"state": "CA"
}state must be exactly two characters. The server normalizes the value to uppercase before requesting alerts.
get_forecast
{
"latitude": 37.7749,
"longitude": -122.4194
}latitude must be between -90 and 90, and longitude must be between -180 and 180.
Adding more tools
Add each tool’s implementation to its own module under src/, then register it in src/index.ts. Rebuild the project after making changes:
npm run buildUpdate the current tools section above when adding or changing tool inputs. The VS Code MCP configuration does not need to change unless the server entry point or launch command changes.
Development
After changing files in src/, rebuild the server:
npm run buildThe upstream weather data comes from api.weather.gov. Network access is required when a tool is called. The project does not currently include automated tests; npm test is the placeholder npm script.
Project structure
src/
index.ts MCP server setup and tool registration
weather.ts Current weather tool implementations
build/ Compiled JavaScript outputThis server cannot be deployed
Maintenance
Related MCP Connectors
Hosted MCP server for Xweather weather data: conditions, forecasts, alerts, and more.
OpenWeather MCP — wraps the OpenWeatherMap API (openweathermap.org)
Visual Crossing Weather MCP — wraps the Visual Crossing Weather Timeline API
WeatherAPI.com MCP — wraps WeatherAPI.com (api.weatherapi.com)
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides weather information tools based on the National Weather Service APIs through an SSE-based MCP server that can run as a standalone process or Docker container.-
- AlicenseNot gradedqualityDmaintenanceProvides weather forecasts and active alerts for US locations using the National Weather Service API. It supports both local stdio and remote HTTP/SSE transport modes for flexible integration with MCP clients.56 npmGPL 3.0
- FlicenseAqualityDmaintenanceProvides weather alerts and forecasts via MCP tools, supporting both STDIO and SSE transports.2-
- 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-