Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Base Servershow me the available tools in this server"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Base Server
MCP (Model Context Protocol) サーバー作成用のベーステンプレートです。
特徴
TypeScriptベースのMCPサーバー実装
モジュラーなツールアーキテクチャ
Zodスキーマによる組み込みバリデーション
サンプルツール実装
Vitestテスト環境
包括的なエラーハンドリング
高速なMCPサーバー開発テンプレート
要件
Docker
Docker Compose(オプション)
インストール
使用方法
Docker(推奨)
開発環境(ローカル開発用)
MCPクライアント設定
Claude Desktop
Claude Desktopの設定ファイルを編集します:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
以下の設定を追加します:
Dockerを使用する場合(推奨)
ローカルビルドを使用する場合
開発環境での設定
その他のMCPクライアント
stdio転送をサポートする任意のMCPクライアントから利用できます:
アーキテクチャ
プロジェクトはモジュラーアーキテクチャに従います:
src/index.ts- メインサーバーエントリーポイントsrc/core/tool-handler.ts- コアツール実行ロジックsrc/tools/- カテゴリ別に整理されたツール実装src/tools/registry.ts- ツール登録と発見src/types/- TypeScript型定義
新しいツールの追加
src/tools/[category]/[tool-name].tsに新しいツールファイルを作成ツールスキーマ、入出力型、実装を定義
登録用に
toolDefinitionをエクスポートsrc/tools/registry.tsにツールを追加src/core/tool-handler.tsのツールハンドラーを更新
ツール実装テンプレート
カスタマイズガイド
1. プロジェクト名の変更
package.jsonとsrc/index.tsをプロジェクト名で更新:
2. カスタムクライアントの追加
src/core/tool-handler.tsにカスタムクライアントを追加:
3. 環境変数
必要に応じて環境変数の処理を追加:
利用可能なスクリプト
npm run build- TypeScriptをJavaScriptにコンパイルnpm run start- 本番サーバーを開始npm run dev- ts-nodeで開発サーバーを開始npm run lint- ESLintを実行npm run typecheck- TypeScript型チェックを実行npm test- テストを実行npm run test:watch- 監視モードでテストを実行npm run test:coverage- カバレッジレポート付きでテストを実行npm run docker:build- Dockerイメージをビルドnpm run docker:run- Dockerコンテナを実行npm run docker:dev- Docker Composeで開発環境を起動
プロジェクト構造
貢献
リポジトリをフォーク
フィーチャーブランチを作成
テスト付きで変更を追加
lintと型チェックを実行
プルリクエストを提出
ライセンス
MITライセンス - 詳細はLICENSEファイルを参照してください。