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 "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
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
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- Flicense-qualityDmaintenanceA 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.Last updated26
- Alicense-qualityBmaintenanceA starter template for building remote Model Context Protocol servers using TypeScript, providing modern tooling and best practices while leveraging the MCP TypeScript SDK.Last updated54MIT
- Flicense-qualityDmaintenanceA 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.Last updated98
- FlicenseBqualityCmaintenanceA TypeScript MCP server boilerplate providing example tools and resources for rapid development of custom Model Context Protocol servers.Last updated8
Related MCP Connectors
MCP (Model Context Protocol) server for Appwrite
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…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/YunYouJun/starter-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server