Skip to main content
Glama
panchocorderos

Weather MCP Server

mcp-poc

Proyecto de prueba de concepto (POC) para un servidor MCP (Model Context Protocol) usando TypeScript y el SDK oficial.

Descripción

Este proyecto implementa un servidor MCP sencillo que expone una herramienta para obtener el clima actual de una ciudad utilizando la API de Open-Meteo. El servidor se comunica a través de stdin/stdout, lo que lo hace ideal para integraciones o pruebas automatizadas.

Related MCP server: mcp-poc

Requisitos

  • Node.js (recomendado v18+)

  • pnpm (o npm/yarn)

Instalación

pnpm install
# o
npm install
# o
yarn install

Uso

Para iniciar el servidor:

pnpm start
# o
node main.ts

El servidor expondrá una herramienta llamada get-weather que recibe el nombre de una ciudad y retorna información meteorológica actual.

Dependencias principales

  • @modelcontextprotocol/sdk: SDK oficial para implementar servidores MCP.

  • zod: Validación de esquemas para los parámetros de las herramientas.

Estructura principal

  • main.ts: Implementación del servidor MCP y la herramienta de clima.

  • .gitignore: Configuración para ignorar archivos y carpetas comunes en proyectos Node.js.

Para poder probar el servidor MCP con el inspector, se puede usar el siguiente comando:

npx @modelcontextprotocol/inspector npx -y tsx main.ts

Para agregar el mcp dentro del IDE, hay que seguir el siguiente formato json:

{
  "mcpServers": {
    "demo":{
      "command": "npx",
      "args": [
        "-y",
        "tsx",
        "<path_to>/mcp-poc/main.ts"
      ]
    }
  }
}

Available Tools

1 tool
get-weatherC

Tool to fetch the weather for a given city

ParametersJSON Schema
NameRequiredDescriptionDefault
cityYesCity name

TDQS

C2.9/5.0
Behavior2/5

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 mentions 'fetch the weather' but fails to describe key traits like whether this is a read-only operation, potential rate limits, error handling, data freshness, or authentication needs. For a tool with no annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's function without unnecessary words. It is front-loaded with the core purpose and appropriately sized for a simple tool, making it easy for an agent to parse quickly. Every part of the sentence earns its place by conveying essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (one parameter, no output schema, no annotations), the description is incomplete. It lacks details on behavioral aspects like error cases, return format, or usage context, which are crucial for an agent to invoke it correctly. While concise, it doesn't provide enough information to fully understand the tool's operation and limitations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the single parameter 'city' documented as 'City name.' The description adds no additional meaning beyond this, such as format examples (e.g., 'New York' vs. 'NYC') or constraints. Given the high schema coverage, the baseline score of 3 is appropriate, as the schema does the heavy lifting without extra value from the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as 'fetch the weather for a given city,' which includes a specific verb ('fetch') and resource ('weather') with a clear target ('city'). It's not a tautology and communicates the basic function effectively. However, with no sibling tools mentioned, there's no opportunity to distinguish from alternatives, preventing a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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, prerequisites, or contextual constraints. It merely states what the tool does without indicating scenarios for its application or any limitations, such as geographic availability or data sources. This lack of usage context leaves the agent without operational direction.

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.

  1. 1 tool update
    • First observedget-weather

TDQS

B3.1/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of confusion or overlap between tools. The tool's purpose is clearly defined and distinct by default.

Naming Consistency5/5

A single tool inherently has consistent naming, as there are no other tools to compare it against. The name 'get-weather' follows a clear verb-noun pattern.

Tool Count2/5

A single tool is too few for a weather server's typical scope, which might include forecasts, historical data, or multiple locations. This feels thin and limits functionality.

Completeness2/5

The tool surface is severely incomplete for a weather domain. It only fetches current weather for a city, missing essential operations like forecasts, alerts, or multi-location queries, which will cause agent failures.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    A
    quality
    D
    maintenance
    Lightweight MCP server that exposes tools for system information and weather lookup, designed for agent integration via stdio.
    1
    -
  • F
    license
    Not graded
    quality
    C
    maintenance
    A proof-of-concept MCP server that provides weather information using the Open-Meteo API, with tools for greeting, getting weather by coordinates, and by location name.
    -
  • A
    license
    A
    quality
    B
    maintenance
    MCP server that provides current weather for any city using Open-Meteo APIs. It exposes a single tool 'get_weather' returning temperature, humidity, wind, and other weather data.
    1
    7 npm
    MIT
  • F
    license
    Not graded
    quality
    B
    maintenance
    A minimal MCP server that provides current weather and forecasts for any city using the free Open-Meteo API, no API key required.
    9 npm
    -