Skip to main content
Glama

Utility MCP-Server

Ein voll ausgestatteter Model Context Protocol (MCP)-Server, der Hilfsprogramme, Ressourcen und Prompts bereitstellt. Erstellt mit TypeScript und dem modernen MCP SDK.

📁 Projektstruktur

Das Projekt ist auf Skalierbarkeit und Lesbarkeit ausgelegt:

.
├── index.ts              # Entry point: Initializes server and registers modules
├── src/
│   ├── tools.ts          # Tool handlers (Arithmetic, Randomness, Sampling)
│   ├── prompts.ts        # Prompt templates (Math Tutoring)
│   └── resources.ts      # Resource definitions (System Status)
├── tests/
│   └── utility.test.ts   # Comprehensive unit tests
├── package.json          # Dependencies and scripts
├── tsconfig.json         # TypeScript configuration
└── jest.config.js        # Testing configuration

Related MCP server: MCP Server TypeScript

🚀 Funktionen

1. Tools

  • random_number: Generiert eine Zufallszahl innerhalb eines angegebenen Bereichs.

  • calculator: Führt grundlegende Arithmetik durch (add, subtract, multiply, divide).

  • suggest_arithmetic_task: Demonstriert LLM Sampling, indem der Client/das LLM aufgefordert wird, eine kreative Matheaufgabe zu generieren.

2. Ressourcen

  • system_status (utility://system/status): Bietet ein Echtzeit-Status-Update über den Zustand des Servers und die Anzahl der Funktionen.

3. Prompts

  • math_tutor: Eine Vorlage, die das LLM anleitet, als Mathematiklehrer zu fungieren, optional mit Fokus auf ein bestimmtes Thema.


📡 Aufrufen der API (Postman / JSON-RPC)

Das Model Context Protocol verwendet JSON-RPC 2.0. Während dieser Server derzeit über stdio (Standardeingabe/-ausgabe) läuft, können Sie mit ihm über diese Nachrichtenformate interagieren, wenn Sie ihn über eine HTTP/SSE-Brücke bereitstellen oder einen Debugger verwenden.

🛠 Tools

Tools auflisten

Anfrage:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/list"
}

calculator aufrufen

Anfrage:

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "calculator",
    "arguments": {
      "operation": "multiply",
      "a": 5,
      "b": 10
    }
  }
}

📖 Ressourcen

Ressourcen auflisten

Anfrage:

{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "resources/list"
}

system_status lesen

Anfrage:

{
  "jsonrpc": "2.0",
  "id": 4,
  "method": "resources/read",
  "params": {
    "uri": "utility://system/status"
  }
}

📝 Prompts

Prompts auflisten

Anfrage:

{
  "jsonrpc": "2.0",
  "id": 5,
  "method": "prompts/list"
}

math_tutor Prompt abrufen

Anfrage:

{
  "jsonrpc": "2.0",
  "id": 6,
  "method": "prompts/get",
  "params": {
    "name": "math_tutor",
    "arguments": {
      "topic": "algebra"
    }
  }
}

🛠 Entwicklung

Einrichtung

npm install

Server ausführen

npm start

Tests ausführen

npm test

🤖 Verwendung des benutzerdefinierten Clients

Wir haben ein integriertes Client-Beispiel beigefügt, damit Sie sehen können, wie man eine programmgesteuerte Verbindung herstellt:

npm run client

Dieses Skript wird:

  1. Den Server als untergeordneten Prozess starten.

  2. Über Stdio verbinden.

  3. Automatisch das Auflisten von Tools, das Aufrufen des Taschenrechners und das Lesen von Ressourcen demonstrieren.

🔍 Testen mit dem MCP Inspector

Um visuell mit dem Server zu interagieren:

npx @modelcontextprotocol/inspector npx tsx index.ts

[!IMPORTANT] Dieser Server verwendet den Stdio-Transport. Er kommuniziert über stdin und stdout. Damit Postman über HTTP funktioniert, müsste eine SSE-Transportschicht (Server-Sent Events) zur Serverkonfiguration hinzugefügt werden.

A
license - permissive license
-
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    -
    quality
    D
    maintenance
    A TypeScript MCP server implementation using Express.js that provides basic tools like echo, time retrieval, and calculator functionality. Features session management, RESTful API endpoints, and Server-Sent Events for streamable communication.
  • -
    license
    -
    quality
    -
    maintenance
    A production-ready TypeScript MCP server providing basic tools (add, echo, timestamp), resources (server info, greetings, data access), and prompt templates (analyze, code-review, summarize). Serves as a foundation for building custom MCP servers with extensible architecture.
    283
  • A
    license
    -
    quality
    D
    maintenance
    A lightweight TypeScript-based MCP server that demonstrates how to build custom MCP tools by implementing a simple addition calculator. Serves as a starting point for building MCP-compatible tools.
    1,188
    MIT
  • F
    license
    -
    quality
    C
    maintenance
    A calculator-focused MCP server with TypeScript and Zod validation, providing tools, resources, and prompts for basic arithmetic operations.

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lakshyakumar/typescript-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server