Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/mr-chen-05/rules-2.1-optimized/mcp-debugging-enhancedgit clone --depth 1 https://github.com/Mr-chen-05/rules-2.1-optimizedWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.03814 | $0.03814 |
| Opus 5 | $0.01907 | $0.01907 |
| Sonnet 5 | $0.00763 | $0.00763 |
| Haiku 4.5 | $0.00381 | $0.00381 |
Grade A, and why
mcp-debugging-enhanced scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 485 lines — stays where its author put it; the contents beside it link to each section on GitHub.
🔧 MCP Debugging Enhanced - 增强MCP调试工具
AI驱动的MCP服务器调试和诊断系统,提供智能故障分析、性能监控和自动化修复建议。
🧠 AI Intelligence Core - AI智能核心
智能激活条件
自动激活场景:
- 检测到MCP工具连接失败或异常
- 用户执行 "/mcp-debug" 命令
- systematic-debugging触发MCP相关调试
- MCP工具性能异常或超时
- 超级大脑系统推荐MCP诊断
智能分析维度:
- MCP服务器状态和健康度 (35%)
- 网络连接和通信质量 (25%)
- 配置正确性和兼容性 (20%)
- 性能指标和资源使用 (15%)
- 错误模式和历史问题 (5%)
🚀 Commands - 智能命令
/mcp-debug- AI智能MCP调试(推荐)/mcp-debug --health- MCP健康度检查/mcp-debug --performance- MCP性能分析/mcp-debug --config- MCP配置诊断/mcp-debug --network- 网络连接诊断/mcp-debug --logs- MCP日志分析/mcp-debug --fix- 自动修复MCP问题
✨ AI-Powered Features - AI驱动功能
🤖 智能MCP诊断引擎
MCP服务器分析:
状态检测:
- 服务器运行状态
- 进程健康度检查
- 内存和CPU使用
- 网络端口状态
配置分析:
- MCP配置文件验证
- 环境变量检查
- 依赖关系分析
- 版本兼容性检查
性能监控:
- 响应时间监控
- 吞吐量分析
- 资源使用统计
- 错误率监控
通信诊断:
- 协议兼容性检查
- 消息格式验证
- 数据传输质量
- 连接稳定性分析
智能故障识别:
- 常见故障模式识别
- 异常行为检测
- 性能瓶颈定位
- 配置错误识别
🔧 自动化修复引擎
可自动修复的问题:
配置问题:
- 端口冲突解决
- 环境变量修复
- 路径配置纠正
- 权限问题修复
连接问题:
- 网络连接重试
- 超时参数调整
- 协议版本协商
- 认证配置修复
性能问题:
- 缓存配置优化
- 连接池调整
- 内存使用优化
- 并发参数调整
修复策略:
- 渐进式修复方法
- 影响最小化原则
- 自动备份和回滚
- 修复效果验证
📊 智能监控和分析
实时监控:
- MCP服务器状态监控
- 性能指标实时追踪
- 错误和异常监控
- 资源使用监控
历史分析:
- 性能趋势分析
- 错误模式识别
- 使用统计分析
- 优化效果评估
预测分析:
- 故障风险预测
- 性能瓶颈预警
- 资源需求预测
- 维护时机建议
🔄 AI Workflow Process - AI工作流程
Phase 1: 诊断扫描阶段
Step 1 - 环境检测:
- 扫描所有已安装的MCP工具
- 检查MCP服务器运行状态
- 分析MCP配置文件
- 验证环境变量和依赖
Step 2 - 连接测试:
- 测试MCP服务器连接
- 验证通信协议
- 检查认证和权限
- 测试基本功能调用
Step 3 - 性能基准:
- 测量响应时间
- 评估吞吐量
- 监控资源使用
- 建立性能基线
Phase 2: 深度分析阶段
Step 4 - 故障分析:
- 分析错误日志和堆栈
- 识别故障模式和原因
- 评估故障影响范围
- 生成故障分析报告
Step 5 - 性能分析:
- 识别性能瓶颈
- 分析资源使用模式
- 评估优化机会
- 生成性能分析报告
Step 6 - 配置分析:
- 验证配置正确性
- 识别配置冲突
- 分析最佳实践偏离
- 生成配置优化建议
Phase 3: 修复优化阶段
Step 7 - 自动修复:
- 执行可自动修复的问题
- 应用配置优化建议
- 实施性能优化措施
- 验证修复效果
Step 8 - 监控设置:
- 建立持续监控机制
- 配置预警和通知
- 设置性能基准监控
- 启用自动化维护
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 485 lines · 3,814 tokens per session scan A e318425da2ac
mcp-debugging-enhanced is a cursor rule published in the GitHub repository Mr-chen-05/rules-2.1-optimized (172 stars, last pushed 9mo ago), licensed MIT. It adds 3,814 tokens to every session, about $0.0191 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
cli-error-handling
CLI command error handling patterns.
prefer-direct-imports-over-module-mocks
Prefer extracting a testable core over vi.mock / vi.resetModules when unit tests need to reach production logic entangled with config, env, or singletons.
control-plane-descriptors
Control plane descriptor and instance implementation patterns.
family-instance-domain-actions
Family instance domain action implementation patterns.