Skip to main content
Glama

MCP Server TypeScript Template

by minimind-org

MCP サーバー TypeScript テンプレート

TypeScriptを使用してモデルコンテキストプロトコル(MCP)サーバーを作成するためのテンプレートです。このプロジェクトでは、カスタムツールを使用してシンプルなMCPサーバーを実装する方法を示します。

概要

このテンプレートは、次のツールを提供する基本的な MCP サーバーを実装します。

  • 操作例: 簡単なデモ操作
  • 加算: 2つの数字を足すツール

サーバーは、モデル コンテキスト プロトコル SDK を使用して、AI モデルと外部ツール間の通信を処理します。

前提条件

  • Node.js (v16 以上)
  • npmまたはyarn

プロジェクト構造

プロジェクトは次のように構成されています。

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

インストール

リポジトリをクローンし、依存関係をインストールします。

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

MCP クライアントの構成 (Claude デスクトップ)

claude_desktop_config.jsonファイルを編集して、以下を追加します。

{ "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.

AI モデルがサンプル操作や単純な数値加算機能などの外部ツールを利用できるようにするモデル コンテキスト プロトコル サーバーを作成するための TypeScript テンプレート。

  1. 概要
    1. 前提条件
      1. プロジェクト構造
        1. インストール
          1. MCP クライアントの構成 (Claude デスクトップ)

            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
              1
              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

            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/minimind-org/mcp-server-typescript-template'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server