AI 客户支持机器人 - MCP 服务器
模型上下文协议 (MCP) 服务器使用 Cursor AI 和 Glama.ai 集成提供 AI 驱动的客户支持。
特征
- 从 Glama.ai 获取实时上下文
- 使用 Cursor AI 生成 AI 支持的响应
- 批处理支持
- 优先级排队
- 速率限制
- 用户交互跟踪
- 健康监测
- MCP 协议合规性
先决条件
- Python 3.8+
- PostgreSQL 数据库
- Glama.ai API 密钥
- 光标 AI API 密钥
安装
- 克隆存储库:
- 创建并激活虚拟环境:
- 安装依赖项:
- 根据
.env.example
创建.env
文件:
- 使用您的凭证配置您的
.env
文件:
- 设置数据库:
运行服务器
启动服务器:
该服务器将在http://localhost:8000
可用
API 端点
1. 根端点
返回基本服务器信息。
2. MCP 版本
返回支持的 MCP 协议版本。
3. 能力
返回服务器功能和支持的功能。
4. 处理请求
使用上下文来处理单个查询。
示例请求:
5.批处理
在单个请求中处理多个查询。
示例请求:
6. 健康检查
检查服务器健康和服务状态。
速率限制
服务器使用以下默认值实现速率限制:
- 每 60 秒 100 个请求
- 速率限制信息包含在健康检查端点中
- 速率限制超出响应包括重置时间
错误处理
服务器返回以下格式的结构化错误响应:
常见错误代码:
RATE_LIMIT_EXCEEDED
:超出速率限制UNSUPPORTED_MCP_VERSION
:不支持的 MCP 版本PROCESSING_ERROR
:处理请求时出错CONTEXT_FETCH_ERROR
:从 Glama.ai 获取上下文时出错BATCH_PROCESSING_ERROR
:处理批量请求时出错
发展
项目结构
添加新功能
- 使用新的配置选项更新
mcp_config.py
- 如果需要,在
models.py
中添加新模型 - 在
app.py
中创建新的端点 - 更新功能端点以反映新功能
安全
- 所有 MCP 端点都需要通过
X-MCP-Auth
标头进行身份验证 - 实施速率限制以防止滥用
- 数据库凭证应保持安全
- API 密钥永远不应提交到版本控制
监控
服务器提供健康检查端点用于监控:
- 服务状态
- 速率限制使用情况
- 互联服务
- 处理时间
贡献
- 分叉存储库
- 创建功能分支
- 提交你的更改
- 推送到分支
- 创建拉取请求
验证徽章
执照
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。
支持
如需支持,请在存储库中创建问题或联系开发团队。
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
模型上下文协议 (MCP) 服务器使用 Cursor AI 和 Glama.ai 集成提供 AI 驱动的客户支持。
Related MCP Servers
- -securityAlicense-qualityA Model Context Protocol (MCP) server that enables AI assistants to interact with MySQL databases by executing SQL queries and checking database connectivity.Last updated -TypeScriptMIT License
- -securityAlicense-qualityA Model Context Protocol (MCP) server that provides AI-powered customer support using Cursor AI and Glama.ai integration.Last updated -2PythonMIT License
- AsecurityAlicenseAqualityA foundation for building custom local Model Context Protocol (MCP) servers that provide tools accessible to AI assistants like Cursor or Claude Desktop.Last updated -123TypeScriptMIT License
- AsecurityAlicenseAqualityA modern Model Context Protocol (MCP) server that enables AI assistants to collect interactive user feedback, supporting text and image-based responses.Last updated -3PythonMIT License