Skip to main content
Glama
tom2025b
by tom2025b

document-catalog-mcp

Private local stdio MCP server for metadata-only discovery, recording, and querying of Markdown and PDF documents.

Scope

document-catalog-mcp scans configured Git repositories plus an optional journal tree. It stores paths, hashes, file metadata, classification, local Git tracking state, and optional print job IDs in SQLite. It never stores or returns document contents.

flowchart LR
    Host[Codex or MCP host] -->|stdio| Server[FastMCP server]
    Server --> Service[Catalog service]
    Service --> Git[Configured Git repositories]
    Service --> Journal[Optional journal PDFs]
    Service --> DB[(SQLite metadata catalog)]

Related MCP server: mcp-server-markdown

Requirements and development install

  • Python 3.11 or newer

  • Git

cd /home/tom/projects/document-catalog-mcp-codex-build
python3 -m venv .venv
.venv/bin/pip install -e '.[dev]'

Current verified executable:

/home/tom/projects/document-catalog-mcp-codex-build/.venv/bin/document-catalog-mcp

For a stable install after review, clone the preserved implementation branch into a non-worktree source directory and install it into a dedicated venv:

git clone --branch codex/standalone-catalog --single-branch \
  https://github.com/tom2025b/document-catalog-mcp.git \
  /home/tom/.local/share/document-catalog-mcp/source
python3 -m venv /home/tom/.local/share/document-catalog-mcp/venv
/home/tom/.local/share/document-catalog-mcp/venv/bin/pip install \
  /home/tom/.local/share/document-catalog-mcp/source

Configuration

Create $XDG_CONFIG_HOME/document-catalog-mcp/config.toml, or ~/.config/document-catalog-mcp/config.toml when XDG_CONFIG_HOME is unset:

journal_dir = "~/Documents/journals"

[[repos]]
name = "project-a"
path = "~/projects/project-a"

[[repos]]
name = "notes"
path = "~/notes"

Repository names and resolved paths must be unique. _journal and _external are reserved names. Unknown keys and malformed values fail with concise configuration errors. Missing configuration is valid and produces an empty catalog scan.

SQLite data lives at $XDG_DATA_HOME/document-catalog-mcp/catalog.db, or ~/.local/share/document-catalog-mcp/catalog.db when XDG_DATA_HOME is unset.

Register with Codex

Development worktree:

codex mcp add document-catalog -- \
  /home/tom/projects/document-catalog-mcp-codex-build/.venv/bin/document-catalog-mcp

Stable venv:

codex mcp add document-catalog -- \
  /home/tom/.local/share/document-catalog-mcp/venv/bin/document-catalog-mcp

These commands use the installed codex mcp add <name> -- <command> stdio syntax. Registration is manual; installation does not modify global MCP configuration.

Tools

Tool

Arguments

Effect

Annotations

catalog_scan

none

Scan configured repositories and journal; upsert metadata

read-only false, destructive false, open-world false

catalog_query

optional repo, doc_kind, file_type, printed, since

Query all 13 metadata fields with filters combined by SQL AND

read-only true, destructive false, open-world false

catalog_record_generated

required file_path

Record one existing generated PDF

read-only false, destructive false, open-world false

catalog_record_printed

required file_path; optional printed_job_id

Record one existing printed PDF and optional job ID

read-only false, destructive false, open-world false

Example requests:

  • “Use catalog_scan to refresh my local document catalog.”

  • “Use catalog_query for PDFs classified as reports since 2026-07-01T00:00:00-04:00.”

  • “Record /tmp/output.pdf with catalog_record_generated.”

  • “Record /tmp/printed.pdf with print job ID job-42.”

Scan returns:

{
  "files_found": {"tracked": 1, "local": 2, "journal": 1},
  "files_added": 4,
  "files_updated": 0,
  "repos_skipped": 0,
  "skipped_repos": []
}

Record tools return status, repo, path, and the complete stored metadata row. Query returns matching rows ordered by repository and path. printed=true means printed_job_id is non-null; an empty job ID normalizes to null.

Scanner behavior

  • Repository scan includes tracked, untracked, and ignored .md and .pdf files, case-insensitively.

  • Local Git index membership controls tracked_in_git; remote presence is not checked.

  • Common dependency, build, cache, and VCS directories are excluded at any depth.

  • Journal scan includes PDFs only, stores resolved absolute paths, and never follows directory symlinks.

  • Missing or failing repositories and individual unreadable candidates are skipped while other sources continue.

  • Configuration and SQLite failures propagate to the caller.

Privacy and non-goals

Only bounded SHA-256 hashing reads file bytes. Contents are never parsed, stored, indexed, or returned. Git runs with argument arrays, no shell, deterministic locale, captured output, and a 30-second timeout. Server makes no network calls.

First release intentionally has no printpdf-mcp dependency, hooks, renderer, CUPS integration, watcher, scheduler, deletion pruning, full-text search, GitHub tracking check, remote HTTP, OAuth, UI, MCP App, or MCPB package. MCPB remains a possible distribution upgrade.

Known specification debt: scan has no unchanged counter; printed state requires a non-null job ID; local Git tracking does not prove remote presence; generators and print systems must call explicit record tools themselves.

Verify

.venv/bin/python -m pytest -q
.venv/bin/python -m compileall -q src tests
.venv/bin/python -c "from document_catalog_mcp.server import mcp; print(mcp.name)"
git diff --check

Disable or uninstall

Disable Codex registration without deleting catalog data:

codex mcp remove document-catalog

Removing a venv or source checkout does not delete the SQLite database. Delete ~/.local/share/document-catalog-mcp/catalog.db only when you explicitly want to erase catalog metadata.

Available Tools

4 tools
catalog_queryQuery document catalogC
Read-only

Query stored local document metadata using optional AND-combined filters.

ParametersJSON Schema
NameRequiredDescriptionDefault
repoNo
sinceNo
printedNo
doc_kindNo
file_typeNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, covering safety. Description adds the AND-combined filter behavior, which is useful context beyond annotations.

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?

Single sentence, no wasted words, front-loaded with action. Could be slightly longer to include more detail, but remains concise.

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 with 5 optional parameters and an output schema, the description is too minimal. It does not explain the role of each filter or the query's scope, leaving gaps for an AI agent.

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

Parameters2/5

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

Schema description coverage is 0%, and the description only mentions 'optional AND-combined filters' without elaborating on any parameter names, types, or meanings. Fails to compensate for undocumented parameters.

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?

Description clearly states the verb 'Query' and resource 'stored local document metadata', and adds specificity with 'AND-combined filters'. However, it does not distinguish from sibling tools like catalog_scan, missing differentiation.

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 on when to use this tool versus siblings or alternatives. No 'when-not' or context for usage.

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

catalog_record_generatedRecord generated PDFB

Record metadata for one existing generated local PDF; never return contents.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.4/5.0
Behavior3/5

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

The description adds the behavioral constraint 'never return contents', which goes beyond the annotations. Annotations already indicate readOnlyHint=false (write operation) and destructiveHint=false. However, the description does not disclose side effects (e.g., what exactly 'record' does, whether it overwrites), nor does it explain behavior for non-existent files.

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?

Two short, focus-packed sentences. The first states the primary purpose, the second adds a critical behavioral exclusion. No filler or redundancy. Every word contributes.

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

Completeness3/5

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

Given the tool's simplicity (one parameter, output schema exists), the description covers the core: recording metadata for an existing local PDF and not returning contents. However, it omits details like whether recording is idempotent, how the file is located, or any error handling. The output schema likely explains returned data, but preconditions and side effects are unclear.

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?

With schema description coverage at 0%, the description must compensate. It adds meaning by specifying that the file_path must point to 'one existing generated local PDF', implying constraints on existence and type. While beneficial, it could be more precise (e.g., absolute/relative path, allowed file extensions).

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 ('Record metadata') and the resource ('one existing generated local PDF'). It distinguishes from potential content-returning tools by adding 'never return contents'. However, the verb 'Record' is somewhat vague, not fully specifying whether it creates, updates, or stores a catalog entry.

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 explicit guidance on when to use this tool versus siblings like catalog_record_printed or catalog_query. The phrase 'never return contents' hints at one differentiator, but there is no when-to-use or when-not-to-use instruction. The description relies on tool names and implicit understanding.

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

catalog_record_printedRecord printed PDFB

Record metadata and optional print job ID for one existing local PDF.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYes
printed_job_idNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.4/5.0
Behavior3/5

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

Annotations provide readOnlyHint=false and destructiveHint=false. Description adds 'existing local PDF' context but does not disclose additional behavioral traits beyond annotations.

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?

Description is a single concise sentence of 12 words, front-loaded with verb and resource. Every word earns its place.

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

Completeness3/5

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

Given low schema coverage, the description provides basic context (existing local PDF) but lacks details about what metadata is recorded or parameter constraints beyond the schema.

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

Parameters2/5

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

Schema description coverage is 0%, requiring the description to compensate. The description only mentions 'optional print job ID', which is already hinted by the parameter name. No additional meaning is added for file_path or the full scope of metadata.

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?

Description clearly states the verb 'Record' and the resource 'metadata and optional print job ID for one existing local PDF'. It distinguishes from siblings like catalog_record_generated by specifying 'existing local PDF'.

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 explicit guidance on when to use this tool versus alternatives. The description implies usage for recording an existing PDF but does not provide when-to-use or when-not-to-use information.

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

catalog_scanScan document catalogA

Scan configured local repositories and journal, storing metadata only.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.8/5.0
Behavior3/5

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

Annotations indicate readOnlyHint=false and destructiveHint=false, so the tool is neither read-only nor destructive. The description adds that it 'stores metadata only', clarifying it writes, but does not elaborate on potential side effects, performance impact, or configuration requirements. This adds some value beyond annotations but leaves 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 sentence that is direct and free of unnecessary words. It effectively communicates the core functionality without excess.

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?

Given the tool's simplicity (no parameters, clear purpose), the description is mostly complete. It explains what is scanned and the outcome (metadata storage). However, it could mention if the scan is incremental or full, and how repositories are configured. Still, it meets the needs for a low-complexity tool.

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, and the schema coverage is 100% (empty). The description does not need to provide parameter-level details, and it appropriately avoids missing information. Baseline score for 0 parameters is 4.

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 scans configured local repositories and the journal, storing only metadata. The verb 'Scan' and resource 'configured local repositories and journal' are specific. It distinguishes from sibling tools like catalog_query (querying) and catalog_record_generated/printed (record creation), which have different purposes.

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 on when to use this tool versus alternatives (e.g., catalog_query). The description lacks explicit context for when a scan is appropriate or when to prefer other operations.

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. 4 tool updatesv0.1.0
    • First observedcatalog_query
    • First observedcatalog_record_generated
    • First observedcatalog_record_printed
    • First observedcatalog_scan

TDQS

A3.7/5.0
Disambiguation5/5

Each tool targets a distinct action: scanning repositories, querying metadata, recording generated PDFs, and recording printed PDFs with job IDs. No overlap in purpose.

Naming Consistency5/5

All tool names follow a consistent 'catalog_verb' pattern (catalog_scan, catalog_query, catalog_record_generated, catalog_record_printed), making naming predictable.

Tool Count5/5

4 tools is well-scoped for a document catalog server; each tool provides a necessary function without redundancy.

Completeness4/5

Covers core operations: scan, query, and two types of record creation. Missing update or delete functionality, but the domain appears focused on recording metadata, so only minor gaps.

Maintenance

ActivityMaintained
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/tom2025b/document-catalog-mcp'

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