This server provides weather information powered by the National Weather Service (NWS) API, functioning as both an MCP server and a CLI tool.
Get Weather Alerts (
get-alerts): Retrieve active weather alerts for a US state using a two-letter state code (e.g.,CA,NY)Get Weather Forecast (
get-forecast): Retrieve a weather forecast for a specific location using latitude (−90 to 90) and longitude (−180 to 180) coordinatesDual operation modes: Run as a standalone CLI tool or integrate with MCP clients like Claude Desktop
Extensible architecture: Easily add new tools by following the existing project structure
Click on "Install 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., "@Starter MCP Servershow me how to configure the server in mcp.json"
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.
starter-mcp-server
A modern MCP (Model Context Protocol) server starter template with CLI support.
Features
🚀 Dual Mode: Works as both MCP server and CLI tool
🔧 Built-in Tools: Weather alerts and forecasts (NWS API)
♻️ Code Reuse: Shared business logic between MCP and CLI
📦 Type Safe: Full TypeScript support
✅ Tested: Comprehensive test coverage
🎯 Simple: Minimal architecture, easy to extend
Quick Start
# Install dependencies
pnpm install
# Build the project
pnpm build
# Run as MCP server (default)
node dist/cli.mjs
# Or use CLI commands
node dist/cli.mjs get-alerts CA
node dist/cli.mjs get-forecast 39.7456 -97.0892
# Quick start with npm scripts
pnpm cli:help # Show help
pnpm cli:alerts # Example: Get CA alerts
pnpm cli:forecast # Example: Get forecast
pnpm demo # Run full demoCLI Usage
# Start MCP server (no arguments)
node dist/cli.mjs
# Get weather alerts for a state
node dist/cli.mjs get-alerts CA
# Get weather forecast for a location
node dist/cli.mjs get-forecast 39.7456 -97.0892
# Show help
node dist/cli.mjs --helpFor detailed CLI documentation, see CLI_USAGE.md.
MCP Server Configuration
Add to your MCP client configuration (e.g., Claude Desktop):
{
"mcpServers": {
"weather": {
"command": "node",
"args": ["/ABSOLUTE/PATH/TO/starter-mcp-server/dist/index.mjs"]
}
}
}Or use via npx:
{
"mcpServers": {
"weather": {
"command": "npx",
"args": ["-y", "starter-mcp-server@latest"]
}
}
}Development
# Run tests
pnpm test
# Type check
pnpm typecheck
# Lint
pnpm lint
# Debug with MCP Inspector
pnpx @modelcontextprotocol/inspector node dist/index.mjsProject Structure
src/
├── lib/
│ └── weather.ts # Core business logic
├── tools/
│ ├── get-alerts.ts # MCP tool registration
│ └── get-forecast.ts
├── cli.ts # CLI entry point
├── server.ts # MCP Server instance
└── index.ts # MCP Server entry pointAdding New Tools
See CLI_USAGE.md for detailed instructions.
Quick overview:
Add business logic in
src/lib/Register MCP tool in
src/tools/Add CLI command in
src/cli.ts(optional)Update
src/index.tsto register the tool
Architecture Analysis
For a detailed analysis of the project architecture and design decisions, see ARCHITECTURE_ANALYSIS.md.
Release
# First release
pnpm publish
# Future releases
pnpm run releaseReferences
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.