import React, { useState } from 'react'; import { Sparkles, XCircle, Code2, Copy, Check, Zap, Repeat, Compass, Layers, ArrowRight, } from 'lucide-react'; interface MCPSkillGuideModalProps { isOpen: boolean; onClose: () => void; onSendToStudio: (prompt: string) => void; } export const MCPSkillGuideModal: React.FC = ({ isOpen, onClose, onSendToStudio, }) => { const [copiedSkillId, setCopiedSkillId] = useState(null); if (!isOpen) return null; const handleCopy = (id: string, text: string) => { navigator.clipboard.writeText(text); setCopiedSkillId(id); setTimeout(() => setCopiedSkillId(null), 2000); }; const skills = [ { id: 'skill-autonomous-loop', title: 'Autonomous Self-Evaluating Feedback Loop Skill', icon: , tag: 'Autonomous Loops', tagColor: 'bg-indigo-900/60 text-indigo-300 border-indigo-700/50', description: 'Pattern for creating MCP tools that execute recursive evaluation cycles, verify their own assertions, calculate confidence scores, and return self-correcting telemetry back to the AI model.', promptExample: 'Create an autonomous loop MCP tool for code optimization that takes source code, benchmarks complexity, runs automated invariant checks, and suggests verified refactor steps with confidence scoring.', codeSnippet: `// Autonomous self-verifying feedback loop pattern const { sourceCode, testAssertions } = args; // 1. Execute transformation const transformed = optimizeAst(sourceCode); // 2. Self-verify invariants against test suite const passRate = runVerificationChecks(transformed, testAssertions); // 3. Output verifiable loop metrics return { status: passRate === 1.0 ? 'converged' : 'needs_iteration', confidenceScore: passRate, optimizedCode: transformed, telemetry: { loopIterations: 1, memorySavedPercent: 24.5 } };`, }, { id: 'skill-zero-api-key', title: 'Zero-API-Key Pure Algorithmic Engine Skill', icon: , tag: 'Pure Computation', tagColor: 'bg-emerald-900/60 text-emerald-300 border-emerald-700/50', description: 'Construct lightning-fast tools that operate entirely in local JS/TS without relying on paid external APIs. Ideal for AST parsing, regex validation, math engines, SVG generation, and network CIDR calculations.', promptExample: 'Build a zero-key SVG chart generator tool that takes an array of numbers and chart type (sparkline, gauge, bar) and returns production-ready scalable SVG strings and data URIs.', codeSnippet: `// Pure zero-API computation pattern const numbers = args.values || []; const max = Math.max(...numbers); const min = Math.min(...numbers); const points = numbers.map((n, i) => \`\${i * 20},\${100 - ((n - min) / (max - min)) * 80}\`).join(' '); const svg = \`\`; return { svg, dataUri: 'data:image/svg+xml;utf8,' + encodeURIComponent(svg) };`, }, { id: 'skill-roadsign-bridge', title: 'Remote Host "Road Sign" Signpost Skill', icon: , tag: 'Remote Bridge & Credentials', tagColor: 'bg-amber-900/60 text-amber-300 border-amber-700/50', description: 'Bridge remote desktop machines (e.g. Windows Workstation PowerShell, macOS shell, GPU clusters) by erecting an authoritative Road Sign on the Nexus with auto-injected Bearer tokens and API keys.', promptExample: 'Set up a Windows Workstation MCP Road Sign pointing to http://192.168.1.150:8000/mcp with Bearer token authentication to expose local PowerShell execution and desktop window controls.', codeSnippet: `// Road sign configuration with injected credentials { isRoadSign: true, signpostTitle: 'LOOK HERE: Windows Workstation Desktop MCP', targetHostLocation: 'http://192.168.1.150:8000/mcp', directionsInstructions: 'Access local Windows tools with auto-injected Bearer token', credentialKeys: { 'Authorization': 'Bearer win_mcp_sec_9941a8', 'X-Client-Origin': 'DoEverythingMCP-Nexus' } }`, }, ]; return (
CREATION SKILL GUIDE Original MCP Architectures

The MCP Creation Skill & Design Principles

Master the three foundational skills of original MCP construction: creating productive autonomous feedback loops, crafting zero-dependency algorithmic tools, and erecting secure remote host Road Signs.

{skills.map((skill) => (
{skill.icon}

{skill.title}

{skill.tag}

{skill.description}

Architecture Code Template:
                  {skill.codeSnippet}
                
))}
); };