Skip to main content
Glama
YunYouJun

Starter MCP Server

by YunYouJun
index.ts981 B
import type { AlertFeature } from '../types' import { USER_AGENT } from '../constants' // Helper function for making NWS API requests export async function makeNWSRequest<T>(url: string): Promise<T | null> { const headers = { 'User-Agent': USER_AGENT, 'Accept': 'application/geo+json', } try { const response = await fetch(url, { headers }) if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`) } return (await response.json()) as T } catch (error) { console.error('Error making NWS request:', error) return null } } // Format alert data export function formatAlert(feature: AlertFeature): string { const props = feature.properties return [ `Event: ${props.event || 'Unknown'}`, `Area: ${props.areaDesc || 'Unknown'}`, `Severity: ${props.severity || 'Unknown'}`, `Status: ${props.status || 'Unknown'}`, `Headline: ${props.headline || 'No headline'}`, '---', ].join('\n') }

Implementation Reference

Latest Blog Posts

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