Integrates with Telegram as a messaging gateway to facilitate communication between AI agents and family members, allowing for notifications regarding grades, homework reminders, and student requests.
Learning Hub MCP
Beta — fully functional, tested with one family. Feedback and bug reports welcome via GitHub Issues.
MCP server for student learning workflow with SQLite database. Each instance serves one student — deploy a separate instance per child for isolated, focused AI tutoring.
Features
Subjects - school subjects with multi-country support (UA, CZ, DE, etc.)
Grades - grade tracking with 5-point European scale (1=best, 5=worst)
Topics - subject topics for improvement tracking
Homework - assignment tracking with deadlines
Bonus Tasks - motivational tasks that reward game minutes
Game Minutes - immutable transaction ledger for tracking earned/spent game time
Books - textbook library with markdown summaries and content indexing
Topic Reviews - reinforcement tracking for weak topics
Escalation - bad grade notifications for parents
Instruction Tools - markdown algorithms that guide AI agents through workflows
Sync Providers - pluggable sync framework (EduPage, PRONOTE)
Secrets - secure credential storage for sync providers
Installation
# Install dependencies
poetry install
# Initialize database
poetry run alembic upgrade headConfiguration
Database defaults to ./data/learning_hub.db. Override via environment variable:
DATABASE_URL=sqlite+aiosqlite:///./data/learning_hub.dbSync provider credentials (EduPage, PRONOTE, etc.) are stored in the secrets table and managed via MCP tools (set_secret, list_secrets).
Config System (SQLite)
Runtime configuration stored in the configs table. Managed via MCP tools (get_config, set_config, list_configs). Use check_system_readiness to verify all required configs are set.
Entries with defaults (seeded by migration)
Key | Default | Description |
|
| Grade → game minutes conversion |
|
| Repetitions needed per grade before TopicReview is closed |
|
| Bonus minutes for on-time homework |
|
| Penalty minutes for overdue homework |
|
| Max concurrent pending bonus tasks |
|
| Max completed bonus tasks in rolling 7 days |
|
| Default time when deadline has only a date |
|
| Whether initial setup has been completed |
|
| Whether base cron jobs have been created |
|
| Whether a sync cron job has been created after first successful sync |
Required entries (must be set before use)
Key | Description |
| Folder where users place book files for processing |
| Base folder for storing processed books |
| Path to the issue log file |
| Language for communication with the family |
Usage
Run MCP Server
poetry run learning-hub-mcpMCP Configuration
Add to your MCP client config:
{
"mcpServers": {
"learning-hub": {
"command": "poetry",
"args": ["run", "learning-hub-mcp"],
"cwd": "/path/to/learning-hub-mcp"
}
}
}MCP Tools (78 total)
Subjects
create_subject- create a new school subjectlist_subjects- list subjects (filter: school, is_active)update_subject- update subject details
Topics
create_topic- create a topic for a subjectlist_topics- list topics (filter: subject_id, is_open)close_topic- close topic (reason: resolved/skipped/no_longer_relevant)
Grades
add_grade- add a grade (1-5 scale, 1=best), auto-creates minute transactionlist_grades- list grades (filter: subject, date range, school)
Bonus Tasks
create_bonus_task- create a bonus task linked to a topic (validates limits)list_bonus_tasks- list tasks (filter: status, topic)get_bonus_task- get a bonus task by IDget_latest_bonus_task- get the most recent bonus taskapply_bonus_task_result- complete task, record grade, and update topic reviewscancel_bonus_task- cancel a taskcheck_pending_bonus_task- check if there's a pending task to reuse
Minute Transactions
get_balance- get current game minutes balanceadd_played_minutes- record played game time (deducts from balance)create_ad_hoc_transaction- create manual bonus or penaltylist_transactions- list transactions (filter: date range, type)
Homework
create_homework- create homework assignmentlist_homeworks- list homework (filter: status, subject)complete_homework- mark homework as doneupdate_homework- update homework detailsclose_overdue_homeworks- close overdue homework, auto-creates penalty transactionget_pending_homework_reminders- get reminders due (D-1, D-2)mark_homework_reminders_sent- mark reminders as sent
Books
add_book- add a book to the librarylist_books- list books (filter: subject, has_summary)get_book- get a book by IDupdate_book- update book detailsdelete_book- delete a book
Topic Reviews
list_topic_reviews- list topic reviews (filter: subject, status)get_pending_reviews_for_topic- get pending reviews for a topicmark_topic_reinforced- mark review as reinforcedincrement_topic_repeat_count- increment repeat count for a reviewget_priority_topic_for_review- pick a priority topic from top-4
Family Members
create_family_member- add a family member (student/parent/tutor/admin)list_family_members- list members (filter: role)update_family_member- update member detailsdelete_family_member- delete a memberget_student- get the student record
Gateways
create_gateway- register a messaging channel (Telegram, etc.)list_gateways- list gateways (filter: family_member, channel)update_gateway- update gateway detailsdelete_gateway- delete a gatewaylookup_gateway- find gateway by platform + external ID
Configs
get_config- get a config value by keyset_config- set a config value (existing keys only)list_configs- list all config entries
Secrets
set_secret- set a secret value (credentials, API keys)list_secrets- list secrets (keys only, values never exposed)
Sync Providers
list_sync_providers- list all sync providers with statusupdate_sync_provider- activate/deactivate, link to schoolrun_sync- run sync for all active providers (or a specific one)find_edupage_subdomain- detect EduPage school subdomain from stored credentials
Readiness
check_system_readiness- check if the system is properly configured (active schools, required configs)
Escalation
get_grades_pending_escalation- get grades needing parent notificationmark_grades_escalated- mark grades as escalated (parent was notified)
Instruction Tools
get_grade_escalation_instructions- escalate bad grades to tutor/adminget_learning_system_instructions- master instruction: full system rulesget_student_request_router_instructions- classify student request (A/B/C scenarios)get_bonus_task_assignment_instructions- assign a new bonus taskget_submission_routing_instructions- route submitted work to evaluatorget_bonus_task_evaluation_instructions- evaluate completed bonus taskget_homework_evaluation_instructions- evaluate homework submissionget_book_lookup_instructions- find and deliver textbook pagesget_books_workflow_instructions- process and register new booksget_homework_manual_instructions- manually add homework (parent only)get_grade_manual_instructions- manually add a grade (adult only)get_student_content_policy_instructions- content safety filtering for external student contentget_topic_review_curation_instructions- curate and close stale topic reviewsget_base_crons_setup_instructions- instructions for setting up base cron jobs
OpenClaw Bridge Plugin
The learning-hub-bridge/ directory contains a TypeScript plugin that makes all MCP tools available as native OpenClaw agent tools.
Why
OpenClaw doesn't support MCP servers natively. Without the bridge, the agent would need exec + mcporter — slow (~3s per call), buggy (mcporter serialization issues with lists), and invisible to the model (tools not in tool list).
How it works
On gateway startup, the bridge spawns the Python MCP server as a child process (STDIO)
Discovers all tools via
client.listTools()(MCP protocol)Registers each as a native OpenClaw tool via
api.registerTool()with prefixlearning_hub_Proxies
execute()→client.callTool(), merging multiple TextContent blocks into a single JSON arrayAuto-reconnects if the Python process dies
After this, the model sees learning_hub_list_subjects, learning_hub_add_grade, etc. directly in its tool list.
Deployment
The bridge must be installed as an OpenClaw extension. The source lives in learning-hub-bridge/ inside this repo, but OpenClaw loads plugins from ~/.openclaw/extensions/<pluginId>/.
Step 1. Copy the bridge to extensions:
cp -r /path/to/learning-hub-mcp/learning-hub-bridge ~/.openclaw/extensions/learning-hubStep 2. Install dependencies:
cd ~/.openclaw/extensions/learning-hub
npm installStep 3. Add plugin config to openclaw.json:
{
"plugins": {
"entries": {
"learning-hub": {
"enabled": true,
"config": {
"command": "/bin/bash",
"args": ["-lc", "cd /path/to/learning-hub-mcp && exec .venv/bin/learning-hub-mcp"],
"cwd": "/path/to/learning-hub-mcp",
"toolPrefix": "learning_hub"
}
}
}
}
}Step 4. Allow tools for the agent in openclaw.json:
{
"agents": {
"list": [
{
"id": "main",
"tools": {
"alsoAllow": ["learning-hub"]
}
}
]
}
}Step 5. Restart gateway:
openclaw gateway restartConfig options
Option | Description | Default |
| Command to start MCP server | (required) |
| Arguments for the command | (required) |
| Working directory for MCP server process | — |
| Prefix for registered tool names |
|
Updating after MCP changes
When new tools are added to the MCP server, the bridge picks them up automatically on gateway restart — no bridge code changes needed. Just restart:
openclaw gateway restartDevelopment
# Run tests
poetry run pytest
# Run tests with coverage
poetry run pytest --cov=learning_hub
# Lint code
poetry run ruff check .
# Fix lint issues
poetry run ruff check --fix .Known Limitations
Tested with a single family (one student, two schools: EduPage CZ + UA)
PRONOTE sync implemented but minimally tested
SQLite only — designed for single-family self-hosted use
Requires OpenClaw as the AI agent runtime
Edge cases with diverse school configurations are likely not yet covered
License
This server cannot be installed
Resources
Looking for Admin?
Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.