Starter MCP Server
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 "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., "@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
Related MCP server: MCP TypeScript Template
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
Available Tools
2 toolsget-alertsWeather alertsC
Get weather alerts for a state
| Name | Required | Description | Default |
|---|---|---|---|
| state | Yes | Two-letter state code (e.g. CA, NY) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'Get weather alerts,' which implies a read-only operation, but does not disclose any behavioral traits such as rate limits, authentication needs, error handling, or what the alerts include (e.g., severity, types). This is a significant gap for a tool with no annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence: 'Get weather alerts for a state.' It is front-loaded with the core purpose, has zero waste, and is appropriately sized for the tool's simplicity. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of annotations and output schema, the description is incomplete. It does not explain what the tool returns (e.g., alert details, format), potential errors, or usage constraints. For a tool with no structured behavioral data, the description should provide more context to aid the agent effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, with the 'state' parameter fully documented in the schema. The description does not add any meaning beyond what the schema provides, as it only mentions 'for a state' without detailing the parameter. Given the high schema coverage, the baseline score of 3 is appropriate, as the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Get weather alerts for a state.' It specifies the verb ('Get') and resource ('weather alerts'), and includes a scope ('for a state'). However, it does not explicitly differentiate from its sibling tool 'get-forecast,' which likely provides different weather data, so it misses full sibling differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It does not mention the sibling tool 'get-forecast' or any other tools, nor does it specify contexts, prerequisites, or exclusions for usage. This leaves the agent without clear direction on tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get-forecastWeather forecastC
Get weather forecast for a location
| Name | Required | Description | Default |
|---|---|---|---|
| latitude | Yes | Latitude of the location | |
| longitude | Yes | Longitude of the location |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'Get[s] weather forecast' but doesn't elaborate on what the forecast includes (e.g., temperature, precipitation), time range, data source, rate limits, error handling, or authentication needs. This leaves significant gaps in understanding the tool's behavior beyond the basic action.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence: 'Get weather forecast for a location.' It is front-loaded with the core purpose, has zero wasted words, and is appropriately sized for a simple tool. Every part of the sentence contributes directly to understanding the tool's function.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (weather forecasting with geographic parameters) and the absence of annotations and output schema, the description is incomplete. It doesn't explain what the forecast returns (e.g., data format, time periods), potential limitations, or how to interpret results. For a tool with no structured output information, more descriptive context is needed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, with both parameters (latitude and longitude) fully documented in the input schema. The description doesn't add any parameter-specific details beyond what the schema provides, such as format examples or usage tips. However, since the schema covers all parameters adequately, the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Get weather forecast for a location' specifies the verb ('Get') and resource ('weather forecast') with the target ('location'). It distinguishes from the sibling tool 'get-alerts' by focusing on forecasts rather than alerts, though the distinction isn't explicitly stated. The purpose is specific and actionable.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention the sibling tool 'get-alerts' or any other tools, nor does it specify prerequisites, constraints, or typical use cases. Without such context, the agent must infer usage based solely on the tool name and description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
- First observed
get-alerts - First observed
get-forecast
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: one retrieves weather alerts for a state, and the other retrieves weather forecasts for a location. There is no overlap in functionality, making it easy for an agent to select the correct tool based on the need.
Both tools follow a consistent verb_noun pattern with 'get' as the verb, but they use kebab-case (get-alerts, get-forecast) instead of the more common snake_case. This minor deviation is still readable and predictable, though not perfectly aligned with typical conventions.
With only 2 tools, the server feels thin for a weather domain that could include more operations like historical data, radar images, or air quality. While it covers basic alerts and forecasts, the scope is limited and may not support comprehensive agent workflows.
The tool set is severely incomplete for a weather server, lacking essential operations such as current conditions, historical data, or multi-day forecasts. Agents will face dead ends when trying to perform common weather-related tasks beyond the two provided tools.
Maintenance
Related MCP Connectors
A simple Typescript MCP server built using the official MCP Typescript SDK and smithery/cli. Thisβ¦
A TypeScript MCP server for Home Assistant, enabling programmatic management of entities, automatiβ¦
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yoβ¦
Primarily to be used as a template repository for developing MCP servers with FastMCP in Python, Pβ¦
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA template repository for building Model Context Protocol (MCP) servers with TypeScript, featuring full TypeScript support, testing setup, CI/CD pipelines, and modular architecture for easy extension.7 npm-
- AlicenseNot gradedqualityAmaintenanceA starter template for building remote Model Context Protocol servers using TypeScript, providing modern tooling and best practices while leveraging the MCP TypeScript SDK.56MIT
- FlicenseNot gradedqualityDmaintenanceA template project for quickly building Model Context Protocol (MCP) servers using TypeScript and the official SDK. It includes pre-configured examples for tools and resources to help developers jumpstart their custom MCP server development.25 npm-
- FlicenseBqualityDmaintenanceA TypeScript MCP server boilerplate providing example tools and resources for rapid development of custom Model Context Protocol servers.8-