Sample MCP Server

Este projeto demonstra como construir um servidor MCP com integração a APIs externas e validação de dados.

Local serverstdioTypeScript

What is the Sample MCP server?

Connect Sample to Claude, Cursor or any other MCP client and it stops being a tab you switch to. Este projeto demonstra como construir um servidor MCP com integração a APIs externas e validação de dados. The sample mcp server is what makes that connection.

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • get-alerts — Retorna alertas meteorológicos ativos para um estado (código de duas letras, ex: CA, NY)
  • get-forecast — Retorna a previsão do tempo para coordenadas geográficas (latitude, longitude)

Installation

Installation goes through your MCP client rather than a global install: point it at npm on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.

Where it fits

This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Sample's toolset — get-alerts, get-forecast — is a fair guide to whether it matches your workflow. It is maintained by williammian; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against Sample's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Worth knowing first

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
get-alertsRetorna alertas meteorológicos ativos para um estado (código de duas letras, ex: CA, NY).
get-forecastRetorna a previsão do tempo para coordenadas geográficas (latitude, longitude).

How to install the Sample MCP server

{
  "mcpServers": {
    "server-sample": {
      "command": "npx",
      "args": ["-y", "npm"]
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Example prompts to try

  • Use Sample to get-alerts.
  • Use Sample to get-forecast.

Frequently asked questions

It connects Sample to MCP-compatible AI assistants such as Claude and Cursor, exposing 2 tools (get-alerts, get-forecast) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Sample directly.