Skip to main content
Glama

MCP Server Template

MCP サーバーテンプレート 🛠️

独自のモデルコンテキストプロトコル(MCP)サーバーを構築するためのスターターテンプレートです。このテンプレートは、CursorまたはClaude Desktopで使用できるカスタムMCPを作成するために必要な基本的な構造と設定を提供します。

特徴

  • TypeScript を使用した基本的な MCP サーバーのセットアップ
  • サンプルツールの実装
  • すぐに使えるプロジェクト構造
  • @modelcontextprotocol/sdkで構築

プロジェクト構造

mcp-server-template/ ├── index.ts # Main server implementation ├── package.json # Project dependencies ├── tsconfig.json # TypeScript configuration └── build/ # Compiled JavaScript output

はじめる

  1. このテンプレートを複製します:
git clone [your-repo-url] my-mcp-server cd my-mcp-server
  1. 依存関係をインストールします:
pnpm install
  1. プロジェクトをビルドします。
pnpm run build

これにより、コンパイルされた MCP サーバー スクリプトである/build/index.jsファイルが生成されます。

カーソルの使用

  1. カーソル設定 -> MCP -> 新しいMCPサーバーの追加に移動します
  2. MCP を構成します。
    • 名前: [自分の名前を選択してください]
    • タイプ: コマンド
    • コマンド: node ABSOLUTE_PATH_TO_MCP_SERVER/build/index.js

Claude Desktopでの使用

次の MCP 構成を Claude Desktop 構成に追加します。

{ "mcpServers": { "your-mcp-name": { "command": "node", "args": ["ABSOLUTE_PATH_TO_MCP_SERVER/build/index.js"] } } }

発達

テンプレートには、 index.tsにサンプルツールの実装が含まれています。独自の MCP を作成するには、以下の手順を実行します。

  1. index.ts内のサーバー構成を変更します。
const server = new McpServer({ name: "your-mcp-name", version: "0.0.1", });
  1. server.tool()メソッドを使用してカスタム ツールを定義します。
server.tool( "your-tool-name", "Your tool description", { // Define your tool's parameters using Zod schema parameter: z.string().describe("Parameter description"), }, async ({ parameter }) => { // Implement your tool's logic here return { content: [ { type: "text", text: "Your tool's response", }, ], }; } );
  1. 実装をビルドしてテストします。
npm run build

貢献

問題や機能強化のリクエストをお気軽にお寄せください。

ライセンス

マサチューセッツ工科大学

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

local-only server

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

Cursor または Claude Desktop と統合できるモデル コンテキスト プロトコル サーバーを構築するためのスターター テンプレート。開発者は AI アシスタント用のカスタム ツールと拡張機能を作成できます。

  1. 特徴
    1. プロジェクト構造
      1. はじめる
        1. カーソルの使用
          1. Claude Desktopでの使用
            1. 発達
              1. 貢献
                1. ライセンス

                  Related MCP Servers

                  • -
                    security
                    F
                    license
                    -
                    quality
                    A Model Context Protocol server that enables AI assistants to explore and interact with Cursor IDE's SQLite databases, providing access to project data, chat history, and composer information.
                    Last updated -
                    10
                    Python
                    • Apple
                  • -
                    security
                    F
                    license
                    -
                    quality
                    A Model Context Protocol server that enables AI assistants like Claude to perform Python development tasks through file operations, code analysis, project management, and safe code execution.
                    Last updated -
                    1
                    Python
                    • Linux
                    • Apple
                  • -
                    security
                    F
                    license
                    -
                    quality
                    A Model Context Protocol server that connects AI assistants like Claude to Notion workspaces, enabling them to view, search, create, and update Notion databases, pages, and content blocks.
                    Last updated -
                    275
                    JavaScript
                    • Apple
                  • A
                    security
                    A
                    license
                    A
                    quality
                    A foundation for building custom local Model Context Protocol (MCP) servers that provide tools accessible to AI assistants like Cursor or Claude Desktop.
                    Last updated -
                    1
                    9
                    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/jatinsandilya/mcp-server-template'

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