MCP Server TypeScript Template

by minimind-org

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:

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:

{ "mcpServers": { "example": { "command": "node", "args": [ "/path/to/mcp-server-typescript-template/dist/index.js" ] } } }
-
security - not tested
F
license - not found
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

A TypeScript template for creating Model Context Protocol servers that enable AI models to utilize external tools, including example operations and simple number addition functionality.

  1. Overview
    1. Prerequisites
      1. Project Structure
        1. Installation
          1. Configuration MCP Client (Claude Desktop)

            Related MCP Servers

            • A
              security
              A
              license
              A
              quality
              A production-ready template for creating Model Context Protocol servers with TypeScript, providing tools for efficient testing, development, and deployment.
              Last updated -
              1
              14
              12
              JavaScript
              MIT License
            • A
              security
              F
              license
              A
              quality
              A TypeScript-based template for developing Model Context Protocol servers with features like dependency injection and service-based architecture, facilitating the creation and integration of custom data processing tools.
              Last updated -
              1
              2
              TypeScript
            • -
              security
              A
              license
              -
              quality
              A TypeScript implementation of a Model Context Protocol server that provides a frictionless framework for developers to build and deploy AI tools and prompts, focusing on developer experience with zero boilerplate and automatic tool registration.
              Last updated -
              6
              TypeScript
              MIT License
            • A
              security
              A
              license
              A
              quality
              A TypeScript-based Model Context Protocol toolkit that enables AI to interact with code files, manage translations, build projects, and search for files and code content.
              Last updated -
              33
              43
              5
              TypeScript
              MIT License

            View all related MCP servers

            ID: l176l1rgjp