Skip to main content
Glama
minimind-org

MCP Server TypeScript Template

by minimind-org
README.md
# MCP Server TypeScript Template

A template for creating Model Context Protocol (MCP) servers using TypeScript. This project demonstrates how to implement a simple MCP server with custom tools.

## Overview

This template implements a basic MCP server that provides tools for:
- Example operation: A simple demonstration operation
- Addition: A tool that adds two numbers

The server uses the Model Context Protocol SDK to handle communication between AI models and external tools.

## Prerequisites

- Node.js (v16 or higher)
- npm or yarn

## Project Structure
The project is structured as follows:  
```
mcp-server-typescript-template/
├── common/
│   ├── constant.ts     # Project constants
│   ├── errors.ts       # Error handling utilities
│   └── types.ts        # Type definitions
│   └── utils.ts        # Utility functions

├── operations/
│   └── example-operation.ts  # Implementation of example operations
├── index.ts            # Main server implementation
├── package.json
└── tsconfig.json
```
## Installation

Clone the repository and install dependencies:

```bash
git clone <repository-url>
cd mcp-server-typescript-template
npm install
npm run test
npm run build
npm run start # this will start the server for testing
```

## Configuration MCP Client (Claude Desktop)
edit your `claude_desktop_config.json` file to add the following:
```json
{
  "mcpServers": {
    "example": {
      "command": "node",
      "args": [
        "/path/to/mcp-server-typescript-template/dist/index.js"
      ]
    }
  }
}

```

TDQS

C2.2/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clearly distinct purposes: 'addition' performs a mathematical operation on two numbers, while 'example_operation' appears to be a generic demonstration tool. There is no overlap or ambiguity between them, making it easy for an agent to select the correct tool based on the task.

Naming Consistency3/5

The naming is mixed: 'addition' uses a noun form, while 'example_operation' uses a noun_verb pattern. This inconsistency in verb usage and structure makes the set less predictable, though both names are still readable and descriptive.

Tool Count2/5

With only two tools, this server feels thin and under-scoped for a general-purpose TypeScript template. Such a template typically implies broader utility or demonstration capabilities, making this count insufficient for meaningful agent interactions or coverage of a domain.

Completeness2/5

The tool surface is severely incomplete for a TypeScript template server, which might be expected to include more operations like file handling, API interactions, or common utilities. The two tools provided do not cover any coherent domain or lifecycle, leaving significant gaps for agent workflows.

Maintenance

ActivityInactive
ResponsivenessNo issues