mcp-quiz-server
v0.0.1
Published
π§ AI-Powered Quiz Management via Model Context Protocol (MCP) - Create, manage, and take quizzes directly from VS Code, Claude, and other AI agents.
Maintainers
Readme
π§ MCP Quiz Server
π AI-Powered Quiz Management via Model Context Protocol (MCP)
Create, manage, and take quizzes directly from VS Code, Claude, and other AI agents.
β¨ Features
- π― Zero-Install Setup - Use with
npx- no global installation required - π VS Code Integration - Seamless quiz management in your favorite editor
- π€ Claude Desktop Support - AI-powered quiz creation and analysis
- π Advanced Analytics - Track performance and learning outcomes
- π Web Interface - Browser-based quiz taking experience
- π¨ Modern UI - Clean, responsive design with dark mode support
- π Secure & Private - Local database, no cloud dependencies
- π§ͺ TypeScript - Fully typed for better development experience
π Quick Start
Option 1: NPX (Recommended)
# Start the quiz server
npx mcp-quiz-server start
# Start MCP server for VS Code/Claude integration
npx mcp-quiz-server mcp
# Show help
npx mcp-quiz-server helpOption 2: Global Installation
npm install -g mcp-quiz-server
mcp-quiz-server startπ§ Integration Setup
VS Code MCP Extension
Add to your VS Code settings (settings.json):
{
"mcp": {
"servers": {
"mcp-quiz-server": {
"command": "npx",
"args": ["mcp-quiz-server", "mcp"]
}
}
}
}Claude Desktop
Add to your Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"mcp-quiz-server": {
"command": "npx",
"args": ["mcp-quiz-server", "mcp"]
}
}
}π Available Tools
| Tool | Description | Category |
|------|-------------|----------|
| create_quiz | Create new quizzes with questions | Quiz Management |
| list_quizzes | List all available quizzes | Quiz Management |
| get_quiz | Get specific quiz details | Quiz Management |
| delete_quiz | Delete existing quizzes | Quiz Management |
| submit_quiz_result | Submit quiz answers for scoring | Analytics |
| get_quiz_analytics | Get quiz performance analytics | Analytics |
| generate_quiz_urls | Generate shareable quiz URLs | Analytics |
| start_web_server | Start the web interface | Server Management |
| stop_web_server | Stop the web interface | Server Management |
| server_status | Check server status | Server Management |
π― Usage Examples
Creating a Quiz with VS Code
- Open Command Palette (
Ctrl+Shift+P) - Type "MCP: Execute Tool"
- Select
create_quiz - Provide quiz data:
{
"title": "JavaScript Fundamentals",
"description": "Test your JavaScript knowledge",
"category": "programming",
"questions": [
{
"question": "What is the correct way to declare a variable in JavaScript?",
"options": ["var x = 5;", "variable x = 5;", "v x = 5;", "declare x = 5;"],
"correctAnswer": "var x = 5;",
"explanation": "Variables in JavaScript are declared using var, let, or const keywords."
}
]
}Using with Claude Desktop
Simply ask Claude:
Create a 10-question quiz about Python programming covering variables, functions, loops, and data structures. Make it suitable for beginners.Claude will use the MCP tools to create and manage your quiz automatically!
π Web Interface
Start the web server:
npx mcp-quiz-server startThen visit: http://localhost:3000
Features:
- π± Responsive Design - Works on desktop, tablet, and mobile
- π¨ Theme Support - Light and dark modes
- β±οΈ Timer Support - Optional quiz timing
- π Real-time Feedback - Instant question feedback
- π Shareable Links - Send quizzes to others
- π Progress Tracking - Visual progress indicators
π Analytics & Reporting
Get comprehensive insights:
- Completion Rates - Track how many users finish quizzes
- Average Scores - Monitor learning effectiveness
- Question Analysis - Identify difficult questions
- Time Tracking - Understand quiz duration patterns
- Score Distribution - See performance patterns
Example analytics query:
// Get analytics for a specific quiz
const analytics = await getQuizAnalytics("quiz-id", "last30days");
console.log(analytics.averageScore); // 78.5%
console.log(analytics.completionRate); // 92%π§ Configuration
Environment Variables
| Variable | Description | Default |
|----------|-------------|---------|
| PORT | Web server port | 3000 |
| QUIZ_DB_PATH | Database file location | ./data/quiz.db |
| LOG_LEVEL | Logging level | info |
| NODE_ENV | Environment mode | development |
Custom Database Location
export QUIZ_DB_PATH="/path/to/custom/quiz.db"
npx mcp-quiz-server startDebug Mode
export LOG_LEVEL="debug"
npx mcp-quiz-server mcpπ οΈ Development
Prerequisites
- Node.js v16 or higher
- npm or yarn
Setup
git clone https://github.com/GSejas/mcp-quiz-oss.git
cd mcp-quiz-oss
npm installDevelopment Commands
npm run dev # Start development server
npm run build # Build for production
npm run test # Run tests
npm run lint # Run linting
npm run format # Format codeTesting
npm run test:quick # Quick smoke tests
npm run test:mcp # MCP integration tests
npm run test:db # Database tests
npm run test:e2e # End-to-end testsπ Project Structure
mcp-quiz-server/
βββ src/
β βββ application/ # Application layer (commands, queries)
β βββ domain/ # Domain layer (entities, services)
β βββ infrastructure/ # Infrastructure layer (database, HTTP)
β βββ mcp/ # MCP protocol implementation
β βββ shared/ # Shared utilities
β βββ index.ts # CLI entry point
β βββ server.ts # Web server entry point
β βββ mcp-server.ts # MCP server entry point
βββ public/ # Web interface assets
βββ tests/ # Test suites
βββ docs/ # Documentation
βββ data/ # Database filesπ€ Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Workflow
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Run the test suite
- Submit a pull request
Code Style
- TypeScript with strict mode
- ESLint + Prettier for formatting
- Clean Architecture principles
- Comprehensive test coverage
π Documentation
- π§ VS Code Setup Guide
- π€ Claude Desktop Setup Guide
- ποΈ Architecture Overview
- π API Documentation
- π§ͺ Testing Guide
π Security
- Local Database - No cloud dependencies or data transmission
- Input Validation - All inputs are sanitized and validated
- Type Safety - TypeScript provides compile-time safety
- Secure Headers - HTTP security headers enabled by default
- Rate Limiting - Protection against abuse
Report security issues to: [email protected]
π Roadmap
- [ ] Multi-language Support - Internationalization
- [ ] Advanced Question Types - Drag-drop, code snippets, multimedia
- [ ] Team Collaboration - Multi-user quiz editing
- [ ] LMS Integration - Canvas, Moodle, Blackboard connectors
- [ ] AI Question Generation - Automated content creation
- [ ] Voice Interaction - Audio-based quiz taking
- [ ] Mobile Apps - Native iOS and Android apps
π Why Choose MCP Quiz Server?
| Feature | MCP Quiz Server | Traditional Quiz Tools | |---------|-----------------|------------------------| | AI Integration | β Native VS Code & Claude | β Limited or none | | Zero Install | β NPX ready | β Complex setup | | Local First | β No cloud dependency | β Cloud required | | Developer Friendly | β TypeScript, APIs | β Limited extensibility | | Open Source | β MIT License | β Proprietary | | Modern UI | β React-like experience | β Outdated interfaces |
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgments
- Built with the Model Context Protocol (MCP)
- Inspired by modern educational technology needs
- Thanks to all contributors and the open-source community
π Support
- π Report Issues
- π¬ Discussions
- π§ Email Support
- π Documentation
Made with β€οΈ for educators, developers, and learners worldwide
