Khan Academy MCP Server
The Khan Academy MCP Server lets AI assistants search, browse, and retrieve educational content from Khan Academy without requiring an API key.
Search for videos, articles, exercises, and courses using keyword queries (e.g., "photosynthesis", "quadratic formula")
List subjects and courses: Use
list_subjectsto see top-level subjects and popular courses as a starting pointBrowse topic hierarchies: Navigate subject/topic trees by slug and depth using
get_topic_treeGet content details: Retrieve specific videos, articles, or exercises by slug or URL with
get_contentRetrieve course structures: Fetch full courses including units, lessons, and content items with
get_courseAccess video transcripts: Get plain text or timestamped transcripts via
get_transcript, supporting Khan Academy URLs, YouTube URLs, or video IDs with multi-language supportExplore specific content types: Dedicated tools for articles, lessons, exercises, and quizzes (
get_article,get_lesson,get_exercise,get_quiz)Embed videos and build study guides: Use
embed_videofor video metadata andstudy_guideto create structured study plansFollow predefined workflows: Chain tools together for topic exploration, course overviews, study sessions, and test preparation
Allows AI assistants to search, browse, and read Khan Academy's educational content, including videos, articles, exercises, and full course structures.
Enables fetching video transcripts and captions from YouTube videos associated with educational content.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Khan Academy MCP Server search for articles and videos about photosynthesis"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Khan Academy MCP Server
An open-source Model Context Protocol (MCP) server that lets AI assistants search, browse, and read Khan Academy's educational content. No API key required.
Quick Start
npx khanmcpOr install globally:
npm install -g khanmcp
khanacademy-mcpRelated MCP server: Reddit MCP Server
Claude Desktop Configuration
Add this to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"khanacademy": {
"command": "npx",
"args": ["-y", "khanmcp"]
}
}
}Tools
Tool | Description |
| Search Khan Academy for videos, articles, exercises, and courses |
| List all top-level subjects and popular courses |
| Browse the subject/topic hierarchy by slug with configurable depth |
| Get details about a specific content item (video, article, exercise) |
| Get full course structure with units, lessons, and content items |
| Get video transcripts (timestamped or full text) |
| Read the full text content of a Khan Academy article |
| Get all content items in a specific lesson |
| Embed a video with thumbnail image, metadata, chapters, and optional transcript |
| Get exercise details with related study content (videos, articles) and practice URL |
| List all quizzes, unit tests, and course challenge for a course with prep material |
| Build a structured study plan for any topic |
Tool Details
search
query: string — Search query (e.g., "photosynthesis", "quadratic formula")
limit?: number — Max results (1-30, default: 10)
kind?: string — "all", "video", "article", or "exercise" (default: "all")list_subjects
No parameters. Returns all top-level subjects and popular courses.
get_topic_tree
slug: string — Topic slug (e.g., "math", "science/biology")
depth?: number — Levels to fetch (0-3, default: 1)get_content
slug: string — Content slug or full URLget_course
slug: string — Course slug or URL (e.g., "math/algebra")get_transcript
slug: string — Video slug, KA URL, YouTube URL, or YouTube ID
language?: string — Language code (default: "en")
format?: string — "full", "timestamped", or "both" (default: "full")get_article
slug: string — Article slug or full URL (articles have "/a/" in the path)get_lesson
slug: string — Lesson slug or full URLembed_video
slug: string — Video slug, KA URL, YouTube URL, or YouTube ID
include_transcript?: bool — Include the full transcript (default: false)
language?: string — Language code for transcript (default: "en")get_exercise
slug: string — Exercise slug or full URL (exercises have "/e/" in the path)get_quiz
slug: string — Course slug or URL (e.g., "math/algebra")
kind?: string — "all", "quiz", "unit-test", or "course-challenge" (default: "all")study_guide
topic: string — Topic or concept to study (e.g., "quadratic equations")
depth?: string — "quick", "standard", or "comprehensive" (default: "standard")Workflows
Topic exploration:
list_subjects → get_topic_tree → get_course → get_lesson → get_content / get_transcript
Quick lookup:
search → get_content or get_article → get_transcript (if video)
Study session:
search or get_topic_tree → study_guide for review, then get_article / get_transcript for deep dives
Course overview:
get_course → pick a unit/lesson → get_lesson → get_content
Test prep:
get_quiz → review covered lessons → get_exercise for practice → get_transcript / get_article to study weak areas
Development
git clone https://github.com/aicoder2009/khanacademyMCP.git
cd khanacademyMCP
npm install
npm run buildTest with:
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | node dist/index.jsHow It Works
Khan Academy deprecated their public API in 2020. This MCP server uses:
Khan Academy's internal GraphQL API — safelisted queries for content metadata and search
YouTube transcript API — fetches video captions/subtitles
Page scraping — extracts structured data from Khan Academy web pages as a fallback
Static catalog — hardcoded top-level subjects for reliable
list_subjects
All access is read-only with rate limiting (500ms between requests) and in-memory caching to be respectful of Khan Academy's servers.
Limitations
No authentication — cannot access user-specific data (progress, recommendations)
Khan Academy's internal API may change without notice — static fallbacks ensure basic functionality
Transcript availability depends on YouTube captions being present
Rate-limited to avoid overloading Khan Academy's servers
License
MIT
Available Tools
6 toolsget_contentA
Get details about a specific Khan Academy content item (video, article, or exercise). Accepts a slug or full URL. Returns title, description, type, and metadata.
Inputs: slug (required).
get_courseA
Get the full structure of a Khan Academy course, including units, lessons, and content items. Use list_subjects or search to find course slugs.
Inputs: slug (required).
get_topic_treeA
Browse Khan Academy's subject/topic hierarchy. Given a topic slug, returns its subtopics and content items. Use list_subjects first to get valid slugs, then drill down.
Inputs: slug (required), depth.
get_transcriptA
Get the transcript of a Khan Academy video. Returns timestamped text and a full-text version. Accepts a KA video slug/URL or YouTube URL/ID.
Inputs: slug (required), language, format.
list_subjectsA
List all top-level Khan Academy subjects and popular courses. Returns subject names, slugs, and descriptions. Use this as a starting point to explore Khan Academy's content.
Inputs: no named parameters.
searchB
Search Khan Academy for videos, articles, exercises, and courses. Returns matching content with titles, types, and URLs.
Inputs: query (required), limit.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a clearly distinct purpose: get_content retrieves details of a specific item, get_course provides course structure, get_topic_tree explores hierarchical topics, get_transcript fetches video transcripts, list_subjects lists top-level subjects, and search performs general searches. There is no overlap in functionality, making tool selection straightforward for an agent.
All tool names follow a consistent verb_noun pattern using snake_case: get_content, get_course, get_topic_tree, get_transcript, list_subjects, and search. The verbs 'get' and 'list' are used appropriately, and there are no deviations in naming conventions throughout the set.
With 6 tools, the server is well-scoped for exploring and retrieving Khan Academy content. Each tool serves a specific, non-redundant function, covering key operations like browsing, searching, and fetching details without being overly sparse or bloated.
The tool set provides comprehensive coverage for browsing, searching, and retrieving Khan Academy content, including subjects, courses, topics, items, and transcripts. A minor gap is the lack of tools for user-specific actions like tracking progress or saving content, but this is reasonable for a content-focused server, and agents can still perform core exploration tasks effectively.
Maintenance
Related MCP Connectors
Bring your Knacco library into your AI tool: browse, search, read guides and download files.
Knowledge base MCP for AI agents on iknow.dev. Search, read, and maintain via OAuth.
Search and query nTop's knowledge base and engineering guides from AI applications.
Access and search Branch's official API documentation directly within any AI agent or client.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables academic research through the OpenAlex API, allowing users to search for papers, authors, and institutions, retrieve citations, and fetch full-text content when available. Perfect for building intelligent research assistants that can explore academic literature and related works.87MIT
- FlicenseNot gradedqualityDmaintenanceProvides AI assistants with read-only access to Reddit's API for browsing subreddits, reading posts and comments, searching Reddit, and retrieving user/subreddit information. Enables safe exploration of Reddit content without posting capabilities through natural language interactions.-
- AlicenseBqualityDmaintenanceA learning-focused MCP server that demonstrates how to build arithmetic tools for AI assistants, currently featuring addition functionality with structured input/output.114 npmMIT
- AlicenseAqualityBmaintenanceEnables AI assistants to search arXiv papers, retrieve metadata, browse categories, and read paper text.4MIT