MCP Server TypeScript Template

by MCP-Mirror

288 downloads
Not rated
GitHub

About

MCP Server TypeScript Template is a starter project for building Model Context Protocol (MCP) servers using TypeScript. It demonstrates a basic server implementation with custom tools, such as an example operation and an addition tool, and is intended for developers who want to…

Details

Author
MCP-Mirror
Downloads
288
Categories
Developer Tools

- TypeScript-based MCP server template
- Example tool implementations (addition, example operation)
- Integration with the MCP SDK
- Error handling and utility modules
- Ready for Claude Desktop configuration

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MCP Server TypeScript Template
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Clone the repository, run npm install, then npm run build and npm run start. To use with Claude Desktop, add the server to claude_desktop_config.json with the command node and the path to dist/index.js.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mcp server typescript template": {
            "example": {
                "command": "node",
                "args": [
                    "/path/to/mcp-server-typescript-template/dist/index.js"
                ]
            }
        }
    }
}

McpServers

{
    "example": {
        "command": "node",
        "args": [
            "/path/to/mcp-server-typescript-template/dist/index.js"
        ]
    }
}

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"
      ]
    }
  }
}

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.