UNPKG

mcp-quiz-server

Version:

🧠 AI-Powered Quiz Management via Model Context Protocol (MCP) - Create, manage, and take quizzes directly from VS Code, Claude, and other AI agents.

66 lines (61 loc) 2.04 kB
#!/usr/bin/env node "use strict"; /** * @moduleName: MCP Quiz Server - Simple NPX Entry Point * @version: 0.0.1 * @since: 2025-07-23 * @lastUpdated: 2025-07-27 * @projectSummary: Simple entry point for NPX installation of the MCP Quiz Server * @techStack: Node.js, TypeScript * @dependency: None (delegates to cli.ts) * @interModuleDependency: ./cli.ts * @requirementsTraceability: * {@link Requirements.REQ_CLI_001} (NPX Tool Integration) * {@link Requirements.REQ_OPS_001} (Server Operation Management) * @briefDescription: Minimal NPX wrapper for MCP Quiz Server * @methods: Command delegation, script execution * @contributors: GitHub Copilot * @examples: npx mcp-quiz-server start * @vulnerabilitiesAssessment: Minimal attack surface, delegates to cli.ts */ /** * The command-line argument provided as the third element in the process's argument vector. * Typically used to determine which command or operation the application should execute. * * @example * // If the script is run as `node index.js start`, command will be 'start'. */ const command = process.argv[2]; switch (command) { case 'start': console.log('🚀 Starting MCP Quiz Server...'); require('./server'); break; case 'mcp': console.log('🤖 Starting MCP Server (STDIO mode)...'); require('./mcp-server'); break; case undefined: case 'help': case '--help': case '-h': console.log(` MCP Quiz Server v0.0.1 Usage: npx mcp-quiz-server <command> Commands: start Start the web server (default port 3000) mcp Start MCP server for VS Code integration help Show this help message Examples: npx mcp-quiz-server start npx mcp-quiz-server mcp For VS Code MCP integration, use: "command": "npx", "args": ["mcp-quiz-server", "mcp"] `); break; default: console.error(`❌ Unknown command: ${command}`); console.log('Run "npx mcp-quiz-server help" for usage information.'); process.exit(1); }