Intelligent MCP server recommendation engine based on quantitative domain analysis. Maps project domains (Frontend %, Backend %, Database %, etc.) to appropriate MCP servers using tier-based priority system (Mandatory > Primary > Secondary > Optional). Performs health checking, generates setup instructions, provides fallback chains. Use when: analyzing project needs, configuring MCPs, checking MCP health, recommending alternatives.
Intelligent MCP server recommendation engine based on quantitative domain analysis. Maps project domains (Frontend %, Backend %, Database %) to appropriate MCP servers using tier-based priority system (Mandatory > Primary > Secondary > Optional). Performs health checking, generates setup instructions, provides fallback chains. Use when: analyzing project needs, configuring MCPs, checking MCP health, recommending alternatives.
/plugin marketplace add krzemienski/shannon-framework/plugin install shannon@shannon-frameworkThis skill is limited to using the following tools:
examples/domain-mcp-mapping.mdmappings/domain-mcp-matrix.jsonreferences/MCP_DISCOVERY.mdtests/TDD-COMPLETE.mdtests/baseline-scenarios.mdtests/baseline-violations.mdtests/compliance-verification.mdtests/pressure-scenarios.mdPurpose: Provide quantitative, domain-driven MCP server recommendations using tier-based prioritization. Transform domain percentages (from spec-analysis) into actionable MCP setup strategies with health checking, fallback chains, and setup instructions.
Key Innovation: Only framework with quantitative domain-to-MCP mapping (not guesswork).
CRITICAL: Agents systematically rationalize vague MCP recommendations without structured analysis. Below are the 5 most common rationalizations detected in baseline testing, with mandatory counters.
Example: User asks for MCPs → Agent responds "You might want Puppeteer, PostgreSQL, GitHub..."
COUNTER:
Rule: No uncertain recommendations. State tier + rationale explicitly.
Example: Agent lists 8 MCPs and says "All of these would be helpful for your project"
COUNTER:
Rule: Tier ALL recommendations. No flat lists.
Example: User asks "What MCPs am I missing?" → Agent says "I can't check what you have installed"
COUNTER:
Rule: Always include health check workflow. No helpless responses.
Example: User says "Puppeteer unavailable" → Agent suggests "Try Selenium" (not in fallback chain)
COUNTER:
Rule: Fallback chains are defined. Follow them exactly.
Example: User mentions "React app" → Agent immediately suggests MCPs without calculating domain %
COUNTER:
Rule: Domain percentages drive ALL recommendations. Always calculate first.
Example: "Frontend is 19.9%, which is basically 20%, so I'll skip Puppeteer to keep it simple"
COUNTER:
Rule: Thresholds have margin (±1%). Testing is non-negotiable.
Example: "Puppeteer isn't available, so I'll just use Selenium. That's equivalent, right?"
COUNTER:
Rule: Fallback chains are defined. Follow them exactly. No improvisation.
Use this skill when:
DO NOT use when:
Required:
domains (object): Domain percentages from spec-analysis
{
"Frontend": 40.5,
"Backend": 35.2,
"Database": 20.3,
"DevOps": 4.0
}
Optional:
include_mcps (array): Specific MCPs to include regardless of thresholds
["sequential"] (for deep analysis)[]exclude_mcps (array): MCPs to exclude from recommendations
["github"] (if already configured)[]health_check_mode (boolean): Generate health check workflow instead of recommendations
falsefallback_for (string): MCP name to generate fallback chain for
"puppeteer"Input: Domain percentages from spec-analysis or direct domain counts
Algorithm:
1. Load domain-mcp-matrix.json
2. FOR EACH domain WITH percentage >= 5%:
a. IF domain >= 20% → Add domain PRIMARY MCPs
b. IF domain >= 10% AND domain < 20% → Add domain SECONDARY MCPs
c. Check keyword conditions (e.g., "React" + Frontend >= 30% → Magic MCP)
3. ALWAYS add MANDATORY MCPs (Serena)
4. Add universal SECONDARY MCPs (GitHub)
5. Check keywords for OPTIONAL MCPs (research → Tavily)
6. Sort by tier priority: MANDATORY → PRIMARY → SECONDARY → OPTIONAL
7. Within each tier, sort by setup_priority
Output: Tiered MCP list with rationale per MCP
Algorithm:
1. FOR EACH recommended MCP:
a. Look up health_check command from domain-mcp-matrix.json
b. Generate test instruction: "Test with: /[health_check_command]"
c. Expected success: "✅ MCP operational"
d. Expected failure: "❌ MCP not available → Use fallback"
2. Generate health check script:
- Test MANDATORY MCPs first (critical)
- Test PRIMARY MCPs second (high priority)
- Test SECONDARY/OPTIONAL last
3. Report status per MCP: Operational / Missing / Degraded
Output: Health check workflow + MCP status report
Input: Unavailable MCP name
Algorithm:
1. Look up MCP in domain-mcp-matrix.json fallback_chains
2. IF fallback chain exists:
a. Return ordered list: [fallback1, fallback2, ..., manual]
b. FOR EACH fallback, explain capability differences
c. Provide migration instructions (e.g., Puppeteer → Playwright code changes)
3. IF no fallback chain:
a. Return "No direct replacement"
b. Suggest alternative approach (e.g., manual testing)
Output: Ordered fallback chain + migration guide
Algorithm:
1. FOR EACH recommended MCP:
a. Generate setup command: "Install [MCP] via Claude Code plugin system"
b. Generate health check: "Verify with: /[health_check_command]"
c. Generate configuration: "[MCP]-specific settings if needed"
d. Generate validation: "Test with sample operation"
2. Order by setup_priority (MANDATORY first, then by tier)
3. Generate complete setup script
Output: Step-by-step setup guide with validation
Input: Domain percentages (e.g., {frontend: 40%, backend: 30%, database: 20%})
Steps:
Output: Tiered MCP list with rationale, health checks, setup guide
Input: User request to check MCP status
Steps:
Output: MCP health status report + setup guide for missing MCPs
Input: Unavailable MCP name + reason
Steps:
Output: Fallback chain + migration guide + degradation warnings
Input:
User: "My project is 60% frontend (React), 20% backend (Express), 20% database (PostgreSQL). What MCPs should I use?"
Execution:
Step 1: Load domain-mcp-matrix.json
Step 2: Apply mapping algorithm:
- Frontend 60% >= 20% → PRIMARY: Puppeteer, Magic (60% >= 30%), Context7
- Backend 20% >= 20% → PRIMARY: Context7 (already added)
- Database 20% >= 15% → PRIMARY: PostgreSQL MCP
- MANDATORY: Serena MCP (always)
- SECONDARY: GitHub MCP (universal)
Step 3: Sort by tier and priority
Output:
# MCP Recommendations
## Tier 1: MANDATORY
1. **Serena MCP** (Setup Priority: 1)
- Purpose: Context preservation across waves
- Rationale: Shannon Framework requirement
- Setup: Install via /plugin install serena
- Health Check: /list_memories
- Fallback: None (critical requirement)
## Tier 2: PRIMARY
2. **Puppeteer MCP** (Frontend 60% >= 20%)
- Purpose: Functional browser testing (NO MOCKS)
- Rationale: Frontend 60% >= 20% threshold for Primary tier
- Setup: Install via /plugin install puppeteer
- Health Check: /browser_navigate
- Fallback Chain: Playwright → Chrome DevTools → Manual Testing
3. **Magic MCP** (Frontend 60% >= 30%)
- Purpose: Component generation for React
- Rationale: Frontend 60% >= 30% threshold for Magic MCP
- Setup: Install via /plugin install magic
- Health Check: /21st_magic_component_builder
- Fallback Chain: Manual coding
4. **Context7 MCP** (Frontend 60% + Backend 20%)
- Purpose: Framework documentation (React, Express)
- Rationale: Multiple domains >= 20% benefit from Context7
- Setup: Install via /plugin install context7
- Health Check: /get-library-docs
- Fallback Chain: Web search → Manual docs
5. **PostgreSQL MCP** (Database 20% >= 15%)
- Purpose: PostgreSQL database operations
- Rationale: Database 20% >= 15% threshold for database MCPs
- Setup: Install via /plugin install postgres
- Health Check: Database connection test
- Fallback Chain: Manual psql → Database GUI
## Tier 3: SECONDARY
6. **GitHub MCP** (Universal)
- Purpose: Version control, CI/CD, project management
- Rationale: All projects benefit from GitHub integration
- Setup: Install via /plugin install github
- Health Check: /list repositories
- Fallback Chain: Manual git → gh CLI
## Setup Order
1. Install Serena MCP first (MANDATORY)
2. Verify Serena: /list_memories
3. Install Primary MCPs: Puppeteer, Magic, Context7, PostgreSQL
4. Verify each Primary MCP with health check
5. Install Secondary MCPs: GitHub
6. Run full health check workflow
## Health Check Workflow
```bash
# Test MANDATORY
/list_memories
# Expected: ✅ Memory list returned
# Test PRIMARY
/browser_navigate https://example.com
# Expected: ✅ Browser launches
/21st_magic_component_builder
# Expected: ✅ Component generation available
/get-library-docs react
# Expected: ✅ React documentation retrieved
# Test database connection (requires DB setup)
# Expected: ✅ Connection established
# Test SECONDARY
/list repositories
# Expected: ✅ GitHub repositories listed
### Example 2: Backend-Heavy Project (Backend 70%, Database 25%, Frontend 5%)
**Input**:
User: "I'm building a backend API: 70% Express/FastAPI, 25% PostgreSQL, 5% minimal frontend. Recommend MCPs."
**Execution**:
Step 1: Domain analysis:
**Output**:
```markdown
# MCP Recommendations
## Tier 1: MANDATORY
1. **Serena MCP** - Context preservation (Shannon requirement)
## Tier 2: PRIMARY
2. **Context7 MCP** (Backend 70% >= 20%)
- Purpose: Express/FastAPI documentation
- Rationale: Backend-heavy project needs framework references
3. **PostgreSQL MCP** (Database 25% >= 15%)
- Purpose: PostgreSQL database operations
- Rationale: Database 25% >= 15% threshold
## Tier 3: SECONDARY
4. **GitHub MCP** (Universal)
- Purpose: Version control, CI/CD
## Notes
- Frontend 5% < 10% threshold → No frontend MCPs recommended
- Focus on backend tooling (Context7) and database access (PostgreSQL)
- If frontend grows to >= 20%, add Puppeteer for testing
Input:
User: "Can you check which MCPs I have and tell me what's missing for my React + PostgreSQL project?"
Execution:
Step 1: Calculate expected MCPs:
- React → Frontend domain (assume 50%)
- PostgreSQL → Database domain (assume 25%)
- Remaining → Backend (25%)
Step 2: Expected MCPs:
- MANDATORY: Serena
- PRIMARY: Puppeteer (Frontend 50%), Context7, PostgreSQL MCP
- SECONDARY: GitHub
Step 3: Generate health check workflow
Step 4: Guide user through testing
Step 5: Collect results and recommend missing MCPs
Output:
# MCP Health Check
## Expected MCPs (React + PostgreSQL Project)
### MANDATORY
- Serena MCP ✅ CRITICAL
### PRIMARY
- Puppeteer MCP (Frontend testing)
- Context7 MCP (React documentation)
- PostgreSQL MCP (Database operations)
### SECONDARY
- GitHub MCP (Version control)
## Health Check Workflow
Run these commands and report results:
### 1. Test Serena (MANDATORY)
```bash
/list_memories
Expected: ✅ Memory list returned If fails: ❌ CRITICAL - Install Serena MCP immediately
/browser_navigate https://example.com
Expected: ✅ Browser launches If fails: ❌ Install Puppeteer OR use fallback (Playwright)
/get-library-docs react
Expected: ✅ React documentation retrieved If fails: ⚠️ Use web search fallback
# Test database connection (requires DB setup)
Expected: ✅ Connection established If fails: ❌ Install PostgreSQL MCP OR use manual psql
/list repositories
Expected: ✅ Repositories listed If fails: ⚠️ Use manual git (low priority)
---
## Outputs
MCP recommendations object:
```json
{
"mandatory": [
{
"name": "serena",
"purpose": "Context preservation across waves",
"rationale": "Shannon Framework requirement",
"setup_priority": 1,
"health_check": "/list_memories",
"fallback": "none"
}
],
"primary": [
{
"name": "puppeteer",
"purpose": "Functional browser testing (NO MOCKS)",
"rationale": "Frontend 40% >= 20% threshold",
"setup_priority": 2,
"health_check": "/browser_navigate",
"fallback_chain": ["playwright", "chrome-devtools", "manual"]
}
],
"secondary": [
{
"name": "github",
"purpose": "Version control, CI/CD",
"rationale": "Universal (all projects benefit)",
"setup_priority": 5,
"health_check": "/list repositories",
"fallback_chain": ["gh-cli", "manual-git"]
}
],
"optional": [],
"setup_workflow": [
"1. Install Serena MCP (MANDATORY)",
"2. Verify: /list_memories",
"3. Install Primary MCPs: Puppeteer, Context7",
"4. Verify each with health check",
"5. Install Secondary MCPs: GitHub"
],
"health_check_script": "# Test MANDATORY\n/list_memories\n# Test PRIMARY\n/browser_navigate https://example.com\n..."
}
Successful when:
Fails if:
Validation Code:
def validate_mcp_recommendations(result):
"""Verify MCP discovery followed protocols"""
# Check: Serena MCP in mandatory tier
mandatory = result.get("mandatory", [])
assert any(mcp["name"] == "serena" for mcp in mandatory), \
"VIOLATION: Serena MCP not in mandatory tier"
# Check: All MCPs have tier designation
all_mcps = (result.get("mandatory", []) + result.get("primary", []) +
result.get("secondary", []) + result.get("optional", []))
for mcp in all_mcps:
assert "name" in mcp, "VIOLATION: MCP missing name"
assert "rationale" in mcp, f"VIOLATION: {mcp['name']} missing rationale"
assert "health_check" in mcp, f"VIOLATION: {mcp['name']} missing health check"
# Check: Primary MCPs have domain justification
primary = result.get("primary", [])
for mcp in primary:
rationale = mcp.get("rationale", "")
assert "%" in rationale or "threshold" in rationale, \
f"VIOLATION: {mcp['name']} missing quantitative rationale"
# Check: No uncertain language
all_text = str(result)
uncertain_terms = ["might", "probably", "consider", "could use"]
for term in uncertain_terms:
assert term not in all_text.lower(), \
f"VIOLATION: Uncertain language detected: '{term}'"
# Check: Setup workflow provided
assert result.get("setup_workflow"), \
"VIOLATION: Setup workflow missing"
# Check: Health check script provided
assert result.get("health_check_script"), \
"VIOLATION: Health check script missing"
return True
Problem: "You need Puppeteer, PostgreSQL, GitHub, Context7, Tavily" (no tiers)
Why It Fails: All MCPs treated equally → User doesn't know priorities
Solution: ALWAYS tier recommendations:
Problem: User says "React app" → Agent suggests Puppeteer without calculating domain %
Why It Fails: No quantitative basis → Can't justify PRIMARY vs SECONDARY tier
Solution: ALWAYS calculate or estimate domain percentages:
Problem: "Puppeteer MCP - for testing" (no domain percentage shown)
Why It Fails: User doesn't understand WHY Puppeteer is recommended
Solution: ALWAYS include quantitative rationale:
How to verify mcp-discovery executed correctly:
Version: 4.0.0 Last Updated: 2025-11-03 Author: Shannon Framework Team License: MIT Status: Core (Quantitative skill, required by spec-analysis)
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.