Skip to main content
Glama
Esaban17

mcp-first-server

by Esaban17

mcp-first-server

Primer servidor MCP (Model Context Protocol) en TypeScript, siguiendo la actividad First Server del MCP Workshop.

Expone dos capacidades sobre transporte stdio:

Tipo

Nombre

Descripción

Tool

add

Suma dos números (a, b) y devuelve el resultado como texto

Resource

greeting://{name}

Devuelve Hello, {name}!

Requisitos

  • Node.js 18+ (probado con v25)

  • npm

Related MCP server: Python MCP Server

Instalación

npm install
npm run build

Probarlo con el Inspector

npm run inspector

Abre la interfaz web del MCP Inspector, donde puedes listar y ejecutar la tool add y leer el resource greeting://{name}.

Probarlo desde la terminal

Sin inspector, hablando JSON-RPC directo por stdio:

printf '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"t","version":"0"}}}\n{"jsonrpc":"2.0","method":"notifications/initialized"}\n{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"add","arguments":{"a":2,"b":3}}}\n{"jsonrpc":"2.0","id":3,"method":"resources/read","params":{"uri":"greeting://Mundo"}}\n' | node build/index.js

Salida esperada (entre otras líneas):

{"result":{"content":[{"type":"text","text":"5"}]},"jsonrpc":"2.0","id":2}
{"result":{"contents":[{"uri":"greeting://Mundo","text":"Hello, Mundo!"}]},"jsonrpc":"2.0","id":3}

Conectarlo a un cliente MCP

Ejemplo de configuración (Claude Desktop, VS Code, etc.):

{
  "mcpServers": {
    "demo": {
      "command": "node",
      "args": ["/ruta/absoluta/a/mcp-first-server/build/index.js"]
    }
  }
}

Estructura

src/index.ts     código del servidor
tsconfig.json    compila src/ -> build/
build/           salida compilada (no versionada)

Available Tools

1 tool
addD
ParametersJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 1 tool updatev1.0.0
    • First observedadd

TDQS

D1.6/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no risk of confusing it with another tool. The tool is uniquely identifiable even without a description.

Naming Consistency5/5

A single tool named 'add' introduces no naming conflicts or mixed conventions. Consistency is trivially maintained.

Tool Count1/5

A server exposing exactly one tool with no description is an extreme mismatch—there is no meaningful tool surface to serve a coherent purpose.

Completeness1/5

The tool 'add' without a description or supporting tools provides no discernible domain coverage. The surface is severely incomplete and effectively useless for real tasks.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Demonstrates core MCP server functionality with basic arithmetic operations (addition and subtraction) and personalized greeting generation. Serves as an educational template implementing example tools and dynamic resources for MCP server development with Python.
    -
  • F
    license
    Not graded
    quality
    C
    maintenance
    Exposes basic arithmetic and greeting tools, a queue status resource, and a queue analysis prompt, demonstrating MCP server-client interaction over stdio.
    -
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables arithmetic addition, personalized greetings, version lookup, and text summarization through MCP tools, a resource, and a prompt.
    -
  • A
    license
    B
    quality
    C
    maintenance
    Enables arithmetic operations, mock weather lookups, and in-memory note management with tools, a resource, and a summarization prompt over stdio.
    4
    32 npm
    MIT