mcp-detector

Original🇨🇳 Chinese
Translated
1 scriptsChecked / no sensitive code detected

Automatically detect and suggest appropriate MCP tools (context7, grep_app, web_search) based on user queries. This applies when queries contain documentation keywords (including English terms like how to use, docs, API, guide, tutorial and Chinese terms like 如何使用, 文档, 教程); code search keywords (including English terms like example, implementation, source code, github and Chinese terms like 例子, 示例, 实现, 源码); or latest information/bug fixing keywords (including English terms like latest, 2025, 2026, new, update, fix bug, error and Chinese terms like 最新, 更新, 修复 bug, 报错).

10installs
Added on

NPX Install

npx skill4agent add zwmmm/oh-my-claudecode mcp-detector

SKILL.md Content (Chinese)

View Translation Comparison →

MCP Detector

Automatically identify user query intent and recommend appropriate MCP tools.

Quick Detection

Run the detection script to get tool recommendations:
bash
# Command-line arguments
python scripts/detect_mcp.py "user query content"

# Pipe input
echo "user query" | python scripts/detect_mcp.py
Output Format: JSON, containing
matched_tools
and
recommendations

Tool Explanations

context7 - Official Documentation Query

  • 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 Code Search

  • 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 - Latest Information Search

  • 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

  1. Run Detection Script - Get the list of recommended tools
  2. Analyze Matching Results - Check matched keywords and reasons
  3. Call Matched Tools - Directly call the recommended MCP tools to execute the query

Design Principles

KISS

  • The script is concise and efficient, with single responsibility
  • Directly outputs JSON for easy parsing

DRY

  • Unified keyword configuration data structure
  • Reusable detection logic

YAGNI

  • Only implement necessary keyword detection
  • Continuously optimize based on actual needs