@ourafrica/course-builder-mcp
v0.2.0
Published
MCP server that lets an author build OurAfrica courses with their own Claude subscription (Claude Desktop / Claude Code / claude.ai).
Readme
OurAfrica Course-Builder MCP Server
Build OurAfrica courses with your own Claude subscription — no per-token API key.
This is a Model Context Protocol server. You run it inside your own AI client (Claude Desktop, Claude Code, or a claude.ai connector). Your Claude subscription does the thinking; this server exposes tools that create and edit courses in OurAfrica on your behalf. You just chat: "Build me a beginner course on food safety with 4 modules."
Because the intelligence runs in your client, there is nothing to pay per token and no provider API key to manage — it uses the Claude (or other MCP-capable) subscription you already have.
What you need
- An OurAfrica account with the Content Author role.
- Node.js 18 or newer on your machine.
- A course-builder MCP token. In the OurAfrica dashboard go to
Courses → New course → Build with your AI assistant → Create token, and copy the
oa_pat_…value (shown once).
Configure your AI client
The server is launched by your client with two environment variables:
| Variable | Required | Default |
| --- | --- | --- |
| OURAFRICA_MCP_TOKEN | yes | — (your oa_pat_… token) |
| OURAFRICA_API_URL | no | https://api.ourafrica.co.zw |
| OURAFRICA_MCP_TIMEOUT_MS | no | 60000 |
Claude Desktop
Edit claude_desktop_config.json (Settings → Developer → Edit Config), then restart Claude
Desktop:
{
"mcpServers": {
"ourafrica-course-builder": {
"command": "npx",
"args": ["-y", "@ourafrica/course-builder-mcp"],
"env": {
"OURAFRICA_MCP_TOKEN": "oa_pat_your_token_here"
}
}
}
}Claude Code
claude mcp add ourafrica-course-builder \
--env OURAFRICA_MCP_TOKEN=oa_pat_your_token_here \
-- npx -y @ourafrica/course-builder-mcpclaude.ai (web) custom connector
claude.ai connectors are remote (HTTP) only — they cannot launch this local stdio server. To use it from claude.ai it must be deployed as a hosted HTTP MCP endpoint; that is a separate deployment (see Roadmap below). For now use Claude Desktop or Claude Code.
Running from source (before it is published to npm)
cd dashboard/mcp-server
npm install
npm run buildThen point your client's command/args at the built entry instead of npx:
{
"command": "node",
"args": ["C:/path/to/dashboard/mcp-server/dist/index.js"],
"env": { "OURAFRICA_MCP_TOKEN": "oa_pat_your_token_here" }
}Tools
Build a whole thing in one call (preferred — never leaves a shell):
| Tool | What it does |
| --- | --- |
| create_course_tree | Build an ENTIRE course — course + every module + every lesson (with Markdown body) + quizzes — in one call. Returns all ids + any per-item errors. |
| create_module_tree | Add a full module (its lessons + optional quiz) to an existing course. |
Targeted create / read / update:
| Tool | What it does |
| --- | --- |
| ourafrica_whoami | Confirm which account the token belongs to |
| list_my_courses / get_course | List your courses / fetch one with its full tree |
| create_course / update_course | Create an empty course / edit its fields |
| set_course_pricing | Set price + subject |
| list_modules / create_module / update_module | Manage sections |
| get_lesson / create_lesson / update_lesson | Manage lessons + their Markdown body |
| create_quiz | Create a quiz with questions + options in one call |
| update_quiz / add_quiz_question / update_quiz_question / update_quiz_option | Edit an existing quiz |
| search_library | Semantic search over existing lessons |
Publishing — a course is REFUSED unless it clears the quality gate:
| Tool | What it does |
| --- | --- |
| lint_course | The publish gate, read without publishing: { publishable, issues[], metrics }. Call this BEFORE publish_course. |
| publish_course_lessons | Publish every draft lesson in a course. Lessons are created as drafts and block the course until published. |
| lint_lesson / publish_lesson | Check or publish a single lesson. |
| publish_course | Publish a DRAFT course (only when you ask, and only once lint_course says publishable). |
| archive_course | Remove a course from the catalogue. |
Graded assessments (submitted work marked against a rubric — not a quiz):
| Tool | What it does |
| --- | --- |
| create_assessment | Create one, with its rubric criteria in the same call. Every course needs ≥1 to publish; advanced courses need a capstone. |
| list_assessments / get_assessment / update_assessment | Read and edit them |
| add_rubric_item / list_rubric_items | Manage the marking criteria |
| delete_assessment / delete_rubric_item | Permanent, confirm: true gated |
Reorder: reorder_modules, reorder_lessons, reorder_quiz_questions, reorder_quiz_options (pass all ids in the new order).
Delete (permanent, gated): delete_course, delete_module, delete_lesson, delete_quiz, delete_quiz_question, delete_quiz_option, delete_assessment, delete_rubric_item. Each refuses unless you pass confirm: true — the assistant will tell you exactly what will be deleted and ask before doing it.
Two MCP resources (ourafrica://guide/authoring, ourafrica://schema/course) and a
build-a-course prompt are also exposed so your model builds complete courses in the
platform's house style.
Security
- A token authenticates as you and is limited to course-authoring endpoints; it cannot touch billing, org admin, or mint more tokens.
- The plaintext token is shown once — store it only in your client's config
env. - Revoke a token any time on the Build with your AI assistant page. Revoked or expired tokens stop working immediately.
- Newly built courses stay in DRAFT until you (or the model, at your explicit request) publish them.
- A token cannot reach billing, org admin or learner submissions — only the course-authoring surface (courses, modules, lessons, assets, quizzes, assessments and their rubrics).
Publishing (maintainers)
Published to npm as @ourafrica/course-builder-mcp under the ourafrica org.
- Release a new version: bump
versioninpackage.jsonand merge tomain. The workflow.github/workflows/publish-mcp.yml(in the dashboard repo) builds, tests, andnpm publishes — but only when the version is one npm doesn't already have. - Secret: the workflow uses the repo secret
NPM_TOKENonkudzaiprichard/ourafrica_dashboard— an npm Granular Access Token, Read+write on the@ourafricascope, 2FA-bypass on, 90-day expiry (created 2026-07-16 → expires ~2026-10-14). When it expires, publishes fail until it's rotated (the app is unaffected). - Rotate the token / full ops details: see
COURSE_BUILDER_MCP.mdat the dashboard repo root.
Roadmap
- Hosted HTTP transport so claude.ai / ChatGPT remote connectors can use it directly.
- Media attach (image/video by URL) and glossary tools — video minutes are a blocking publish-gate floor that currently only the dashboard can satisfy.
