Spaces:
Sleeping
Sleeping
File size: 5,647 Bytes
c466cf2 7867e85 c466cf2 7867e85 c466cf2 7867e85 c466cf2 7867e85 c466cf2 7867e85 c466cf2 7867e85 c466cf2 7867e85 c466cf2 7867e85 c466cf2 7867e85 c466cf2 7867e85 c466cf2 7867e85 f9f5b1d 7867e85 411f252 7867e85 411f252 7867e85 c466cf2 f9f5b1d 411f252 71c0fd0 7867e85 411f252 7867e85 411f252 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
# TutorX-MCP Server
A comprehensive Model Context Protocol (MCP) server for educational AI tutoring as specified in the Product Requirements Document (PRD).
## Overview
TutorX-MCP is an adaptive, multi-modal, and collaborative AI tutoring platform that leverages the Model Context Protocol (MCP) for tool integration and Gradio for user-friendly interfaces. It provides a range of educational features accessible via both MCP clients and a dedicated web interface.

## Features
### Core Features
- **Adaptive Learning Engine**
- Comprehensive concept graph
- Dynamic skill assessment and tracking
- Personalized learning paths
- **Assessment Suite**
- Automated quiz and problem generation
- Step-by-step solution analysis
- Plagiarism and similarity detection
- **Feedback System**
- Contextual error analysis and suggestions
- Error pattern recognition
- **Multi-Modal Interaction**
- Text-based Q&A with error pattern recognition
- Voice recognition with analysis
- Handwriting recognition and digital ink processing
### Advanced Features
- **Neurological Engagement Monitor**
- Attention, cognitive load, and stress detection
- **Cross-Institutional Knowledge Fusion**
- Curriculum alignment with national standards
- Content reconciliation
- **Automated Lesson Authoring**
- AI-powered content generation
## Getting Started
### Prerequisites
- Python 3.12 or higher
- Dependencies as listed in pyproject.toml:
- mcp[cli] >= 1.9.3
- gradio >= 4.19.0
- numpy >= 1.24.0
- pillow >= 10.0.0
### Installation
```bash
# Clone the repository
git clone https://github.com/yourusername/tutorx-mcp.git
cd tutorx-mcp
# Using uv (recommended)
uv install
# Or using pip
pip install -e .
```
### Running the Server
You can run the server in different modes:
```bash
# MCP server only
python run.py --mode mcp
# Gradio interface only
python run.py --mode gradio
# Both MCP server and Gradio interface
python run.py --mode both
# Custom host and port
python run.py --mode mcp --host 0.0.0.0 --port 9000
```
By default, the MCP server will run at http://localhost:8000 and the Gradio interface at http://127.0.0.1:7860.
## MCP Tool Integration
The server exposes the following MCP tools and resources:
### Tools
- **Core Features**
- `assess_skill`: Evaluate student's skill level on specific concepts
- `generate_quiz`: Create quizzes for specific concepts
- `analyze_error_patterns`: Find common student mistakes
- **Assessment**
- `create_assessment`: Generate complete assessments
- `grade_assessment`: Score student responses
- `check_submission_originality`: Detect plagiarism
- **Advanced Features**
- `analyze_cognitive_state`: Process EEG data
- `align_content_to_standard`: Match content to curriculum standards
- `generate_lesson`: Create complete lesson plans
- **Multi-Modal**
- `text_interaction`: Process text queries
- `voice_interaction`: Handle voice input
- `handwriting_recognition`: Process handwritten input
### Resources
- `concept-graph://`: Knowledge concept graph
- `learning-path://{student_id}`: Personalized learning paths
- `curriculum-standards://{country_code}`: National curricular standards
- `student-dashboard://{student_id}`: Student performance dashboard
## Project Structure
```
tutorx-mcp/
βββ main.py # MCP server implementation
βββ client.py # MCP client for calling server tools
βββ app.py # Gradio web interface
βββ run.py # Runner script for different modes
βββ tests/ # Test suite
β βββ test_mcp_server.py # MCP server tests
β βββ test_client.py # Client tests
β βββ test_utils.py # Utility function tests
βββ utils/ # Utility modules
β βββ multimodal.py # Multi-modal processing utilities
β βββ assessment.py # Assessment and analytics functions
βββ pyproject.toml # Project dependencies
βββ run_tests.py # Script to run all tests
βββ README.md # Project documentation
```
## Architecture
The TutorX-MCP follows a layered architecture:
1. **MCP Server (main.py)**: Core backend that exposes educational tools and resources through the Model Context Protocol.
2. **MCP Client (client.py)**: Client library that communicates with the MCP server through HTTP requests, translating method calls into MCP protocol interactions.
3. **Gradio Interface (app.py)**: Web-based user interface that uses the client to communicate with the MCP server.
This separation of concerns allows:
- MCP clients (like Claude Desktop App) to directly connect to the MCP server
- The web interface to interact with the server using standard HTTP
- Clear boundaries between presentation, business logic, and tool implementation
## Testing
The project includes a comprehensive test suite:
```bash
# Install test dependencies
uv install -e ".[test]"
# Run test suite
python run_tests.py
```
## Documentation
- [MCP Protocol](docs/mcp.md): Details about the Model Context Protocol
- [Product Requirements](docs/prd.md): Original requirements document
- [SDK Documentation](docs/sdk.md): Client SDK usage
## Contributing
We welcome contributions to the TutorX-MCP project! Please read our [Contributing Guide](CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |