MCP サーバー スターター
TypeScript を使用して Model Context Protocol (MCP) サーバーを構築するための、本番環境対応のスターター テンプレート。
🚀 クイックスタート
リポジトリをクローンする
依存関係をインストールします:
bun install
✨ 主な特徴
高速テストと開発のためのBun
リンティングとフォーマットのためのバイオーム
標準バージョンによる自動バージョン管理
クリーンで保守しやすいプロジェクト構造
📂 プロジェクト構造
⚙️ 構成
新しいツールの作成
このプロジェクトには、新しい MCP ツールの作成に役立つスクリプトが含まれています。
これにより、次のようになります。
src/tools/<tool-name>
の下に新しいツールディレクトリを作成します。以下を含む基本的なツール構造を生成します。
index.ts (メイン実装)
schema.ts (ツールパラメータのJSONスキーマ)
test.ts (テストファイル)
新しいツールをエクスポートするためにツールのインデックスファイルを更新します
例:
🛠️ 開発
テストを実行:
bun test
フォーマットコード:
bun run format
リントコード:
bun run lint
プロジェクトのビルド:
bun run build
開発用 MCP サーバーを Claude Desktop に追加するには:
プロジェクトをビルドします。
bun run buildClaude Desktop の設定に追加:
// You only need the argument if you need to pass arguments to your server { "mcpServers": { "your-server-name": { "command": "node", "args": ["/path/to/your/project/dist/main.js", "some_argument"] } } }
📜 バージョン管理
このプロジェクトでは、自動バージョン管理のためにstandard-versionを使用しています。新しいバージョンを作成するには、 bun run release
を実行してください。
コミットメッセージの形式
feat
: 新機能 (マイナーバージョンをアップグレード)fix
:バグ修正(パッチバージョンをアップグレード)BREAKING CHANGE
: 破壊的変更 (メジャーバージョンを上げる)
📦 npm への公開
npm にログインしていることを確認します。
npm loginプロジェクトをビルドします。
bun run buildパッケージを公開します。
npm publish
新しいバージョンを公開する前に、 bun run release
を使用してバージョン番号を更新することを忘れないでください。
npmからインストールする(公開後)
Claude Desktop の設定に追加:
Tools
TypeScript を使用してモデル コンテキスト プロトコル サーバーを作成するための本番環境対応のテンプレート。効率的なテスト、開発、およびデプロイメントのためのツールを提供します。
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityA production-ready template for building Model Context Protocol servers in TypeScript, offering fast development with Bun, Biome linting, and automated version management.Last updated -160MIT License
- AsecurityFlicenseAqualityA 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 -124
- AsecurityAlicenseAqualityA 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 -1604MIT License
- -securityFlicense-qualityA starter template for creating Model Context Protocol servers using TypeScript, providing basic setup and sample tool implementation for developers to build their own MCP servers.Last updated -