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

Available Tools

9 tools
ask-documentA

Answers any question about your course document using GPT-4o. Perfect for PMP exam preparation: ask about concepts, processes, differences between approaches, etc. Requires the index to be built first with extract-document-index.

Inputs: question (required), chapter, document, pmpFocus.

extract-document-indexA

Extracts text from documents in chapter subfolders and saves the index to output/{name}/document-index.json. Supported formats: .png .jpg .jpeg .bmp .tiff .webp — .pdf — .docx .doc — .txt .md .csv. For images: uses Tesseract OCR with Sharp preprocessing (local, offline). For PDF (native text): uses pdf-parse (no binary required). For Word (.docx): uses mammoth (no binary required). For plain text (.txt, .md): reads directly. Run once before using ask-document or generate-quiz. Skips already-indexed files unless force=true.

Inputs: name, force, basePath, chapters.

generate-document-pdfA

Generates a complete PDF from chapter image folders. Mode 'images' (default): inserts original images full-page, faithful to the original layout. Mode 'text': Tesseract OCR text only. Mode 'images+text': each original image followed by its Tesseract OCR text. Mode 'vision': LLaVA (Ollama local) extracts text -- best quality for complex layouts, requires Ollama running with llava model.

Inputs: mode, chapters, language, outputFilename.

generate-quizA

Generates PMP-style multiple choice questions (MCQ) from a chapter of your course. Questions follow the PMI exam format: situational, 4 options, one best answer with explanation. Requires the index to be built first with extract-document-index.

Inputs: chapter (required), count, domain, document.

get-github-userC

Fetches public profile information for a GitHub user

Inputs: username (required).

get-weatherB

Get current weather conditions for a location. Provide either a city name OR latitude+longitude coordinates.

Inputs: city, latitude, longitude.

list-documentsA

Lists all documents that have been indexed and are available for study. Returns the document names to use in the 'document' parameter of ask-document and generate-quiz.

Inputs: no named parameters.

ping-serverC

A simple tool that echoes back the input

Inputs: message (required).

read-log-fileB

Read the contents of a log file from the server's logs directory. Optionally return only the last N lines.

Inputs: filename (required), lastLines.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 9 tools

    Disambiguation4/5

    The tools cover clearly different resources: a ping/health check, GitHub user lookup, weather, log reading, and a document-processing pipeline. The document cluster (list-documents, extract-document-index, ask-document, generate-quiz, generate-document-pdf) is the only area of partial overlap, but each has a distinct action and the descriptions clarify dependencies between them.

    Naming Consistency5/5

    Every tool follows a consistent kebab-case verb_noun pattern (get-github-user, read-log-file, list-documents, extract-document-index, ask-document, generate-quiz). No mixing of conventions, casing styles, or vague verbs.

    Tool Count4/5

    Nine tools is a reasonable, well-scoped count. However, the server spans several unrelated domains (ping, github, weather, logs, document pipeline), which makes the overall bundle feel like a grab-bag rather than a tightly scoped server.

    Completeness3/5

    The document pipeline is fairly complete (list, index, query, quiz, PDF generation), but other domains are shallow: GitHub only supports user lookup with no repos/search, and logs only support reading with no listing or tailing helpers. The heterogeneous scope means no single domain is fully covered.

    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.
      ISC
    • 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