MCP.so
ログイン

Exemplo de Servidor MCP

@renanpk

Exemplo de Servidor MCP について

概要はまだありません

基本情報

カテゴリ

その他

ランタイム

node

トランスポート

stdio

公開者

renanpk

設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

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

ツール

ツールは検出されませんでした

ツールは 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

FAQ from Exemplo de Servidor MCP

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).

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.

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.

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.

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.

コメント

「その他」の他のコンテンツ