Skip to main content
Glama

MCP TypeScript Starter

by yhwancha

MCP TypeScript スターター

これは、TypeScriptを使用してモデルコンテキストプロトコル(MCP)サーバーを作成するためのスターターテンプレートです。サンプルツールの実装を含む基本的なセットアップが提供されており、独自のMCPサーバーの構築を始めるのに役立ちます。

特徴

  • TypeScriptの設定
  • 基本的なMCPサーバーのセットアップ
  • サンプルツールの実装
  • 型安全な開発環境

はじめる

独自の MCP サーバーを作成するには、次の手順に従います。

# Create a new directory for your project mkdir <project_name> cd <project_name> # Initialize a new npm project npm init -y # Install dependencies npm install @modelcontextprotocol/sdk zod npm install -D @types/node typescript # Create source directory and main file mkdir src touch src/index.ts

プロジェクト構造

. ├── src/ │ └── index.ts # Main server implementation ├── package.json # Project dependencies and scripts └── tsconfig.json # TypeScript configuration

発達

  1. src/index.tsにツールを実装する
  2. プロジェクトをビルドします。
    npm run build

新しいツールの追加

新しいツールを追加するには、 server.tool()メソッドを使用します。例:

server.tool( "tool-name", "tool-description", { // Define your tool's parameters using Zod schema param: z.string().describe("parameter description") }, async ({ param }) => { // Implement your tool logic here return { content: [ { type: "text", text: `Tool executed with parameter: ${param}`, }, ], }; }, );

ライセンス

ISC

-
security - not tested
F
license - not found
-
quality - not tested

TypeScript を使用してモデル コンテキスト プロトコル サーバーを作成するためのスターター テンプレート。開発者が独自の MCP サーバーを構築するための基本的なセットアップとサンプル ツールの実装を提供します。

  1. 特徴
    1. はじめる
      1. プロジェクト構造
        1. 発達
          1. 新しいツールの追加
            1. ライセンス

              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
                7
                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
              • A
                security
                F
                license
                A
                quality
                A template for creating Model Context Protocol (MCP) servers in TypeScript, offering features like container-based dependency injection, a service-based architecture, and integration with the LLM CLI for architectural design feedback through natural language.
                Last updated -
                1
                5
                TypeScript
              • A
                security
                A
                license
                A
                quality
                A TypeScript-based template for building Model Context Protocol servers, featuring fast testing, automated version management, and a clean structure for MCP tool implementations.
                Last updated -
                1
                7
                2
                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/yhwancha/mcp_ts_starter'

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