Skip to main content
Glama

basic-mcp

Сервер MCP (Model Context Protocol) с интерфейсом на React, предоставляющий инструменты и ресурсы для работы с пользователями GitHub и данными о погоде.

Структура проекта

basic-mcp/
├── server/          # Serveur MCP (Node.js / TypeScript)
│   ├── main.ts      # Point d'entrée — transport stdio
│   ├── server-http.ts # Point d'entrée — transport HTTP (Streamable HTTP)
│   └── src/
│       ├── application/   # Cas d'usage (GetGitHubUser, GetWeather)
│       ├── domain/        # Entités et ports (interfaces)
│       ├── infrastructure/ # Implémentations des repositories
│       └── interface/mcp/ # Outils et ressources MCP exposés
└── client/          # Interface React + Vite
    └── src/
        ├── application/hooks/  # useMcpTool, useMcpResource
        ├── domain/             # Entités côté client
        ├── infrastructure/mcp/ # Adaptateur MCP client
        └── presentation/       # Composants React

Related MCP server: Weather MCP

Предварительные требования

  • Node.js >= 18

  • npm >= 9

Установка

npm install
cd client && npm install

Запуск

Только сервер (stdio)

npm run start

HTTP-сервер (порт 3001)

npm run start:http

HTTP-сервер + интерфейс React

npm run start:ui

Интерфейс доступен по адресу http://localhost:5173. HTTP-сервер MCP работает на http://localhost:3001/mcp.

Доступные инструменты MCP

Инструмент

Описание

ping

Проверка отклика сервера

get-github-user

Возвращает информацию о пользователе GitHub

get-weather

Возвращает погоду для заданных широты/долготы

Доступные ресурсы MCP

URI

Описание

github-user://{username}

Профиль пользователя GitHub

weather://{lat},{lon}

Погода для заданных GPS-координат

Архитектура

Проект следует принципам чистой архитектуры (Clean Architecture):

  • Domain — сущности и интерфейсы портов (без внешних зависимостей)

  • Application — варианты использования, управляющие бизнес-логикой

  • Infrastructure — HTTP-запросы к внешним API (GitHub, Open-Meteo)

  • Interface — предоставление доступа через протокол MCP

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A Node.js/TypeScript server implementing the Model Context Protocol that provides integrations with GitHub and Notion, allowing automated workflow between these platforms via API endpoints.
    1,462 npm
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that enables natural language weather queries for global cities, integrating with OpenWeather API to provide real-time weather information in an easy-to-read format.
    1
    -
  • F
    license
    Not graded
    quality
    C
    maintenance
    A Model Context Protocol server that interfaces with OpenWeatherMap API to provide real-time weather information and forecasts for cities worldwide.
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that provides weather information using the Open-Meteo API, allowing users to get current weather for specific cities and retrieve weather data for date ranges.
    Apache 2.0