
stephencme/create-mcp-ts
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
TypeScript で新しい MCP サーバーを作成, 含まれている電池.
概要
TypeScript で新しい MCP サーバーを作成, 含まれている電池. create-mcp-ts が必要です - MCP サーバーの開発、ビルド、セットアップに必要なすべての自動インストールを行います。 create-mcp-ts は、Cursor、Windsurf、Claude Desktop で MCP サーバーを自動的に構成できます。 このスクリプトは、各クライアントのそれぞれのMCP設定ファイルに既に存在しているサーバーがいるかどうかを確認します。 そうでない場合は、サーバースクリプト(dist/index.js)にエントリを指すエントリを追加します。 Cursor、Windsurf、Claude DesktopでMCPサーバーを設定する方法については、以下を参照してください。 - Cursor用のMCPドキュメント - Windsurf用のMCPドキュメント - Claudeデスクトップ用のMCPドキュメント カスタムテンプレートを使用する場合は、npx create-mcp-ts コマンドにテンプレートnpmパッケージ名またはファイルパスを渡すことで行うことができます。 MCP サーバーを共有する場合は、npm に公開できます
概要(AI 翻訳)
TypeScript で新しい MCP サーバーを作成, 含まれている電池.
はじめる
[[`create-mcp-ts`] は、**```````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````
##Cursor、Windsurf、ClaudeデスクトップにMCPサーバーを設定
[[create-mcp-ts]は、Cursor、Windsurf、Claude DesktopでMCPサーバーを自動的に設定できます。
このスクリプトは、各クライアントのそれぞれの MCP 設定ファイルに your-server が既に存在するかどうかを確認します。 もしそうでなければ、サーバスクリプト([dist/index.js]])に、エントリを指すエントリを追加します。
Cursor、Windsurf、Claude DesktopでMCPサーバーを設定する方法については、以下を参照してください。
- Cursor 用の MCP ドキュメント
- ウィンドサーフィン用MCPドキュメント
- Claudeデスクトップ用のMCPドキュメント
カスタムテンプレート
カスタムテンプレートを使用する場合は、テンプレートnpmパッケージ名やファイルパスをnpx create-mcp-tsに渡すことで、次のようにできます。
##MCPサーバーの公開
MCP サーバーを共有する場合は、npm に公開できます。
- [
package.jsonに ["private"] を設定し、[[false] に設定します。 - [
npm installを実行します。 - [
npm run buildを実行します。 - [
npm loginを実行します(必要に応じて)。 - [
npm publishを実行します.
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
create-mcp-ts 
Create a new MCP server in TypeScript, batteries included.
Getting started
npm init mcp-ts your-server
cd your-server
npm run dev
create-mcp-ts requires zero build configuration - it will automatically install everything you need to develop, build, and set up your MCP server.
Set up your MCP server in Cursor, Windsurf, and Claude Desktop
create-mcp-ts can automatically configure your MCP server in Cursor, Windsurf, and Claude Desktop:
npm run setup
This script checks if your-server already exists in each client’s respective MCP configuration file. If not, it adds an entry pointing to the server script (dist/index.js):
{
"mcpConfig": {
"your-server": {
"command": "node",
"args": ["/path/to/your-server/dist/index.js"]
}
}
}
For more details on how to set up MCP servers in Cursor, Windsurf, and Claude Desktop, see:
Custom templates
If you’d like to use a custom template, you can do so by passing the template npm package name or file path to the npx create-mcp-ts command:
npx create-mcp-ts your-server --template=mcp-ts-template-default
npx create-mcp-ts your-server --template=file:/path/to/mcp-ts-template
Publishing your MCP server
If you plan to share your MCP server, you can publish it to npm:
- Set
"version"inpackage.jsonand ensure"private"is set tofalse. - Run
npm install. - Run
npm run build. - Run
npm login(if needed). - Run
npm publish.
Ejecting from mcp-scripts
The mcp-scripts package contains build tools for create-mcp-ts projects - everything you’ll need to develop, build, and set up an MCP server without any additional configuration.
Under the hood mcp-scripts uses tsup and esbuild, lightweight, battle-tested utilities that are well-suited for production-grade TypeScript projects.
If you’d like to eject from mcp-scripts, run the following command:
npm run eject
This will remove the mcp-scripts dependency and replace any related commands from your project’s package.json file.
Troubleshooting your MCP server
Confirm you have Node.js installed
If you experience issues running your MCP server, the first thing to check is that you have Node.js installed globally. You can check this by running:
node --version
If you don’t have Node.js installed, you can install it by following the instructions here.
Usage with Node.js version managers
インストール
npx create-mcp-ts your-server --template=mcp-ts-template-default