MCP Coursera Learning Server
Allows searching Coursera courses, retrieving detailed syllabi, enrolling in courses, tracking learning progress, and extracting certificates and accomplishments.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
š MCP Coursera Learning Server for LibreChat
A custom, secure, and production-ready Model Context Protocol (MCP) server that provides Coursera learning assistant capabilities to LibreChat. Search courses, retrieve detailed syllabi, dynamically enroll in courses, track learning progress, and extract verified accomplishments and certificates.
This server is specifically optimized for multi-user environments, featuring secure personal credential storage, isolated browser sessions, and advanced Cloudflare Turnstile bypass mechanisms.
Changelog:
09/07/26:Browser Context Isolation: Enforced strict per-request browser context segregation to guarantee no session leakage between LibreChat users.
Multi-step Login Support: Refactored authentication to handle Coursera's 2-step login page (
Continue->Next).Cloudflare Turnstile Bypass: Implemented typing delays and natural pauses to simulate human behavior, alongside stealth JavaScript injections to mask automation flags.
Playwright Session State Persistence: Implemented saving cookies and storage states to disk per user (
sessions/{userId}_state.json), reducing subsequent request time to 7-10s.Smart Scroll with Retry Buffer: Re-implemented dynamic scrolling with 1.5s delays and 2-consecutive unchanged height checks to bypass slow lazy loading elements.
05/07/26:Force Overflow Auto: Programmatically injected scripts to override overflow hidden styles commonly applied by popup advertisements that block scrolling.
Anchor-Upwards Traversal Scraper: Overhauled scrapers to look for unique
/learn/and/accomplishmentsanchors and traverse parents, guaranteeing 100% data extraction.Certificates Categorization: Supports extracting certificate types (
SpecializationvsCourse) and public verification links from the/accomplishmentspage.Smart SQLite Caching: Implemented a Key-Value caching system with customizable TTL (3 hours for courses, 12 hours for certificates) and support for a
force_refreshoverride to ensure instantaneous API responses.
š Project Structure
mcp-coursera/
āāā src/
ā āāā index.ts # Express server & Streamable HTTP transport + tools router
ā āāā db.ts # SQLite database manager (credentials storage & key-value cache)
ā āāā encrypt.ts # AES-256-CBC encryption manager for user passwords
ā āāā ...
āāā data/ # [Git Ignored] Local database storage & debug screenshots
ā āāā coursera.db # SQLite Database
ā āāā login_failed.png # Automatic screenshot taken on login/anti-bot failure
āāā Dockerfile # Multi-stage optimized Playwright container
āāā docker-compose.yml # Standalone deployment file
āāā tsconfig.json # TypeScript compiler config
āāā package.jsonRelated MCP server: Canvas MCP Server
š ļø Tools Provided
Tool | Arguments | Required | Description |
|
|
| Search Coursera for courses matching keywords. |
|
|
| Extract syllabus, instructors, duration, skills, and certificate info. |
|
|
| Automatically enroll in a course (uses saved credentials if not passed). |
|
| None | Fetch enrolled courses, progress percentages, last accessed date, and status. |
|
| None | Extract titles, dates, issuer names, and public verification URLs of earned certificates. |
| None | None | Securely delete your saved Coursera credentials and all cached data. |
šø Screenshots & Usage Examples
š Searching Courses (search_courses)
Retrieve search results containing courses matching user keywords on Coursera:

š Extracting Course Syllabus (get_course_details)
Scrapes instructors, duration, skills, and weekly syllabus detail of any Coursera course:

š Tracking Progress (get_my_courses)
Fetches all enrolled courses with exact progress percentage metrics and completed status:

š Verifying Accomplishments & Certificates (get_certificates)
Extracts earned Course/Specialization certificates, dates, and official verification links:

š Multi-User Secure Authentication & Web Portal
Rather than hardcoding credentials globally, this server features a secure OAuth-like Web Portal where individual LibreChat users securely link their Coursera accounts:
1. Step-by-Step Account Linking Flow
Identifier Extraction: The server extracts the user's ID (
x-user-idheader) from the incoming chat request.Dynamic Link Generation: If no credentials exist in the database, the tool interrupts execution and prompts a secure, personalized portal URL:

AES-256-CBC Encryption: The user clicks the link and enters their credentials securely in the Web Portal. The server encrypts the password using an AES-256-CBC algorithm with a host-configured
ENCRYPTION_KEYbefore storing it in SQLite:
Successful Integration: Once saved, the user is notified of successful account link in LibreChat, with zero password leakage to the LLM (AI) or chat history:

ā” Smart SQLite Caching
Scraping dynamic web pages using a headless browser can take 15-20 seconds per request. To deliver an outstanding user experience, this server implements an SQLite-based Key-Value Cache:
Course Progress Cache: Cached for 3 hours (under key
"courses").Certificates Cache: Cached for 12 hours (under key
"certificates").Bypassing Cache (
force_refresh): Users can force a real-time scrape (e.g., when they just completed a course) by asking the AI to "refresh my progress" or "check again". The Agent will set theforce_refresh: trueparameter, bypassing the cache.
š”ļø Bypassing Cloudflare Turnstile
Coursera uses Cloudflare Turnstile to protect its login interface. Headless Chromium running inside a Docker container is highly prone to being flagged. This server bypasses detection using:
Human-like Interaction (Humanization):
Typing Delays: Instead of immediate form filling, characters are typed one-by-one with a delay of 150ms for emails and 200ms for passwords.
Natural Pauses: Natural delays of 1.5s - 3.5s are placed between gtyping and clicking actions to simulate human reaction times.
Stealth Script Injections:
Nullifies
navigator.webdriverto conceal browser automation.Mocks the
window.chromeobject and populates a dummy list ofnavigator.plugins.
Localization Alignment:
Configures
Localetoen-USandTimezonetoAsia/Ho_Chi_Minh(customizable) to force the Coursera interface to English, ensuring high accuracy text pattern matching.
š Installation & Deployment (Docker Compose)
This server is designed to run alongside LibreChat as a sibling service.
Step 1: Directory Setup
libre/
āāā LibreChat/ ā LibreChat repository root
ā āāā docker-compose.override.yml
ā āāā librechat.yaml
āāā mcp-coursera/ ā This MCP server repository
āāā src/
āāā Dockerfile
āāā .envStep 2: Configure Environment Variables
Copy .env.example to .env inside mcp-coursera/ and configure:
PORT=3014
ENCRYPTION_KEY=generate_a_secure_32_character_hex_key_here
SERVER_URL=http://localhost:3014Step 3: Add to docker-compose.override.yml
Add the mcp-coursera service to your LibreChat/docker-compose.override.yml:
services:
mcp-coursera:
container_name: mcp-coursera
build: ../mcp-coursera
restart: always
env_file:
- ../mcp-coursera/.env
environment:
NODE_ENV: ${NODE_ENV:-production}
PORT: 3014
ports:
- "3014:3014" # Maps Web Portal to host
volumes:
- ../mcp-coursera/data:/app/data # Persists database and screenshot data
networks:
- defaultStep 4: Register in librechat.yaml
Add the server registration to your librechat.yaml:
mcpSettings:
allowedDomains:
- mcp-coursera
mcpServers:
coursera-learning:
type: streamable-http
url: http://mcp-coursera:3014/mcp
title: Coursera Learning MCP
description: Access Coursera learning progress, certificates, and course enrollment.
timeout: 120000 # Increased timeout to handle multi-step login and navigation retry
headers:
x-user-id: '{{LIBRECHAT_USER_ID}}'š” Recommended Agent System Instructions
Paste the following into your Agent's Instructions / System Prompt in LibreChat:
You are a Learning Assistant with access to Coursera tools.
1. Checking Progress & Certificates:
When asked to check course progress, certificates, or enroll, invoke the respective tools.
2. Handling "Authentication required" Errors:
If a tool returns an error message like: "Authentication required. Please link your Coursera account securely at: http://...", you MUST present this exact URL returned by the tool to the user as a clickable markdown link. DO NOT replace the userId parameter with placeholders like "xxxx" or "unknown", use the real dynamic URL provided.
3. Security Warning:
NEVER ask the user to type their Coursera password directly into the chat. If they try to do so, politely reject it and instruct them to use the secure link instead.
4. Cache Refreshing:
Default calls to get_my_courses and get_certificates use cached data. If the user explicitly asks to "update", "refresh", or "check again", set the `force_refresh` parameter to `true`.
5. Unlinking Account:
If the user wants to log out or remove their credentials, invoke the `unlink_coursera_account` tool.š§ Debugging & Troubleshooting
Screenshot Debugging
If a tool execution fails or experiences an anti-bot challenge:
Open the local directory
mcp-coursera/data/on the host machine.Open
login_failed.pngto view the exact visual state of the browser.
Inspecting logs
docker logs -f mcp-courseraTool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogā¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Run the Geduk LMS from an AI assistant: courses, sessions, enrolments, users and catalogue.
Teachable MCP server for ChatGPT, Claude and any AI agent: update lecture, create coupon, send email, reply to comment and list enrollments in your own Teachable account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Teachable yourself; Cotlet does not store your password and you need no Teachable API key. About the official Teachable API: Teachable has a public API, but only on the Growth plan and up, and it reads courses and lecture content and manages users, enrollments, pricing plans and transactions (checked 11 Oct 2026). Lesson editing, coupons, emails to students and comments are not in it. Setup and FAQ: https://cotlet.dev/integrations/teachable-api-mcp-server
Udemy MCP server for ChatGPT, Claude and any AI agent: create coupon, update course, send announcement and get revenue report in your own Udemy account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Udemy yourself; Cotlet does not store your password and you need no Udemy API key. About the official Udemy API: Udemy has an Instructor API that lists your courses, reads reviews, and reads and answers Q&A questions and direct messages (checked 12 Oct 2026). It has no coupons, announcements, review responses, course edits or revenue. Setup and FAQ: https://cotlet.dev/integrations/udemy-api-mcp-server
Absorb LMS MCP server for ChatGPT, Claude and any AI agent: list users, list course enrollments, list overdue learners, approve enrollment request, enroll users in a course, message learners, create user and deactivate user in your own Absorb LMS account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Absorb LMS yourself; Cotlet does not store your password and you need no Absorb LMS API key. About the official Absorb LMS API: Absorb LMS has an Integration API, a REST API with JSON for learners, courses, departments and grades, but it needs a private key tied to your portal that your Absorb account team provides, and your own code (checked 20 Oct 2026). Absorb's Aura MCP for Claude and ChatGPT is planned for 27 Oct 2026 and is read and answer only. Setup and FAQ: https://cotlet.dev/integrations/absorb-lms-api-mcp-server
Related MCP Servers
- FlicenseAqualityNot gradedmaintenanceEnables interaction with Canvas LMS courses and assignments directly from your LLM, allowing you to retrieve, search, and summarize course information, check due dates, and access assignment details without leaving your AI assistant.43,290 npm-
- FlicenseNot gradedqualityCmaintenanceConnects Canvas LMS to AI assistants, enabling users to list courses and retrieve assignment details through natural language. It features secure multi-institution support with encrypted token storage and a simplified setup process for students.2-
- AlicenseAqualityDmaintenanceEnables users to search for courses, view detailed syllabus information, and manage enrollments and progress on Coursera. It supports automated interactions including viewing certificates through local or cloud-based browser environments using Playwright.513 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to programmatically interact with Coursera, including enrolling in courses, completing lectures, solving quizzes, submitting assignments, earning certificates, and pushing them to LinkedIn.1MIT