parth012001/Codlab-ai-platform
If you are the rightful owner of Codlab-ai-platform and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The CodeLab AI Learning Platform is an AI-powered educational tool designed to enhance coding skills through interactive challenges and AI collaboration.
CodeLab AI Learning Platform
An AI-powered learning platform where humans and AI agents collaborate to master coding skills through interactive challenges, automated grading, and intelligent hints. Built for the Cequence hackathon with secure MCP server integration.
๐ Hackathon Entry: Transform existing applications into agent-accessible services using Cequence AI Gateway and MCP Protocol.
๐ Live Demo
- Web Application: http://localhost:3000 (when running locally)
- MCP Server: Secure agent-accessible tools via Cequence AI Gateway
- Agent Clients: Compatible with Claude Desktop, Cursor, Windsurf, MCP Playground
๐ฏ Project Overview
CodeLab AI transforms traditional coding education by providing:
- Interactive Learning Environment: Web-based coding challenges with real-time feedback
- AI Agent Integration: Secure MCP server that AI agents can use to help students learn
- Automated Assessment: Intelligent code evaluation with progressive hint systems
- Technical Interviews: AI-powered interview simulation and assessment
๐๏ธ Architecture
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Web Frontend โ โ MCP Server โ โ Cequence AI โ
โ (Next.js) โโโโโบโ (13 Tools) โโโโโบโ Gateway โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ โ โ
โผ โผ โผ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Database โ โ E2B Sandbox โ โ AI Agents โ
โ (SQLite) โ โ (Secure) โ โ (Claude, etc) โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
๐ ๏ธ Features
๐ Learning Platform Features
- Student Portal: Interactive coding challenges with progressive difficulty
- Instructor Dashboard: Create challenges, monitor progress, view analytics
- Interview Mode: Automated technical screening with AI assistance
- Progress Tracking: Detailed learning analytics and performance insights
- Hint System: AI-powered progressive hints (subtle โ moderate โ direct)
๐ค MCP Server Tools (13 Total)
Core Execution Tools (7)
execute_python
- Execute Python code in sandboxed environmentexecute_javascript
- Execute JavaScript/Node.js codecreate_file
- Create files in sandboxread_file
- Read files from sandboxlist_files
- List directory contentsinstall_packages
- Install Python (pip) or Node.js (npm) packagesget_sandbox_info
- Get sandbox status and resource information
Learning & Assessment Tools (6) โจ NEW
evaluate_solution
- Grade code submissions against test casesgenerate_hint
- AI-powered progressive hint generationcreate_challenge
- Dynamic coding challenge creationtrack_progress
- Learning analytics and progress trackingconduct_interview
- Automated technical interview sessionsget_learning_analytics
- Detailed performance insights
๐ Security Features
- Input Validation: Code length limits, dangerous pattern detection
- Output Sanitization: ANSI escape removal, secret detection and masking
- Resource Limits: Execution timeout, idle cleanup, file size restrictions
- Sandbox Isolation: E2B provides secure, isolated execution environments
- Authentication: Descope OAuth integration (planned)
- Gateway Security: Cequence AI Gateway for secure agent access (planned)
๐ Quick Start
Prerequisites
- Node.js 18+ and npm
- E2B API key (get from https://e2b.dev)
1. Install Dependencies
git clone <your-repo>
cd codelab-ai-platform
npm install
2. Set Environment Variables
export E2B_API_KEY="your-e2b-api-key"
export LOG_LEVEL="info" # Optional
export NODE_ENV="development" # or "production"
3. Start Development Servers
# Option 1: Start both MCP server and web app
npm run dev:all
# Option 2: Start individually
npm run dev:mcp # MCP server on stdio
npm run dev:web # Web app on http://localhost:3000
4. Test the Setup
# Test MCP server without API key
npm run test-mock
# Test with full E2B integration (requires API key)
npm test
๐งช Sample Challenges
The platform includes 3 pre-built challenges:
-
Reverse a String (Beginner, Python)
- Learn basic string manipulation
- Test with multiple inputs including edge cases
-
Fibonacci Sequence (Intermediate, Python)
- Practice algorithms and recursion
- Performance optimization challenges
-
Sum Array Elements (Beginner, JavaScript)
- Array operations and reduce functions
- Handle empty arrays and negative numbers
๐ฎ How to Use
For Students
- Visit the Student Portal at http://localhost:3000/student
- Choose a coding challenge based on your skill level
- Write your solution in the integrated code editor
- Get AI-powered hints when stuck (3 levels available)
- Submit for automated grading with detailed feedback
For Instructors
- Access Instructor Dashboard at http://localhost:3000/instructor
- Create new challenges with custom test cases
- Monitor student progress and performance analytics
- Review submission history and learning patterns
For Interviewers
- Use Interview Mode at http://localhost:3000/interview
- Set candidate experience level and interview type
- AI automatically generates appropriate questions
- Real-time coding assessment with automated evaluation
For AI Agents
AI agents can access the platform through the MCP server:
// Example: AI agent evaluates student code
{
"tool": "evaluate_solution",
"args": {
"challenge_id": "challenge-1-reverse-string",
"student_code": "def main(input_str):\n return input_str[::-1]",
"language": "python",
"user_id": "student-123"
}
}
๐ง Development
Project Structure
codelab-ai-platform/
โโโ src/ # MCP Server
โ โโโ index.ts # Main server entry
โ โโโ tools.ts # Core E2B tools
โ โโโ learning-tools.ts # Learning-specific tools
โ โโโ database.ts # SQLite database layer
โ โโโ security.ts # Security validation
โ โโโ ...
โโโ web/ # Next.js Frontend
โ โโโ src/app/ # App router pages
โ โโโ components/ # React components
โ โโโ ...
โโโ database/ # SQLite database
โโโ docs/ # Documentation
Available Scripts
# MCP Server
npm run build # Build TypeScript
npm run dev:mcp # Development mode
npm run start:mcp # Production mode
npm run test # Full functionality tests
npm run test-mock # Structure tests (no API key)
# Web Application
npm run dev:web # Next.js development
npm run build:web # Build for production
# Combined
npm run dev:all # Both servers simultaneously
๐ Deployment
MCP Server
The MCP server runs as a stdio-based service that AI agents connect to:
// Claude Desktop configuration
{
"mcpServers": {
"codelab-ai": {
"command": "node",
"args": ["/path/to/codelab-ai-platform/dist/index.js"],
"env": {
"E2B_API_KEY": "your-api-key"
}
}
}
}
Web Application
Deploy to any platform supporting Next.js:
- Vercel:
npm run build:web && vercel deploy
- Fly.io: Use provided Dockerfile
- Render: Connect GitHub repository
Production Considerations
- Set
NODE_ENV=production
for file logging - Configure reverse proxy for HTTPS termination
- Set up monitoring and observability
- Implement rate limiting and DDoS protection
๐ฎ Hackathon Roadmap
โ Completed (Current State)
- Extended MCP server with 13 tools total
- Learning-specific tools (evaluation, hints, progress tracking)
- SQLite database with sample challenges
- Next.js web application with beautiful UI
- Security validation and sandbox isolation
๐ง In Progress (Next 2-3 days)
-
Cequence AI Gateway Integration (Required for hackathon)
- Configure MCP proxy for secure agent access
- Add authentication middleware
- Implement observability hooks
-
Descope OAuth Authentication (Required for hackathon)
- User registration and login
- Role-based access control (student/instructor/interviewer)
- Session management
๐ฏ Planned (Final 2-3 days)
- Enhanced observability and monitoring
- Student/instructor portal implementations
- Interview mode functionality
- Real-time code editor with syntax highlighting
- Advanced analytics dashboard
- HTTPS deployment and production hardening
๐ Hackathon Compliance
This project meets all hackathon requirements:
โ Required Components
- MCP Server: โ 13 callable tools for AI agents
- Cequence AI Gateway: ๐ง Integration in progress
- OAuth Authentication: ๐ง Descope integration planned
- Public HTTPS Endpoint: ๐ง Deployment planned
- Agent Compatibility: โ Tested with Claude Desktop, MCP Playground
- Documentation: โ Comprehensive API docs and usage examples
๐ฏ Unique Value Proposition
- Educational Focus: First MCP server specifically designed for coding education
- Multi-Modal Learning: Combines human instruction with AI assistance
- Progressive Assessment: Intelligent hint system prevents students from getting stuck
- Interview Automation: Reduces hiring bias with standardized AI evaluation
- Security-First: Enterprise-grade security suitable for educational institutions
๐ API Reference
Learning Tools API
evaluate_solution
Evaluate student code against test cases:
{
"challenge_id": "challenge-1-reverse-string",
"student_code": "def main(s): return s[::-1]",
"language": "python",
"user_id": "student-123"
}
// Returns: score, feedback, test results
generate_hint
Generate progressive hints:
{
"challenge_id": "challenge-1-reverse-string",
"student_code": "def main(s): pass",
"hint_level": 1, // 1=subtle, 2=moderate, 3=direct
"user_id": "student-123"
}
// Returns: contextual hint based on current code
create_challenge
Create new coding challenges:
{
"title": "Find Maximum",
"description": "Find the largest number in an array",
"difficulty": "intermediate",
"language": "python",
"test_cases": [
{"input": "[1,2,3]", "expected_output": "3", "is_hidden": false}
]
}
[See full API documentation for all 13 tools...]
๐ค Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Commit changes:
git commit -m 'Add amazing feature'
- Push to branch:
git push origin feature/amazing-feature
- Open a Pull Request
๐ License
MIT License - see LICENSE file for details.
๐ Acknowledgments
- E2B: Secure sandbox execution environment
- Cequence: AI Gateway and security infrastructure
- Descope: Authentication and user management
- Model Context Protocol: Agent-to-application interface standard
Built for the Cequence Hackathon - Transforming education through secure AI agent collaboration ๐