Skip to main content
Glama

getcourse-mcp

Automate a GetCourse account from an AI agent — grant lesson/training access, manage users and groups — with no official API.

npm version license MCP TypeScript PRs welcome

English · Русский

Why

GetCourse has no public API for the things admins do every day — opening a lesson for a student, adding someone to a training, moving users between groups. Those actions live only in the admin UI.

getcourse-mcp exposes them as MCP tools. It drives a browser you're already logged into over CDP, so it reuses your real session cookie and CSRF token — no scraping of passwords, no fragile API keys. An AI agent (Claude, etc.) can then find a user, inspect their groups and grant access in one turn.

  • 🔑 Uses your live session — connects over CDP to a logged-in Chromium/Yandex browser

  • 👥 Access by groups — the GetCourse model: training/lesson access = group membership

  • 🧩 5 focused tools — status, find user, list groups, check membership, add to groups

  • 🪶 TypeScript, ESM — thin, strict, MIT, no account secrets in the repo

Related MCP server: Coursera MCP Server

How access works in GetCourse

Access to a training (and its lessons) is granted by group membership. "Full access" to a course often means membership in a Module 1 group plus a group that starts the drip schedule (module 1 now, the rest on a timer). To "give access like another student", read their groups and reproduce them:

gc_find_user            # student@example.com → id, name
gc_check_membership     # which of these groups is student X in?
gc_add_user_to_groups   # add student Y to the same groups

Requirements

  1. A Chromium-based browser (Chrome / Yandex) launched with a debug port on a separate profile, logged into your account:

    browser.exe --remote-debugging-port=9222 --user-data-dir=C:\gc-cdp-profile
  2. Node ≥ 18.

Setup

npm install
cp .env.example .env      # set GETCOURSE_BASE_URL (and GETCOURSE_CDP_URL if not :9222)
npm run build

Register it with your MCP client (see .mcp.json.example):

{
  "mcpServers": {
    "getcourse": {
      "command": "node",
      "args": ["dist/index.js"],
      "env": { "GETCOURSE_BASE_URL": "https://your-account.getcourse.ru" }
    }
  }
}

Tools

Tool

Purpose

gc_status

Check that an admin is logged in in the CDP browser.

gc_find_user

Find a user by email → id, name, type, status.

gc_list_training_groups

Access groups of a training (id + name).

gc_check_membership

Is a user in the given groups? (instant, via the user list)

gc_add_user_to_groups

Add a user to groups = grant access. dryRun previews without committing.

Usage

Run the MCP server over stdio, or call a tool directly for scripting:

node dist/index.js                                   # MCP (stdio)

npx tsx src/run.ts gc_find_user '{"email":"user@example.com"}'
# → Found: Jane Doe | user@example.com | student | active | id: 100200300

npx tsx src/run.ts gc_add_user_to_groups \
  '{"email":"user@example.com","groupIds":["100001","100002"]}'
# → OK [done] import submitted

npx tsx src/run.ts gc_check_membership \
  '{"email":"user@example.com","groups":[{"id":"100001","name":"Module 1"}]}'
# → ✅ Module 1 (100001)

Implementation notes

  • Granting access (gc_add_user_to_groups) uses the bulk Add users form (/pl/user/user/import?type=text): email + selected groups. For an existing user the "overwrite on match" flag is required (overwriteExisting, default true), otherwise the groups are not applied — the import carries only the email, so no profile data is touched.

  • A direct mass action exists (POST /pl/logic/operation/prepare?operationType=user_addtogroup), but in the current UI it is a selection-builder wizard — a candidate to wire up as an alternative path.

  • Membership is checked through the user list filtered by a user_ingrouprule rule (params.value.selected_id), which reflects membership immediately (the training student list mirrors access asynchronously and is not reliable for verification).

Contributing

Contributions are welcome — open an issue or a PR. Good first ideas:

  • direct user_addtogroup mass action instead of the import form

  • a "copy all groups from one student to another" tool

  • revoking access (gc_remove_user_from_groups)

  • exporting students; test coverage

  1. Fork and branch: git checkout -b feature/my-change

  2. npm install, make changes; npm run build and npx tsc --noEmit must pass

  3. Never commit secrets (cookies/passwords/.env) or real account data

  4. Open a PR describing what and why

Security

Secrets (cookies/passwords) live only in the browser and your environment — never in the repo. .env and a local .mcp.json are git-ignored.

License

MIT

A
license - permissive license
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/skiddgoddamn/getcourse-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server