AI Customer Support Bot - MCP Server
AI 客户支持机器人 - MCP 服务器
模型上下文协议 (MCP) 服务器使用 Cursor AI 和 Glama.ai 集成提供 AI 驱动的客户支持。
特征
从 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/batch在单个请求中处理多个查询。
示例请求:
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