Skip to main content
Glama

MyDocsMCP: MCP Server for PDF Collections

This project is a Model Context Protocol (MCP) Server that enables semantic search (local RAG) over a collection of PDF documents. It uses the FastMCP framework, the ChromaDB vector database, and local embedding models from Sentence Transformers.

Architecture

  • Semantic Search: 100% local (offline) RAG (Retrieval-Augmented Generation).

  • Embeddings: paraphrase-multilingual-mpnet-base-v2 (supports Portuguese).

  • Vector DB: Persistent ChromaDB.

  • Watcher: Monitors new PDFs in the ./data/pdfs folder and indexes them automatically via watchdog.


Related MCP server: DocScan MCP Server

How to Use

1. Data Preparation

Place your PDFs in the ./data/pdfs/ folder. If you want to organize them by disciplines, create subfolders:

data/pdfs/
  ├── Generative-AI/
  │   └── lecture1.pdf
  └── Machine-Learning/
      └── fundamentals.pdf

The subfolder name will be used as the discipline metadata.

2. Extremely Simple Configuration (Claude / Gemini Desktop)

To use the server, add the configuration below to your agent's JSON file (claude_desktop_config.json or Gemini's settings.json).

Claude Path (macOS): ~/Library/Application Support/Claude/claude_desktop_config.json Gemini Path (macOS): ~/.gemini/settings.json

The server automatically resolves all data folders (pdfs, metadata, chroma_db) based on the project root. You only need to provide the absolute path where you cloned the repository:

{
  "mcpServers": {
    "mydocsmcp": {
      "command": "uv",
      "args": [
        "--directory", "/Absolute/Path/To/Your/MyDocsMCP",
        "run",
        "mydocs-mcp"
      ]
    }
  }
}

That's it! No additional environment variables (PYTHONPATH, PDF_DIR, etc.) are required. The setup "Just Works"™.


Exposed Tools

  • search_documents(query, top_k=5, discipline=None): Semantic search in the collection.

  • list_documents(discipline=None): Lists indexed PDFs.

  • cross_topic_search(query, disciplines): Cross-topic search across multiple disciplines.

  • get_index_stats(): Vector database statistics.

  • ingest_new_documents(path=None, force_reindex=False): Forces manual re-ingestion.


Local Development (Python)

We use the uv package manager:

# Install dependencies
uv sync

# Run the server
uv run mydocs-mcp

Running Tests

uv run pytest

Technologies Used

Available Tools

5 tools
get_index_statsA

Retorna estatísticas do índice: total de documentos, chunks, última atualização.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It indicates a read operation via 'Retorna' and lists specific statistics returned, but does not address potential side effects, authentication, or rate limits. The description is adequate but minimal for a read 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 concise sentence, front-loaded with the main action ('Retorna'), and contains no unnecessary words. Every part adds value.

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

Completeness4/5

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

The tool is simple with no parameters and an output schema. The description clearly states the high-level return values (total documents, chunks, last update), which is sufficient for the tool's complexity. The output schema presumably provides structural details, so the description doesn't need to elaborate.

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

Parameters4/5

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

The tool has zero parameters, so the description needs no parameter-level information. Per the rubric, a baseline of 4 applies when there are no parameters.

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

Purpose5/5

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

The description uses the specific verb 'Retorna' (returns) and identifies the resource as 'estatísticas do índice' (index statistics), clearly distinguishing it from sibling tools that search, list, or ingest documents. The scope is unambiguous.

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?

No guidance is provided about when to use this tool versus alternatives. The description simply states what it does without mentioning any comparative context or exclusions.

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

ingest_new_documentsB

Força re-ingestão de PDFs novos ou modificados. Normalmente automático via watcher, mas pode ser chamado manualmente.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNo
force_reindexNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations, the description must disclose behavioral traits; it only mentions forcing re-ingestion without covering side effects, permissions, or handling of the force_reindex flag. This leaves significant ambiguity about the tool's impact.

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 concise, using two short sentences that quickly convey the purpose and context without unnecessary words.

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?

The tool has no annotations and the description fails to cover parameters or side effects, leaving the 2-parameter tool under-described even though an output schema exists.

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

Parameters1/5

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

The schema has 0% description coverage and the description does not explain the 'path' or 'force_reindex' parameters, offering no semantics beyond the raw schema field names.

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

Purpose5/5

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

The description clearly states the tool's function: forcing re-ingestion of new or modified PDFs, which distinguishes it from the read-oriented sibling tools (search, list, statistics). The verb and resource are specific, and it notes the automatic vs manual context.

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

Usage Guidelines4/5

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

It provides context that ingestion is normally automatic via a watcher but can be manually invoked, indicating when to use it. However, it does not explicitly name alternative tools or exclusion criteria.

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

list_documentsA

Lista todos os PDFs indexados, opcionalmente filtrado por disciplina.

ParametersJSON Schema
NameRequiredDescriptionDefault
disciplineNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior3/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 discloses the core behavior (listing indexed PDFs) and the optional filter, but does not mention any edge cases, performance implications, or that it is a read-only operation. This is minimal but not misleading.

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, compact sentence that is front-loaded with the main action. It conveys the essential information without any redundancy or unnecessary words.

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

Completeness4/5

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

This is a simple tool with one optional parameter and an output schema. The description adequately explains what it does and the filtering option. While it lacks explicit differentiation from sibling tools, that gap is covered under usage guidelines. For its complexity, it is complete.

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

Parameters4/5

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

The input schema has only one parameter 'discipline' with no description. The description adds meaning by stating it is an optional filter, thereby explaining the parameter's purpose. It does not specify allowed values or format, but the term 'disciplina' is self-explanatory in context.

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

Purpose5/5

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

The description clearly states the tool lists all indexed PDFs with an optional filter by discipline. The verb 'Lista' and resource 'PDFs indexados' are specific, and the scope 'todos' distinguishes it from sibling search tools like search_documents or cross_topic_search.

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

Usage Guidelines3/5

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

The description implies usage: it is for listing all PDFs, optionally narrowed by discipline. However, it does not explicitly mention when to choose this over sibling tools like search_documents or get_index_stats, nor does it state any exclusions. The usage context is implied rather than directly specified.

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

search_documentsA

Busca semanticamente no acervo de PDFs. Retorna trechos relevantes com referência ao documento e página.

Args: query: Pergunta ou tema a pesquisar top_k: Número de resultados (padrão: 5) discipline: Filtrar por disciplina/pasta específica (opcional)

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes
top_kNo
disciplineNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden. It discloses that the tool returns relevant excerpts with document and page references, which is helpful. However, it does not mention any limitations, error conditions, or the read-only nature, leaving some behavioral aspects implicit.

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 extremely concise: two sentences plus a compact argument list. It front-loads the main action ('Busca semântica') and avoids redundant wording. Every sentence serves a clear purpose.

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

Completeness4/5

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

The description covers the core purpose, parameter meanings, and return summary (excerpts with document/page). An output schema exists, so full return structure is handled there. It lacks guidance on when to prefer sibling tools, but for a simple search tool, it is sufficiently complete.

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

Parameters4/5

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

Schema description coverage is 0%, but the description compensates by providing a clear Args block explaining each parameter: query (question/topic), top_k (number of results, default 5), and discipline (optional filter). This adds semantic meaning beyond the bare schema types and defaults.

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 uses a specific verb 'Busca' (searches) and identifies the resource 'acervo de PDFs' (PDF collection), also noting the semantic nature of the search. It is clear what the tool does, but it does not explicitly differentiate from the sibling 'cross_topic_search', so a 4 is given instead of 5.

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

Usage Guidelines3/5

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

The description implies usage: when a semantic search over the PDF collection is needed. However, it provides no explicit when-not-to-use guidance or references to alternatives like 'cross_topic_search'. The optional 'discipline' filter suggests context, but no exclusions or prerequisites are stated.

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. 5 tool updatesv0.1.0
    • First observedcross_topic_search
    • First observedget_index_stats
    • First observedingest_new_documents
    • First observedlist_documents
    • First observedsearch_documents

TDQS

A3.8/5.0
Disambiguation4/5

search_documents and cross_topic_search both perform semantic search, but their descriptions clearly distinguish single-discipline versus cross-discipline queries. Other tools (list, stats, ingest) are entirely distinct in purpose.

Naming Consistency5/5

All tools follow a consistent snake_case verb_noun pattern: search_documents, list_documents, cross_topic_search, get_index_stats, ingest_new_documents. The pattern is uniform and predictable.

Tool Count5/5

With only 5 tools, the set is tightly scoped to the core operations of searching, browsing, and maintaining a document index. Each tool serves a clear purpose without redundancy or bloat.

Completeness4/5

The surface covers core search, listing, stats, and ingestion workflows. It lacks an explicit delete/remove operation for documents, but this may be handled automatically or is a minor gap given the watcher-based ingestion model.

Maintenance

ActivityInactive
ResponsivenessNo issues

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

  • A
    license
    A
    quality
    D
    maintenance
    Local-first RAG indexing and semantic search MCP server. Enables document retrieval and context-aware queries using local embedding models.
    3
    16
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    MCP server that enables local hybrid semantic and keyword search over private PDF, DOCX, Markdown, and text documents without sending data to embedding APIs.
    9
    4,707
    MIT

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/Edwardmaster7/MyDocsMCP'

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