MCP Seat Reservation Server
A server for managing a comprehensive seat reservation system.
MCP Seat Reservation Server
座席予約システムの包括的なAPIとやり取りするためのModel Context Protocolサーバーです。オフィス管理、座席予約、コメント機能などを提供します。
機能概要
オフィス管理
- get_offices: 全オフィス一覧を取得
- get_office: 特定オフィスの詳細情報を取得
- get_office_seats: オフィス内の全座席情報を取得
予約管理
- get_reservations: 予約一覧を取得(日付フィルタリング可能)
- get_reservation: 特定予約の詳細情報を取得
- create_reservation: 新規予約を作成
- update_reservation: 既存予約を更新
- cancel_reservation: 予約をキャンセル
座席検索・管理
- get_available_seats: 指定期間の利用可能座席を取得
- find_seat_by_number: 座席番号で座席を検索
コメント機能
- get_all_comments: 全コメントを取得
- get_seat_comments: 特定座席のコメントを取得
- add_comment: 座席にコメントを追加
- delete_comment: コメントを削除
- get_comment_counts: 座席ごとのコメント数を取得
セットアップ
1. プロジェクトの初期化
mkdir mcp-seat-reservation-server
cd mcp-seat-reservation-server
2. 依存関係のインストール
npm install @modelcontextprotocol/sdk
npm install --save-dev @types/node typescript
3. ファイル構成
mcp-seat-reservation-server/
├── src/
│ └── index.ts # メインのサーバーコード
├── package.json
├── tsconfig.json
└── README.md
4. ビルド
npm run build
使用方法
MCPクライアントでの設定
Claude DesktopなどのMCPクライアントで使用する場合、設定ファイルに以下を追加:
{
"mcpServers": {
"seat-reservation": {
"command": "node",
"args": ["/path/to/your/mcp-seat-reservation-server/build/index.js"]
}
}
}
利用可能なツール詳細
オフィス管理
get_offices
全オフィス一覧を取得します。
// パラメータなし
get_office
特定オフィスの詳細情報を取得します。
{
"office_id": 1
}
get_office_seats
オフィス内の全座席情報を取得します。
{
"office_id": 1
}
予約管理
get_reservations
予約一覧を取得します(日付フィルタリング可能)。
{
"start_date": "2024-01-01", // オプション
"end_date": "2024-01-31" // オプション
}
create_reservation
新規予約を作成します。
{
"user_name": "田中太郎",
"seat_id": 1,
"start_date": "2024-01-15",
"end_date": "2024-01-17"
}
update_reservation
既存予約を更新します。
{
"reservation_id": 1,
"seat_id": 2,
"start_date": "2024-01-16",
"end_date": "2024-01-18"
}
座席検索
get_available_seats
指定期間の利用可能座席を取得します。
{
"office_id": 1,
"start_date": "2024-01-15",
"end_date": "2024-01-17"
}
find_seat_by_number
座席番号で座席を検索します。
{
"office_id": 1,
"seat_number": "A1"
}
コメント機能
add_comment
座席にコメントを追加します。
{
"seat_id": 1,
"name": "田中太郎",
"comment": "この席は快適です!"
}
get_seat_comments
特定座席のコメントを取得します。
{
"seat_id": 1
}
データ構造
オフィス(Office)
{
"id": 1,
"name": "東京本社",
"floor": "3F",
"layout_data": "{...}"
}
座席(Seat)
{
"id": 1,
"office_id": 1,
"seat_number": "A1",
"position_x": 250,
"position_y": 90
}
予約(Reservation)
{
"id": 1,
"user_id": 1,
"seat_id": 1,
"start_date": "2024-01-15",
"end_date": "2024-01-17",
"created_at": "2024-01-10T10:00:00Z",
"user_name": "田中太郎",
"seat_number": "A1",
"office_name": "東京本社",
"floor": "3F"
}
コメント(Comment)
{
"id": 1,
"seat_id": 1,
"name": "田中太郎",
"comment": "この席は快適です!",
"created_at": "2024-01-10T10:00:00Z",
"seat_number": "A1",
"office_name": "東京本社",
"floor": "3F"
}
API仕様
このサーバーは以下のAPIエンドポイントと連携します:
オフィス関連
GET /api/offices- 全オフィス取得GET /api/offices/:id- 特定オフィス取得GET /api/offices/:id/seats- オフィスの席一覧取得
予約関連
GET /api/reservations- 予約一覧取得GET /api/reservations/:id- 特定予約取得POST /api/reservations- 予約作成PUT /api/reservations/:id- 予約更新DELETE /api/reservations/:id- 予約削除
座席関連
GET /api/seats/available- 利用可能座席取得
コメント関連
GET /api/comments- 全コメント取得GET /api/seats/:id/comments- 座席のコメント取得POST /api/comments- コメント作成DELETE /api/comments/:id- コメント削除GET /api/seats/comments/count- 座席ごとのコメント数取得
使用例
1. 利用可能な座席を確認して予約
1. get_available_seats で利用可能座席を確認
2. create_reservation で予約を作成
3. get_reservation で予約詳細を確認
2. 座席の口コミを確認
1. find_seat_by_number で座席を検索
2. get_seat_comments で座席のコメントを確認
3. add_comment で自分のコメントを追加
3. 予約の管理
1. get_reservations で現在の予約一覧を確認
2. update_reservation で予約を変更
3. cancel_reservation で不要な予約をキャンセル
開発
開発モード
npm run dev
直接実行
npm start
注意事項
- APIサーバー(http://localhost:5000)が稼働している必要があります
- Node.js 18以上が必要です
- MCPクライアント(Claude Desktop等)での設定が必要です
- 日付は YYYY-MM-DD 形式で指定してください
トラブルシューティング
APIサーバーに接続できない場合
- APIサーバーが稼働していることを確認
- ポート番号とURLが正しいことを確認
- ファイアウォールの設定を確認
予約作成時にエラーが発生する場合
- 座席が既に予約されていないか確認
- 日付形式が正しいか確認(YYYY-MM-DD)
- 座席IDが存在するか確認
MCPクライアントで認識されない場合
- ビルドが正常に完了していることを確認
- パスが正しいことを確認
- MCPクライアントの設定ファイルを確認
Related Servers
MCP Kali Server
A comprehensive Model Context Protocol (MCP) server for penetration testing and cybersecurity operations, providing seamless integration between Kali Linux tools and MCP-compatible clients.
Bazi
An MCP server for accessing Bazi (Chinese astrology) data, requiring an API key.
maven-indexer-mcp
A Model Context Protocol (MCP) server that indexes your local Maven repository (~/.m2/repository) and Gradle cache ( ~/.gradle/caches/modules-2/files-2.1) to provide AI agents with tools to search for Java classes, method signatures, and source code.
MCP Media Player
Control a media player via Home Assistant.
Weather
Provides real-time weather data, forecasts, and alerts using the OpenWeatherMap API.
Scenario Word
A server for the scenario-word MCP, built with the mcp-framework.
MCP Wallet Service
An MCP server that provides wallet balance checking capabilities.
Sequential Ethical Thinking
A tool for structured, step-by-step ethical reasoning using multiple moral frameworks for transparent deliberation.
Monzo
Access and manage your Monzo banking data, allowing you to check balances and view transactions.
FAIM Time-Series forecasting
Zero-shot Time-Series forecasting with foundation time-series models