Utility MCP Server
Provides testing framework configuration for the MCP server, enabling comprehensive unit testing of utility tools, resources, and prompts through the included jest.config.js file.
Supports API interaction and testing through JSON-RPC 2.0 message formats, allowing users to call tools, access resources, and retrieve prompts using Postman or similar HTTP clients when exposed via appropriate transport layers.
Provides TypeScript-based development environment for building and extending the MCP server, enabling type-safe implementation of tools, resources, and prompts with modern TypeScript configuration.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Utility MCP Servercalculate 15 times 7"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Utility MCP Server
A fully featured Model Context Protocol (MCP) server providing utility tools, resources, and prompts. Built with TypeScript and the modern MCP SDK.
π Project Structure
The project is organized for scalability and readability:
.
βββ 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π Features
1. Tools
random_number: Generates a random integer within a specified range.calculator: Performs basic arithmetic (add,subtract,multiply,divide).suggest_arithmetic_task: Demonstrates LLM Sampling by requesting the client/LLM to generate a creative math problem.
2. Resources
system_status(utility://system/status): Provides a real-time status update of the server's health and feature count.
3. Prompts
math_tutor: A template that guides the LLM to act as a math teacher, optionally focusing on a specific topic.
π‘ Calling the API (Postman / JSON-RPC)
Model Context Protocol uses JSON-RPC 2.0. While this server currently runs over stdio (standard input/output), you can interact with it using these message formats if you expose it via an HTTP/SSE bridge or use a debugger.
π Tools
List Tools
Request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Call calculator
Request:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "calculator",
"arguments": {
"operation": "multiply",
"a": 5,
"b": 10
}
}
}π Resources
List Resources
Request:
{
"jsonrpc": "2.0",
"id": 3,
"method": "resources/list"
}Read system_status
Request:
{
"jsonrpc": "2.0",
"id": 4,
"method": "resources/read",
"params": {
"uri": "utility://system/status"
}
}π Prompts
List Prompts
Request:
{
"jsonrpc": "2.0",
"id": 5,
"method": "prompts/list"
}Get math_tutor Prompt
Request:
{
"jsonrpc": "2.0",
"id": 6,
"method": "prompts/get",
"params": {
"name": "math_tutor",
"arguments": {
"topic": "algebra"
}
}
}π Development
Setup
npm installRunning the Server
npm startRunning Tests
npm testπ€ Using the Custom Client
We've included a built-in client example so you can see how to connect programmatically:
npm run clientThis script will:
Spawn the server as a child process.
Connect via Stdio.
Automatically demonstrate listing tools, calling the calculator, and reading resources.
π Testing with MCP Inspector
To interact with the server visually:
npx @modelcontextprotocol/inspector npx tsx index.tsThis server uses theStdio Transport. It communicates via stdin and stdout. For Postman to work via HTTP, an SSE (Server-Sent Events) transport layer would need to be added to the server configuration.
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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