mcp-detector
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMCP 检测器
MCP Detector
自动识别用户查询意图并推荐合适的 MCP 工具。
Automatically identify user query intent and recommend appropriate MCP tools.
快速检测
Quick Detection
运行检测脚本获取工具推荐:
bash
undefinedRun the detection script to get tool recommendations:
bash
undefined命令行参数
Command-line arguments
python scripts/detect_mcp.py "用户查询内容"
python scripts/detect_mcp.py "user query content"
管道输入
Pipe input
echo "用户查询" | python scripts/detect_mcp.py
**输出格式**: JSON,包含 `matched_tools` 和 `recommendations`echo "user query" | python scripts/detect_mcp.py
**Output Format**: JSON, containing `matched_tools` and `recommendations`工具说明
Tool Explanations
context7 - 官方文档查询
context7 - Official Documentation Query
- 用途: 查找官方 API 文档、学习最佳实践、了解功能使用方法
- 工具:
mcp__plugin_oh_context7__query-docs - 触发词: how to use, API, docs, guide, tutorial, 如何使用, 文档, 教程
- Purpose: Look up official API documentation, learn best practices, understand how to use features
- Tool:
mcp__plugin_oh_context7__query-docs - Trigger Keywords: how to use, API, docs, guide, tutorial, 如何使用, 文档, 教程
grep_app - GitHub 代码搜索
grep_app - GitHub Code Search
- 用途: 查找真实代码实现、学习实际使用案例、参考开源项目
- 工具:
mcp__plugin_oh_grep_app__searchGitHub - 触发词: example, implementation, source code, github, 例子, 示例, 实现, 源码
- Purpose: Find real code implementations, learn practical use cases, reference open-source projects
- Tool:
mcp__plugin_oh_grep_app__searchGitHub - Trigger Keywords: example, implementation, source code, github, 例子, 示例, 实现, 源码
web_search - 最新信息搜索
web_search - Latest Information Search
- 用途: 获取最新版本信息、了解最近更新、查找 bug 解决方案
- 工具:
mcp__plugin_oh_web_search__web_search_exa - 触发词: 2025, 2026, latest, new, update, fix bug, error, 最新, 更新, 修复 bug, 报错
- Purpose: Get latest version information, learn about recent updates, find bug solutions
- Tool:
mcp__plugin_oh_web_search__web_search_exa - Trigger Keywords: 2025, 2026, latest, new, update, fix bug, error, 最新, 更新, 修复 bug, 报错
工作流程
Workflow
- 运行检测脚本 - 获取推荐工具列表
- 分析匹配结果 - 查看匹配的关键词和理由
- 调用匹配工具 - 直接调用推荐的 MCP 工具执行查询
- Run Detection Script - Get the list of recommended tools
- Analyze Matching Results - Check matched keywords and reasons
- Call Matched Tools - Directly call the recommended MCP tools to execute the query
设计原则
Design Principles
KISS
KISS
- 脚本简洁高效,单一职责
- 直接输出 JSON,便于解析
- The script is concise and efficient, with single responsibility
- Directly outputs JSON for easy parsing
DRY
DRY
- 统一的关键词配置数据结构
- 可复用的检测逻辑
- Unified keyword configuration data structure
- Reusable detection logic
YAGNI
YAGNI
- 只实现必要的关键词检测
- 基于实际需求持续优化
- Only implement necessary keyword detection
- Continuously optimize based on actual needs