MCP.so
登录

Exemplo de Servidor MCP Server

@renanpk

基本信息

分类

其他

传输方式

stdio

作者

renanpk

关于 Exemplo de Servidor MCP Server

暂无概览

Exemplo de Servidor MCP Server 配置

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

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

Exemplo de Servidor MCP Server 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

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

概览

What is Exemplo de Servidor MCP?

Exemplo de Servidor MCP is an educational implementation of a Model Context Protocol server built with Node.js/TypeScript. It provides two weather information tools using the US National Weather Service (NWS) API, and is designed for learning MCP server development.

How to use Exemplo de Servidor MCP?

Clone the repository, run npm install, then npm run build. Execute the server with node build/main.js or link it as a binary via npm link and run weather. The server communicates over stdio and waits for MCP requests.

Key features of Exemplo de Servidor MCP

  • Two weather tools: get-alerts and get-forecast
  • Input validation using Zod
  • Integration with the US National Weather Service API
  • Communication via stdio using the MCP SDK
  • Layered architecture inspired by Domain-Driven Design

Use cases of Exemplo de Servidor MCP

  • Learning how to build an MCP server from scratch
  • Fetching active weather alerts for a US state
  • Obtaining weather forecasts for given geographic coordinates
  • Demonstrating layered architecture (domain, infrastructure, application, interface)
  • Practicing data validation and external API integration with MCP

常见问题

1

What tools does Exemplo de Servidor MCP provide?

It provides two tools: `get-alerts` (returns active weather alerts for a US state by two-letter code) and `get-forecast` (returns weather forecast for given latitude/longitude).

2

How do I install and run Exemplo de Servidor MCP?

Clone the repository, run `npm install`, then `npm run build`. Start the server with `node build/main.js`. Optionally, use `npm link` to run it as the `weather` command.

3

What dependencies does Exemplo de Servidor MCP require?

The server uses Node.js, the `@modelcontextprotocol/sdk` for MCP communication, and Zod for input validation. External API calls are made via the built-in `fetch` function.

4

What architecture does Exemplo de Servidor MCP follow?

It follows a Domain-Driven Design layered architecture with separate folders for domain models, infrastructure services (NWS API calls), application logic (WeatherService), interface controllers (tool registration and validation), and a main entry point.

5

How does Exemplo de Servidor MCP communicate?

It communicates over stdio (standard input/output) using the MCP protocol. The server listens for requests on stdin and writes responses to stdout.

评论

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