Skip to main content
Glama
mcp-ping-server-giulia-ai

mcp-ping-server-giulia-ai

by wganalytics

PRJ-01 — Ping Server (MCP nível "super easy")

Servidor MCP (FastMCP, transporte stdio) — o exemplo introdutório do Capítulo 2 do livro Model Context Protocol (Sandeco), aqui com uma tool de utilidade real.

🏗️ Arquitetura do Servidor

Diagrama MCP Ping Server

Related MCP server: Echo MCP Server

Tools

Tool

O que faz

ping

Health-check do próprio servidor — retorna pong.

echo(mensagem)

Devolve exatamente a mensagem (teste de transporte).

check_host(host, port=443, timeout=3.0)

Health-check TCP real: abre conexão e mede a latência (ms).

Uso

uv sync
uv run python src/ping_server.py     # ou: uv run python src/main.py

Registre no Claude Desktop apontando para src/ping_server.py (transporte stdio). Exemplo de uso da tool real: check_host("1.1.1.1", 443) → UP 1.1.1.1:443 — 12.3 ms.

Sem segredos externos.

Testes

uv run pytest        # 12 testes

check_host é exercitado contra um socket TCP local em porta efêmera — nada sai da máquina.

Available Tools

3 tools
check_hostA

Faz um health-check TCP REAL de um host:porta e mede a latência.

Abre uma conexão TCP de verdade e retorna se a porta está acessível e o tempo de resposta em milissegundos.

Inputs: host (required), port, timeout. Returns: result

echoA

Devolve exatamente a mensagem recebida (útil para testar o transporte).

Inputs: mensagem (required). Returns: result

pingA

Health-check do próprio servidor MCP. Retorna 'pong' se estiver vivo.

Inputs: no named parameters. Returns: result

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: ping checks the MCP server itself, echo validates the transport layer, and check_host tests real TCP reachability to a host and port. There is no meaningful overlap or ambiguity.

    Naming Consistency4/5

    The names are all lowercase, short, and readable. ping and echo follow a command-line utility style while check_host uses a verb_noun pattern, so there is a slight stylistic deviation but no conflicting conventions.

    Tool Count5/5

    Three tools is a well-scoped set for a small ping and connectivity server. Each tool earns its place and the count is neither too thin nor bloated.

    Completeness5/5

    The set covers the apparent domain: MCP server health checking, transport testing, and real TCP connectivity checks with latency measurement. There are no obvious missing operations that would prevent an agent from accomplishing the intended tasks.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      A simple demonstration MCP server that provides an echo tool and resource for learning how to build MCP servers. Serves as a starting point and template for creating custom MCP server implementations.
      1
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that allows users to ping other hosts to check network connectivity and diagnostic information. It enables LLMs to perform network latency tests and host availability checks through a standardized interface.
      MIT

    Appeared in Searches