MCP.so
登录

Exemplo de Servidor MCP

@gabrielfroes

关于 Exemplo de Servidor MCP

Modelo de Servidor MCP baseado na documentação oficial

基本信息

分类

其他

运行时

node

传输方式

stdio

发布者

gabrielfroes

配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "mcp-server-sample": {
      "command": "node",
      "args": [
        "build/main.js"
      ]
    }
  }
}

工具

未检测到工具

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is Exemplo de Servidor MCP?

Exemplo de Servidor MCP is a sample implementation of a Model Context Protocol (MCP) server built with Node.js/TypeScript. It provides two tools for retrieving weather information from the US National Weather Service (NWS) API: get-alerts for active weather alerts by state code, and get-forecast for weather forecasts by geographic coordinates. This project is intended for educational purposes and demonstrates how to build an MCP server with external API integration and data validation.

How to use Exemplo de Servidor MCP?

Install by cloning the repository, running npm install and npm run build. After building, start the server with node build/main.js or, if linked as a binary, with weather. The server listens on stdio and accepts MCP requests.

Key features of Exemplo de Servidor MCP

  • Two weather tools: get-alerts and get-forecast
  • Input validation using Zod schemas
  • Integration with the National Weather Service API
  • Layered architecture inspired by Domain-Driven Design (DDD)
  • Communication via stdio using the MCP SDK
  • Written in TypeScript with compiled JavaScript output

Use cases of Exemplo de Servidor MCP

  • A weather‑focused AI assistant retrieving active alerts for a US state
  • A chatbot providing a forecast for given latitude/longitude coordinates
  • Educational demonstration of building an MCP server with external API integration
  • Testing MCP client-server interactions with a simple, functional example

FAQ from Exemplo de Servidor MCP

What does Exemplo de Servidor MCP do?

It is an MCP server that exposes two tools (get-alerts and get-forecast) to fetch weather alert and forecast data from the US National Weather Service API.

What are the dependencies and runtime requirements?

Node.js and npm are required. After installing dependencies with npm install, the server is built with npm run build and runs on Node.js.

How does the server communicate?

It uses stdio transport as defined by the MCP SDK (@modelcontextprotocol/sdk). The server reads requests from standard input and writes responses to standard output.

Does it require authentication?

No authentication is mentioned. The NWS API used does not require an API key for these endpoints.

Where does the weather data come from?

All weather data is fetched live from the public National Weather Service (NWS) API. No local data is stored or cached by the server.

评论

其他 分类下的更多 MCP 服务器