AI Customer Support Bot - MCP Server
AIカスタマーサポートボット - MCPサーバー
Cursor AI と Glama.ai の統合を使用して AI を活用した顧客サポートを提供する Model Context Protocol (MCP) サーバー。
特徴
Glama.aiからのリアルタイムコンテキスト取得
Cursor AI による AI を活用した応答生成
バッチ処理のサポート
優先キューイング
レート制限
ユーザーインタラクションの追跡
健康モニタリング
MCPプロトコル準拠
Related MCP server: MCP Boilerplate
前提条件
Python 3.8以上
PostgreSQLデータベース
Glama.ai APIキー
カーソルAI APIキー
インストール
リポジトリをクローンします。
git clone <repository-url>
cd <repository-name>仮想環境を作成してアクティブ化します。
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate依存関係をインストールします:
pip install -r requirements.txt.env.exampleに基づいて.envファイルを作成します。
cp .env.example .env資格情報を使用して
.envファイルを構成します。
# API Keys
GLAMA_API_KEY=your_glama_api_key_here
CURSOR_API_KEY=your_cursor_api_key_here
# Database
DATABASE_URL=postgresql://user:password@localhost/customer_support_bot
# API URLs
GLAMA_API_URL=https://api.glama.ai/v1
# Security
SECRET_KEY=your_secret_key_here
# MCP Server Configuration
SERVER_NAME="AI Customer Support Bot"
SERVER_VERSION="1.0.0"
API_PREFIX="/mcp"
MAX_CONTEXT_RESULTS=5
# Rate Limiting
RATE_LIMIT_REQUESTS=100
RATE_LIMIT_PERIOD=60
# Logging
LOG_LEVEL=INFOデータベースを設定します。
# Create the database
createdb customer_support_bot
# Run migrations (if using Alembic)
alembic upgrade headサーバーの実行
サーバーを起動します。
python app.pyサーバーはhttp://localhost:8000で利用可能になります。
APIエンドポイント
1. ルートエンドポイント
GET /基本的なサーバー情報を返します。
2. MCPバージョン
GET /mcp/versionサポートされている MCP プロトコル バージョンを返します。
3. 機能
GET /mcp/capabilitiesサーバーの機能とサポートされている機能を返します。
4. プロセスリクエスト
POST /mcp/processコンテキストを使用して単一のクエリを処理します。
リクエストの例:
curl -X POST http://localhost:8000/mcp/process \
-H "Content-Type: application/json" \
-H "X-MCP-Auth: your-auth-token" \
-H "X-MCP-Version: 1.0" \
-d '{
"query": "How do I reset my password?",
"priority": "high",
"mcp_version": "1.0"
}'5. バッチ処理
POST /mcp/batch1 回のリクエストで複数のクエリを処理します。
リクエストの例:
curl -X POST http://localhost:8000/mcp/batch \
-H "Content-Type: application/json" \
-H "X-MCP-Auth: your-auth-token" \
-H "X-MCP-Version: 1.0" \
-d '{
"queries": [
"How do I reset my password?",
"What are your business hours?",
"How do I contact support?"
],
"mcp_version": "1.0"
}'6. 健康チェック
GET /mcp/healthサーバーの健全性とサービスの状態を確認します。
レート制限
サーバーは、次のデフォルトでレート制限を実装します。
60秒あたり100リクエスト
レート制限情報はヘルスチェックエンドポイントに含まれています
レート制限超過応答にはリセット時間が含まれます
エラー処理
サーバーは次の形式で構造化されたエラー応答を返します。
{
"code": "ERROR_CODE",
"message": "Error description",
"details": {
"timestamp": "2024-02-14T12:00:00Z",
"additional_info": "value"
}
}一般的なエラーコード:
RATE_LIMIT_EXCEEDED: レート制限を超えましたUNSUPPORTED_MCP_VERSION: サポートされていないMCPバージョンPROCESSING_ERROR: リクエスト処理エラーCONTEXT_FETCH_ERROR: Glama.ai からコンテキストを取得中にエラーが発生しましたBATCH_PROCESSING_ERROR: バッチリクエストの処理中にエラーが発生しました
発達
プロジェクト構造
.
├── app.py # Main application file
├── database.py # Database configuration
├── middleware.py # Middleware (rate limiting, validation)
├── models.py # Database models
├── mcp_config.py # MCP-specific configuration
├── requirements.txt # Python dependencies
└── .env # Environment variables新機能の追加
新しい設定オプションで
mcp_config.pyを更新します必要に応じて
models.pyに新しいモデルを追加します。app.pyに新しいエンドポイントを作成する新しい機能を反映するために機能エンドポイントを更新します
安全
すべてのMCPエンドポイントは
X-MCP-Authヘッダーによる認証を必要とする不正使用を防ぐためにレート制限が実装されています
データベースの資格情報は安全に保管する必要がある
APIキーはバージョン管理にコミットしてはならない
監視
サーバーは監視用のヘルスチェック エンドポイントを提供します。
サービスステータス
レート制限の使用
コネクテッドサービス
処理時間
貢献
リポジトリをフォークする
機能ブランチを作成する
変更をコミットする
ブランチにプッシュする
プルリクエストを作成する
認証バッジ
ライセンス
このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細についてはLICENSEファイルを参照してください。
サポート
サポートについては、リポジトリに問題を作成するか、開発チームにお問い合わせください。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityCmaintenanceA Model Context Protocol (MCP) server for Cursor IDE that simplifies the installation and configuration of other MCP servers.31177MIT
- Alicense-qualityDmaintenanceA server that implements the Model Context Protocol, providing a standardized way to connect AI models to different data sources and tools.1111MIT
- FlicenseCqualityDmaintenanceA Model Context Protocol server that provides Retrieval-Augmented Generation capabilities using Contextual AI, enabling AI interfaces like Cursor IDE and Claude Desktop to query domain-specific knowledge with context-aware responses and source citations.121
- AlicenseBqualityDmaintenanceA Model Context Protocol server that integrates Shortcut project management functionality with AI assistants like Cursor, Windsurf, Claude Code, and Zed.3313,484MIT
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
MCP (Model Context Protocol) server for Appwrite
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ChiragPatankar/AI-Customer-Support-Bot--MCP-Server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server