Utility MCP Server
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 configurationRelated 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 installServer ausführen
npm startTests 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 clientDieses Skript wird:
Den Server als untergeordneten Prozess starten.
Über Stdio verbinden.
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
stdinundstdout. Damit Postman über HTTP funktioniert, müsste eine SSE-Transportschicht (Server-Sent Events) zur Serverkonfiguration hinzugefügt werden.
This server cannot be installed
Maintenance
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
- Flicense-qualityDmaintenanceA 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-maintenanceA 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
- Alicense-qualityDmaintenanceA 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,188MIT
- Flicense-qualityCmaintenanceA calculator-focused MCP server with TypeScript and Zod validation, providing tools, resources, and prompts for basic arithmetic operations.
Related MCP Connectors
This MCP server enables users to perform scientific computations regarding linear algebra and vect…
Educational MCP server with 17 math/stats tools, visualizations, and persistent workspace
A TypeScript MCP server for Home Assistant, enabling programmatic management of entities, automati…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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