Skip to main content
Glama

LearnMCP Server

A standalone MCP server that enhances Forest with learning content extraction and summarization capabilities.

Overview

LearnMCP extracts and summarizes learning content from various sources (YouTube videos, PDFs, web articles) and makes those summaries available to Forest's HTA builder for more informed task generation.

Related MCP server: Learning Coach MCP Server

Features

  • Content Extraction: YouTube videos (with transcripts), PDF documents, web articles

  • Background Processing: Async content processing with queue management

  • Smart Summarization: Content chunking and summarization with relevance scoring

  • Forest Integration: Optional integration with Forest's HTA tree builder

  • Standalone Operation: Can be enabled/disabled independently of Forest

Architecture

User → LearnMCP Tools → LearnService → BackgroundProcessor ⇄ Extractors ⇄ Summarizer → DataPersistence
                                                                                              ↓
                                                                                    <DATA_DIR>/learn-content/
                                                                                              ↓
                                                                              Forest HTA Builder (optional)

Installation

  1. Install Dependencies:

    cd learn-mcp-server
    npm install
  2. Configure MCP: Add to your mcp-config.json:

    {
      "mcpServers": {
        "learn-mcp": {
          "command": "node",
          "args": ["server.js"],
          "cwd": "learn-mcp-server",
          "env": {
            "FOREST_DATA_DIR": "<same as Forest>"
          }
        }
      }
    }
  3. Start Server: The server starts automatically when Claude Desktop loads the MCP config.

Available Tools

add_learning_sources

Add learning sources (URLs) to a project for content extraction.

Parameters:

  • project_id (string): Project ID to add sources to

  • urls (array): Array of URLs (YouTube, PDF, articles)

Example:

{
  "project_id": "my_project",
  "urls": [
    "https://youtube.com/watch?v=example",
    "https://example.com/document.pdf",
    "https://blog.example.com/article"
  ]
}

process_learning_sources

Start background processing of pending learning sources.

Parameters:

  • project_id (string): Project ID to process sources for

list_learning_sources

List learning sources for a project, optionally filtered by status.

Parameters:

  • project_id (string): Project ID

  • status (string, optional): Filter by status (pending, processing, completed, failed)

get_learning_summary

Get learning content summary for a project or specific source.

Parameters:

  • project_id (string): Project ID

  • source_id (string, optional): Specific source ID (if not provided, returns aggregated summary)

  • token_limit (number, optional): Maximum tokens for aggregated summary (default: 2000)

delete_learning_sources

Delete learning sources and their summaries.

Parameters:

  • project_id (string): Project ID

  • source_ids (array): Array of source IDs to delete

get_processing_status

Get current processing status for learning sources.

Parameters:

  • project_id (string): Project ID

Supported Content Types

YouTube Videos

  • Extracts video metadata (title, author, duration, etc.)

  • Downloads transcripts when available

  • Falls back to description if no transcript

PDF Documents

  • Extracts text content from remote PDF URLs

  • Preserves document metadata

  • Handles various PDF formats

Web Articles

  • Uses Mozilla Readability for clean content extraction

  • Extracts metadata (title, author, publish date, etc.)

  • Estimates reading time

Data Storage

LearnMCP stores data in <FOREST_DATA_DIR>/learn-content/:

learn-content/
├── <project_id>/
│   ├── sources.json          # Source registry
│   └── summaries/
│       ├── <source_id>.json  # Individual summaries
│       └── ...

Forest Integration

When both LearnMCP and Forest are active, Forest's HTA builder can optionally include learning content summaries in its task generation prompts. This happens automatically when:

  1. LearnMCP has processed learning sources for a project

  2. Forest builds an HTA tree for the same project

  3. Learning content summaries are injected into the HTA generation prompt

Workflow Examples

Basic Learning Content Workflow

  1. Add Sources:

    add_learning_sources(project_id="learn_python", urls=["https://youtube.com/watch?v=python_tutorial"])
  2. Process Content:

    process_learning_sources(project_id="learn_python")
  3. Check Status:

    get_processing_status(project_id="learn_python")
  4. Get Summary:

    get_learning_summary(project_id="learn_python")

Integrated with Forest

  1. Add and process learning sources in LearnMCP

  2. Build HTA tree in Forest - it will automatically include learning content context

  3. Generated tasks will be informed by the processed learning materials

Configuration

Environment Variables

  • FOREST_DATA_DIR: Shared data directory with Forest (required)

  • LOG_LEVEL: Logging level (debug, info, warn, error)

  • NODE_ENV: Environment (development, production)

Background Processor Settings

  • Max Queue Size: 50 tasks

  • Max Concurrent: 2 simultaneous extractions

  • Processing Interval: 3 seconds

  • Retry Attempts: 3 per source

  • Timeout: 5 minutes per extraction

Error Handling

  • Graceful Degradation: Failed extractions don't block other sources

  • Retry Logic: Automatic retries with exponential backoff

  • Comprehensive Logging: Detailed logs for debugging

  • Status Tracking: Clear status indicators for each source

Development

Running Tests

npm test

Linting

npm run lint
npm run lint:fix

Debugging

Set LOG_LEVEL=debug for detailed logging.

Troubleshooting

Common Issues

  1. YouTube extraction fails: Check if video has transcripts enabled

  2. PDF extraction fails: Ensure PDF is publicly accessible

  3. Article extraction fails: Some sites block automated access

Logs

Check logs in <FOREST_DATA_DIR>/logs/:

  • learn-mcp.log: General operations

  • learn-mcp-errors.log: Error details

License

MIT License - Same as Forest MCP Server

Available Tools

6 tools
add_learning_sourcesC

Add learning sources (URLs) to a project for content extraction and summarization

ParametersJSON Schema
NameRequiredDescriptionDefault
project_idYesProject ID to add sources to
urlsYesArray of URLs to add (YouTube, PDF, articles)

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool adds URLs for extraction and summarization, implying a write operation, but doesn't cover critical aspects like required permissions, whether changes are reversible, rate limits, or what happens on success/failure. This is a significant gap for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose without unnecessary details. Every word earns its place, making it easy to parse and understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity as a mutation operation with no annotations and no output schema, the description is incomplete. It lacks behavioral context (e.g., side effects, error handling) and doesn't explain return values, leaving the agent with insufficient information for reliable invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters (project_id and urls). The description adds minimal value by specifying that URLs are for content extraction and summarization and listing allowed types (YouTube, PDF, articles), but doesn't provide syntax or format details beyond what the schema implies. Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Add') and resource ('learning sources (URLs) to a project'), specifying the purpose as adding URLs for content extraction and summarization. It distinguishes from siblings like delete_learning_sources or list_learning_sources by focusing on addition, though it doesn't explicitly contrast with process_learning_sources which might involve similar resources.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like process_learning_sources or get_learning_summary. It mentions the purpose but lacks explicit context, prerequisites, or exclusions, leaving the agent to infer usage from tool names alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

delete_learning_sourcesC

Delete learning sources and their summaries from a project

ParametersJSON Schema
NameRequiredDescriptionDefault
project_idYesProject ID to delete sources from
source_idsYesArray of source IDs to delete

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action is a deletion, implying it's destructive and irreversible, but doesn't specify permissions required, rate limits, error handling, or what happens to associated data beyond 'summaries'. This leaves significant gaps for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core action and resources. There's no wasted verbiage, repetition, or unnecessary details, making it highly concise and well-structured for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool is a destructive mutation with no annotations and no output schema, the description is incomplete. It lacks crucial details like confirmation prompts, return values (e.g., success/failure indicators), error cases, or dependencies on other tools (e.g., needing source IDs from 'list_learning_sources'). This makes it inadequate for safe and effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters ('project_id' and 'source_ids') adequately. The description adds no additional meaning beyond implying the parameters relate to deletion scope, which aligns with the schema. Baseline 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Delete') and the resources ('learning sources and their summaries'), and specifies the scope ('from a project'). However, it doesn't explicitly differentiate from sibling tools like 'list_learning_sources' or 'add_learning_sources' beyond the verb difference, which is why it's a 4 rather than a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing to list sources first), exclusions (e.g., not for partial deletions), or direct comparisons to siblings like 'process_learning_sources', leaving the agent to infer usage from context alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_learning_summaryC

Get learning content summary for a project or specific source

ParametersJSON Schema
NameRequiredDescriptionDefault
project_idYesProject ID to get summary for
source_idNoOptional specific source ID. If not provided, returns aggregated summary
token_limitNoMaximum tokens for aggregated summary (default: 2000)

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves summaries but doesn't cover key aspects like whether it's read-only (implied by 'Get'), potential rate limits, authentication needs, error handling, or the format of returned summaries. For a tool with no annotation coverage, this is insufficient, as it leaves critical behavioral traits unspecified.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence: 'Get learning content summary for a project or specific source.' It is front-loaded with the core purpose, uses clear language, and avoids unnecessary words. Every part of the sentence contributes directly to understanding the tool's function, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (3 parameters, no output schema, no annotations), the description is incomplete. It lacks details on return values, error conditions, and behavioral traits like performance or limitations. Without annotations or an output schema, the description should compensate by explaining what the summary contains or how it's structured, but it doesn't, leaving gaps in understanding for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, meaning all parameters are documented in the schema. The description adds minimal value beyond the schema by implying that 'source_id' is optional and affects aggregation, but it doesn't provide additional context like examples or edge cases. Given the high schema coverage, the baseline score of 3 is appropriate, as the description doesn't significantly enhance parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get learning content summary for a project or specific source.' It specifies the verb ('Get'), resource ('learning content summary'), and scope ('project or specific source'), which is clear and actionable. However, it doesn't explicitly differentiate from sibling tools like 'list_learning_sources' or 'get_processing_status', which might offer related functionality, so it doesn't reach the highest score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools such as 'list_learning_sources' for listing sources or 'get_processing_status' for checking processing state, nor does it specify prerequisites like needing a project ID or when to use source_id for a specific source versus aggregated summary. This lack of contextual direction leaves usage ambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_processing_statusC

Get current processing status for learning sources in a project

ParametersJSON Schema
NameRequiredDescriptionDefault
project_idYesProject ID to check status for

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves status, implying a read-only operation, but doesn't cover aspects like error handling, response format, or whether it requires specific permissions. This leaves significant gaps for a tool with no annotation support.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that efficiently conveys the core purpose without unnecessary words. It's front-loaded with the main action, making it easy to parse, though it could be slightly more structured if it included brief usage hints.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what the status includes (e.g., progress percentages, errors), how results are returned, or any limitations, which are critical for an agent to use this tool effectively in a processing context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the 'project_id' parameter clearly documented. The description adds no additional parameter details beyond what the schema provides, such as format examples or constraints, so it meets the baseline for high schema coverage without enhancing semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and the target ('current processing status for learning sources in a project'), making the purpose understandable. However, it doesn't explicitly differentiate from siblings like 'get_learning_summary' or 'list_learning_sources', which might also provide status-related information, so it falls short of a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, timing (e.g., after processing starts), or how it differs from siblings like 'get_learning_summary', leaving the agent to infer usage from context alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_learning_sourcesC

List learning sources for a project, optionally filtered by status

ParametersJSON Schema
NameRequiredDescriptionDefault
project_idYesProject ID to list sources for
statusNoOptional status filter

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It states it's a list operation, implying read-only behavior, but doesn't disclose critical traits like whether it returns all sources or is paginated, what happens if the project_id is invalid, or any rate limits or authentication needs. This leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core action ('List learning sources for a project') and adds optional detail ('optionally filtered by status') without any waste. Every word serves a purpose, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., list format, fields), error conditions, or behavioral nuances. For a list tool with no structured output, more context is needed to guide the agent effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters (project_id and status with enum values). The description adds minimal value by mentioning optional filtering by status, but doesn't provide additional semantics beyond what the schema specifies, aligning with the baseline for high coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('learning sources for a project'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_learning_summary' or 'get_processing_status', which might also retrieve learning-related data, so it misses full sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It mentions optional filtering by status but doesn't clarify when to use it over other tools like 'get_learning_summary' or 'process_learning_sources', leaving the agent without context for selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

process_learning_sourcesC

Start background processing of pending learning sources for a project

ParametersJSON Schema
NameRequiredDescriptionDefault
project_idYesProject ID to process sources for

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Start background processing' implies an asynchronous operation, it doesn't specify whether this requires special permissions, what happens if processing is already running, whether it's idempotent, what the expected completion time might be, or how to monitor progress. This is a significant gap for a tool that initiates background work.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that gets straight to the point with zero wasted words. It's appropriately sized for a tool with one parameter and clear basic functionality.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool that initiates background processing with no annotations and no output schema, the description is insufficient. It doesn't explain what 'background processing' entails, what happens to the processed sources, how to check results, or what the expected outcomes are. Given the complexity of background operations and lack of structured documentation, more context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 100% description coverage, with the single parameter 'project_id' clearly documented in the schema. The description doesn't add any additional parameter semantics beyond what the schema already provides, so it meets the baseline for high schema coverage without adding extra value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Start background processing') and target ('pending learning sources for a project'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'get_processing_status' or 'add_learning_sources', which would require more specific scope definition.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'get_processing_status' (for checking status) or 'add_learning_sources' (for adding sources). There's no mention of prerequisites, timing considerations, or when this operation is appropriate versus other available tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 6 tool updatesv1.0.0
    • First observedadd_learning_sources
    • First observeddelete_learning_sources
    • First observedget_learning_summary
    • First observedget_processing_status
    • First observedlist_learning_sources
    • First observedprocess_learning_sources

TDQS

A3.5/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose with no ambiguity. For example, add_learning_sources, delete_learning_sources, and list_learning_sources handle source management, while get_learning_summary, get_processing_status, and process_learning_sources focus on content processing and status. The descriptions reinforce these distinct roles, making tool selection straightforward for an agent.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern using snake_case, such as add_learning_sources, delete_learning_sources, and get_learning_summary. This uniformity enhances readability and predictability, allowing agents to easily infer functionality from the naming convention without confusion.

Tool Count5/5

With 6 tools, the server is well-scoped for managing learning sources and summaries. Each tool earns its place by covering essential operations like adding, deleting, listing, processing, and retrieving status and summaries. This count is neither too sparse nor bloated, fitting the domain appropriately.

Completeness4/5

The tool set provides comprehensive coverage for the learning source domain, including CRUD-like operations (add, delete, list), processing, and status/summary retrieval. A minor gap exists in update functionality for learning sources, but agents can work around this by deleting and re-adding. Overall, the surface supports core workflows effectively.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Connectors

Related MCP Servers

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/BretMeraki/LearnMCP'

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