Skip to main content
Glama
BukeLy

PageIndex Light MCP

by BukeLy

PageIndex Light MCP

Python FastMCP MCP License

Agentic PDF Search via MCP — Inspired by PageIndex

Vectorless, reasoning-based document retrieval that thinks like a human


Overview

PageIndex Light MCP brings agentic search capabilities to your PDF documents through the Model Context Protocol. Instead of traditional vector similarity, it leverages LLM reasoning for intelligent, human-like document navigation.

Inspired by VectifyAI/PageIndex and pageindex-mcp.

Related MCP server: asset-aware-mcp

Features

  • Agentic Search — LLM-powered semantic search through document structure

  • MCP Sampling — Native MCP protocol sampling support

  • LLM Fallback — Auto-fallback to OpenAI-compatible APIs for non-sampling clients

  • OCR Fallback — Automatic OCR for scanned PDFs

Tools

Tool

Description

get_index

Get PDF index with semantic search support

get_detail

Retrieve detailed content of a specific page

How It Works

flowchart TB
    subgraph Input
        A[PDF File] --> B{Text Extraction}
    end

    subgraph TextExtraction["Text Extraction"]
        B -->|Success| C[Raw Text]
        B -->|Empty/Minimal| D{OCR Configured?}
        D -->|Yes| E[Vision LLM OCR]
        D -->|No| C
        E --> C
    end

    subgraph Indexing
        C --> F[LLM Summarization]
        F -->|Per Page| G[Page Summaries]
        G --> H[(Cached Index)]
    end

    subgraph Search["Agentic Search"]
        I[User Query] --> J{Has Query?}
        J -->|No| K[Return Full Index]
        J -->|Yes| L[LLM Reasoning]
        H --> L
        L --> M[Ranked Results]
    end

    subgraph LLMProvider["LLM Provider"]
        N{MCP Sampling?}
        N -->|Supported| O[MCP Client LLM]
        N -->|Not Supported| P[Fallback LLM API]
    end

    F -.-> N
    L -.-> N

Quick Start

Claude Desktop / Claude Code

Add to your MCP config:

{
  "mcpServers": {
    "pageindex": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/pageindex-light-mcp", "server.py"],
      "env": {
        "PAGEINDEX_LLM_BASE_URL": "https://api.openai.com/v1",
        "PAGEINDEX_LLM_API_KEY": "sk-xxx",
        "PAGEINDEX_LLM_MODEL": "gpt-4o-mini",
        "PAGEINDEX_OCR_BASE_URL": "https://api.openai.com/v1",
        "PAGEINDEX_OCR_API_KEY": "sk-xxx",
        "PAGEINDEX_OCR_MODEL": "gpt-4o-mini"
      }
    }
  }
}

Environment Variables

Both configurations are optional and independent:

Variable

Purpose

Required

PAGEINDEX_LLM_*

Fallback for non-Sampling MCP clients

Optional

PAGEINDEX_OCR_*

Fallback for scanned PDFs (when text extraction fails)

Optional

# LLM Config — Used when MCP client doesn't support Sampling
PAGEINDEX_LLM_BASE_URL=https://api.openai.com/v1
PAGEINDEX_LLM_API_KEY=sk-xxx
PAGEINDEX_LLM_MODEL=gpt-4o-mini

# OCR Config — Used when PDF text extraction returns empty/minimal content
PAGEINDEX_OCR_BASE_URL=https://api.openai.com/v1
PAGEINDEX_OCR_API_KEY=sk-xxx
PAGEINDEX_OCR_MODEL=gpt-4o-mini  # Any vision-capable model

License

MIT

Available Tools

2 tools
get_detailA

获取 PDF 某一页的详细内容

Args: file_path: PDF 文件的完整路径 page: 页码(从 1 开始)

ParametersJSON Schema
NameRequiredDescriptionDefault
pageYes
file_pathYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.6/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 responsibility for behavioral disclosure. It fails to explain what 'detailed content' includes (text, images, layout), error behavior, or side effects. The existence of an output schema is not referenced, and no such context is added.

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, with a clear purpose statement and two well-defined arguments. There is no unnecessary information, and the structure is front-loaded and easy to scan.

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?

The tool is simple with two parameters, so the description is minimally viable. However, the lack of usage context (when to choose this over get_index) and behavioral detail leaves gaps. Since an output schema exists, return values are presumably covered, but the description alone is not fully self-sufficient.

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

Parameters5/5

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

The description adds meaningful explanations for both parameters: file_path is the full path to the PDF, and page is 1-based. This fully compensates for the schema's 0% description coverage, giving the agent the necessary context to populate the parameters correctly.

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 '获取 PDF 某一页的详细内容' (get detailed content of a specific PDF page), identifying the action and resource with specificity. This distinguishes it from the sibling tool get_index, which likely provides an index overview rather than page-level details.

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 given for when to use this tool versus alternatives. The description only lists arguments and does not mention prerequisites, edge cases, or scenarios where another tool (e.g., get_index) would be more appropriate.

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

get_indexA

获取 PDF 文件索引,支持语义搜索

Args: file_path: PDF 文件的完整路径 query: 搜索查询(可选)。如果提供,返回最相关的页面;否则返回全部索引 top_k: 返回结果数量,默认 5(仅在有 query 时生效)

ParametersJSON Schema
NameRequiredDescriptionDefault
queryNo
top_kNo
file_pathYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses conditional behavior: if a query is provided, the most relevant pages are returned; otherwise the entire index is returned. It also notes that top_k only applies when a query exists. However, it does not mention side effects, error handling, or whether the operation is read-only, leaving some 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 tightly structured: a one-line purpose followed by a bulleted Args list. There is no redundancy or filler; every sentence earns its place.

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?

Since an output schema exists, return values need not be described. The description covers the main behavior and all parameters. However, it does not provide usage context relative to get_detail or mention preconditions/errors, making it adequate but not exhaustive.

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%, so the description compensates by listing each parameter with meaning: file_path is the full path, query is an optional search that returns relevant pages, and top_k is the result count defaulting to 5 and only active with a query. This adds value beyond the raw schema, though it lacks constraints like positive integer requirements.

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 opens with '获取 PDF 文件索引,支持语义搜索' (Get PDF file index, supports semantic search), which clearly identifies the action (get/retrieve) and resource (PDF file index). It is specific and unambiguous, but does not explicitly differentiate from the sibling tool get_detail.

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 given about when to use this tool versus get_detail, nor are there any exclusions or alternative recommendations. The description only explains what the tool does, not when it should be selected.

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

TDQS

A3.8/5.0
Disambiguation5/5

The two tools have clearly distinct purposes: one retrieves detailed content for a specific page, the other returns an index with optional semantic search. No overlap or ambiguity exists.

Naming Consistency5/5

Both tools follow the same 'get_' prefix followed by a noun, perfectly consistent and predictable.

Tool Count3/5

Only two tools exist, which is at the thin end of the range. While appropriate for a 'light' server, the scope is minimal and may feel incomplete for broader PDF workflows.

Completeness4/5

The core workflow of indexing and retrieving page details is covered. Minor gaps exist such as no explicit metadata retrieval or index update, but these can be worked around.

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/BukeLy/pageindex-light-mcp'

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