Codlab-ai-platform

parth012001/Codlab-ai-platform

3.2

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.

Tools
13
Resources
0
Prompts
0

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)
  1. execute_python - Execute Python code in sandboxed environment
  2. execute_javascript - Execute JavaScript/Node.js code
  3. create_file - Create files in sandbox
  4. read_file - Read files from sandbox
  5. list_files - List directory contents
  6. install_packages - Install Python (pip) or Node.js (npm) packages
  7. get_sandbox_info - Get sandbox status and resource information
Learning & Assessment Tools (6) โœจ NEW
  1. evaluate_solution - Grade code submissions against test cases
  2. generate_hint - AI-powered progressive hint generation
  3. create_challenge - Dynamic coding challenge creation
  4. track_progress - Learning analytics and progress tracking
  5. conduct_interview - Automated technical interview sessions
  6. get_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

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:

  1. Reverse a String (Beginner, Python)

    • Learn basic string manipulation
    • Test with multiple inputs including edge cases
  2. Fibonacci Sequence (Intermediate, Python)

    • Practice algorithms and recursion
    • Performance optimization challenges
  3. Sum Array Elements (Beginner, JavaScript)

    • Array operations and reduce functions
    • Handle empty arrays and negative numbers

๐ŸŽฎ How to Use

For Students

  1. Visit the Student Portal at http://localhost:3000/student
  2. Choose a coding challenge based on your skill level
  3. Write your solution in the integrated code editor
  4. Get AI-powered hints when stuck (3 levels available)
  5. Submit for automated grading with detailed feedback

For Instructors

  1. Access Instructor Dashboard at http://localhost:3000/instructor
  2. Create new challenges with custom test cases
  3. Monitor student progress and performance analytics
  4. Review submission history and learning patterns

For Interviewers

  1. Use Interview Mode at http://localhost:3000/interview
  2. Set candidate experience level and interview type
  3. AI automatically generates appropriate questions
  4. 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

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit changes: git commit -m 'Add amazing feature'
  4. Push to branch: git push origin feature/amazing-feature
  5. 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 ๐Ÿš€