Skip to main content
Glama
ypolosov

pageindex-mcp

by ypolosov

pageindex-mcp

Self-hosted MCP server для Claude Code, реализующий PageIndex vectorless RAG полностью локально.

Архитектура

Claude Code (Max plan — handles all reasoning)
    │  stdio
    ▼
pageindex-mcp (TypeScript)
    ├── index_document    ──→ run_pageindex.py (Python, local)
    │                           └── OpenAI API (tree generation, one-time)
    ├── get_document_tree ──→ local JSON
    ├── get_page_content  ──→ pdftotext (local)
    ├── list_documents    ──→ local filesystem
    └── delete_document   ──→ local filesystem

Никаких LLM-вызовов внутри сервера — Claude Code сам навигирует дерево и анализирует контент. Не нужен ANTHROPIC_API_KEY.

Related MCP server: pageindex-local-mcp

Предварительные требования

# 1. Node.js ≥ 18
node --version

# 2. Python PageIndex repo
git clone https://github.com/VectifyAI/PageIndex /opt/pageindex
cd /opt/pageindex && pip install -r requirements.txt

# 3. poppler-utils для извлечения текста из PDF
# Ubuntu/Debian:
sudo apt install poppler-utils
# macOS:
brew install poppler

Установка и сборка

npm install
npm run build

Переменные окружения

Переменная

Обязательна

Описание

OPENAI_API_KEY

да (для индексации)

PageIndex генерирует дерево через OpenAI

PAGEINDEX_REPO_PATH

да

Путь к клонированному репозиторию PageIndex

INDEX_STORE_PATH

нет

Где хранить JSON индексы (default: ~/.pageindex-store)

PAGEINDEX_MODEL

нет

OpenAI модель (default: gpt-4o-2024-11-20)

Для OpenRouter вместо прямого OpenAI:

OPENAI_BASE_URL=https://openrouter.ai/api/v1
OPENAI_API_KEY=sk-or-v1-...
PAGEINDEX_MODEL=openai/gpt-4o

Подключение к Claude Code

Вариант A: локальный stdio (рекомендуется)

Добавить в ~/.claude.json или .mcp.json в проекте:

{
  "mcpServers": {
    "pageindex-local": {
      "command": "node",
      "args": ["/absolute/path/to/pageindex-mcp/build/index.js"],
      "env": {
        "OPENAI_API_KEY": "sk-...",
        "PAGEINDEX_REPO_PATH": "/opt/pageindex"
      }
    }
  }
}

Вариант B: dev-режим (tsx, без сборки)

{
  "mcpServers": {
    "pageindex-local": {
      "command": "npx",
      "args": ["tsx", "/absolute/path/to/pageindex-mcp/src/index.ts"],
      "env": {
        "OPENAI_API_KEY": "sk-...",
        "PAGEINDEX_REPO_PATH": "/opt/pageindex"
      }
    }
  }
}

Использование в Claude Code

# 1. Индексировать документ (один раз)
"Проиндексируй PDF /path/to/spec.pdf с id pam-spec"

# 2. Посмотреть структуру документа
"Покажи структуру документа pam-spec"

# 3. Извлечь контент конкретной секции
"Покажи содержимое ноды 0005 в документе pam-spec"

# 4. Список всех документов
"Какие документы проиндексированы?"

# 5. Удалить индекс
"Удали индекс pam-spec"

Claude Code сам навигирует дерево, выбирает нужные секции и отвечает — не нужны отдельные API-вызовы.

Инструменты MCP

Инструмент

Описание

index_document

Генерирует PageIndex tree из PDF (один раз, затем переиспользуется)

get_document_tree

Иерархическая структура документа для навигации

get_page_content

Извлечение текста по node_id или диапазону страниц

list_documents

Список проиндексированных документов с метаданными

delete_document

Удалить документ из индекса

Стоимость

  • Индексация (разово): ~$0.10–0.50 за документ (OpenAI gpt-4o)

  • Поиск: бесплатно на Claude Code Max plan

  • Хранение: локальные JSON файлы

Ограничения

  • Генерация дерева требует OpenAI API (hardcoded в Python PageIndex)

  • Для больших PDF (500+ стр.) индексация может занять несколько минут

  • Без poppler-utils текст страниц не извлекается (только метаданные дерева)

A
license - permissive license
-
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Servers

  • F
    license
    -
    quality
    C
    maintenance
    A local-first MCP server that enables semantic search over PDF and DOCX documents using structure-aware parsing and vector storage. It allows users to query their local knowledge base through Claude Code without cloud dependencies or GPU requirements.
    Last updated
  • F
    license
    B
    quality
    B
    maintenance
    A local-first MCP server for PageIndex — the vectorless, reasoning-based RAG framework. It lets local AI agents index and query local PDF and Markdown documents through a self-hosted PageIndex installation, without requiring any PageIndex cloud API key.
    Last updated
    8
    2
  • F
    license
    -
    quality
    B
    maintenance
    A self-hosted MCP server for PageIndex's vectorless, reasoning-based document retrieval. It ingests PDFs into a hierarchical table of contents using an LLM and serves documents, structure, and page content via MCP tools.
    Last updated

View all related MCP servers

Related MCP Connectors

  • Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.

  • Augments MCP Server - A comprehensive framework documentation provider for Claude Code

  • Hosted Amazon Seller and Vendor MCP server for Claude, ChatGPT, Cursor, Codex, Gemini, Copilot.

View all MCP Connectors

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

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