光标的 MCP 服务器
用于 Cursor IDE 集成的模型上下文协议 (MCP) 服务器实现,通过 SSE(服务器发送事件)和 WebSocket 连接提供现代 Web 仪表板和工具。
特征
- 通过 WebSocket 支持进行实时连接监控
- 用于服务器管理的现代 Web 仪表板
- 基于 SSE 与 Cursor IDE 的通信
- 用于验证连通性的内置测试工具
- 集成 Google Drive 进行文件管理
- 用于添加新工具的可扩展架构
- 连接历史记录可视化
- 客户端管理界面
- 服务配置用户界面
- 可自定义的服务器设置
先决条件
- Python 3.8 或更高版本
- Node.js 18 或更高版本
- npm(Node.js 包管理器)
- pip(Python 包管理器)
- 游标 IDE
安装
- 克隆存储库:
- 安装依赖项:
发展
启动开发服务器:
服务器将从以下时间启动:
- 后端:
http://localhost:8765
- 前端:
http://localhost:3000
(如果端口 3000 正在使用,则为3001
)
您还可以单独启动服务器:
开发服务器提供:
- 前端更改的热重新加载
- API 请求自动代理到后端
- WebSocket 连接处理
- 后端和前端并行开发
如果您正在运行其他使用端口 3000 的应用程序,前端将自动尝试端口 3001,并递增直到找到可用端口。运行npm run dev
时,实际 URL 将显示在终端中。
项目结构
可用端点
HTTP 端点
/api/status
- 获取服务器状态/api/connections/history
- 获取连接历史记录/api/clients
- 获取活跃客户/api/services/{service_id}
- 服务配置/api/settings
- 服务器设置
WebSocket 端点
/ws/{client_id}
- 实时更新和 ping/pong
SSE 端点
/sse
——Cursor IDE 的服务器发送事件
工具端点
/invoke/test
测试工具/invoke/google_drive
- Google Drive 操作
生产部署
构建并启动生产服务器:
配置
初始设置
- 复制模板配置:
- 使用您的服务凭证更新
services_config.json
:- 对于 Google Drive:
- 在 Google Cloud Console 中创建项目
- 启用 Google Drive API
- 创建 OAuth 2.0 凭据
- 添加您的
client_id
和client_secret
- 对于 Google Drive:
服务器设置
通过 Web 仪表板配置服务器设置:
- 调试模式
- SSL 设置
- 连接限制
- Ping 超时
- 协议设置
测试
使用提供的测试客户端测试服务器:
测试客户端将:
- 连接到 SSE 和 WebSocket 端点
- 发送定期 ping
- 测试可用的工具
- 监视连接状态
故障排除
- 连接问题
- 检查后端和前端日志
- 在浏览器 DevTools 中验证 WebSocket 连接
- 确保
vite.config.ts
中的代理设置正确 - 检查端口冲突
- 前端问题
- 清除浏览器缓存
- 检查浏览器控制台是否有错误
- 验证 Node.js 和 npm 版本
- 检查 TypeScript 编译错误
- 后端问题
- 检查
mcp_server.log
是否存在错误 - 验证 Python 依赖项是否已安装
- 检查端口可用性
- 确保服务配置有效
- 检查
安全说明
- 服务器正在开发中接受所有来源(CORS
*
) - WebSocket 连接使用客户端 ID 进行基本识别
- 服务凭证存储在
services_config.json
中 - 环境变量应该用于生产中的敏感数据
贡献
- 分叉存储库
- 创建功能分支
- 进行更改
- 运行测试
- 提交拉取请求
执照
[在此添加您的许可证信息]
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.
与 Cursor IDE 集成的模型上下文协议服务器,通过 SSE 和 WebSocket 连接提供实时通信、现代 Web 仪表板和可扩展工具。
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityA template for creating and connecting custom tools to Cursor IDE using Model Context Protocol with support for cheerful server responses.Last updated -41PythonMIT License
- AsecurityFlicenseAqualityA Model Context Protocol implementation that provides a standardized interface for task management, supporting both STDIO mode for CLI/AI applications and HTTP+SSE mode for browser-based clients.Last updated -41JavaScript
- -securityFlicense-qualityA Model Context Protocol server that enables seamless integration between Cursor IDE and JIRA, allowing users to retrieve issues, execute JQL searches, and log work through natural language interactions.Last updated -Python
- -security-license-qualityA Model Context Protocol server that provides tools for connecting to and interacting with various database systems (SQLite, PostgreSQL, MySQL/MariaDB, SQL Server) through a unified interface.Last updated -Python