claude-chat-app-mcp-server

nomura565/claude-chat-app-mcp-server

3.1

If you are the rightful owner of claude-chat-app-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The MCP Seat Reservation Server is a comprehensive Model Context Protocol server designed for seat reservation systems, offering functionalities like office management, seat reservation, and comment features.

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サーバーに接続できない場合

  1. APIサーバーが稼働していることを確認
  2. ポート番号とURLが正しいことを確認
  3. ファイアウォールの設定を確認

予約作成時にエラーが発生する場合

  1. 座席が既に予約されていないか確認
  2. 日付形式が正しいか確認(YYYY-MM-DD)
  3. 座席IDが存在するか確認

MCPクライアントで認識されない場合

  1. ビルドが正常に完了していることを確認
  2. パスが正しいことを確認
  3. MCPクライアントの設定ファイルを確認