1. Conduid
  2. AI
  3. sdk
MCP server · AI

sdk

PageIndex MCP SDK - Document processing tools for AI agents via Model Context Protocol

Unclaimed devtools
39Low

Scored 3 months ago · breakdown

About sdk

sdk is an MCP server published by git+VectifyAI in the AI category: pageIndex MCP SDK - Document processing tools for AI agents via Model Context Protocol. It has been installed 0 times through Conduid.

Install

Install
npx @pageindex/mcp-sdk
Claude Code
claude mcp add pageindex-mcp-sdk -- npx -y @pageindex/mcp-sdk
npx
npx -y @pageindex/mcp-sdk

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

Ask AI about sdk

Powered by Claude · Grounded in docs

I know everything about sdk. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ·README presentNot checked yet.
  • ·License declaredNot checked yet.
  • ·Tests presentNot checked yet.
  • ·Dependencies pinnedNot checked yet.
  • ·No dynamic code executionNot checked yet.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

README

@pageindex/sdk

TypeScript SDK for PageIndex — upload documents, retrieve tree structures, and chat with your PDFs.

Get your API Key at dash.pageindex.ai. Full docs at docs.pageindex.ai/js-sdk.

Installation

npm install @pageindex/sdk

Quick Start

import { PageIndexClient } from '@pageindex/sdk';
import { readFileSync } from 'fs';

const client = new PageIndexClient({ apiKey: 'YOUR_API_KEY' });

// Upload a document
const file = readFileSync('./report.pdf');
const { doc_id } = await client.api.submitDocument(file, 'report.pdf');

// Get tree structure
const tree = await client.api.getTree(doc_id);

// Chat with the document
const response = await client.api.chatCompletions({
  messages: [{ role: 'user', content: 'What are the key findings?' }],
  doc_id,
});
console.log(response.choices[0].message.content);

// Stream a response
const stream = await client.api.chatCompletions({
  messages: [{ role: 'user', content: 'Summarize this document' }],
  doc_id,
  stream: true,
});
for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? '');
}

Configuration

const client = new PageIndexClient({
  apiKey: 'YOUR_API_KEY', // Required
  apiUrl: 'https://...', // Default: https://api.pageindex.ai
  folderScope: 'folder-id', // Restrict all operations to a folder
});

REST API (client.api)

Method Description
submitDocument(file, fileName, options?) Upload a document
getTree(docId, options?) Get tree structure and processing status
getDocument(docId) Get document metadata
listDocuments(options?) List documents (paginated)
deleteDocument(docId) Delete a document
createFolder(options) Create a folder
listFolders(options?) List folders
chatCompletions(params) Chat with documents (streaming & non-streaming)

Chat API

Supports non-streaming, streaming, multi-document, metadata streaming, and citations. See Chat API docs for full reference.

// Multi-document chat
await client.api.chatCompletions({
  messages: [{ role: 'user', content: 'Compare these' }],
  doc_id: ['doc-1', 'doc-2'],
});

// Streaming with tool call metadata
const stream = await client.api.chatCompletions({
  messages,
  doc_id,
  stream: true,
  stream_metadata: true,
});
for await (const chunk of stream) {
  if (chunk.block_metadata?.type === 'mcp_tool_use_start') {
    console.log(`[Using: ${chunk.block_metadata.tool_name}]`);
  }
  process.stdout.write(chunk.choices[0]?.delta?.content ?? '');
}

MCP Tools (client.tools)

Typed wrappers for PageIndex MCP — for building custom AI agent integrations. See MCP Tools docs.

Method Description
recentDocuments(params?) List recent uploads
findRelevantDocuments(params?) Search documents
getDocument(params) Get document details by name
getDocumentStructure(params) Extract document outline
getPageContent(params) Read page content
getDocumentImage(params) Retrieve embedded image
removeDocument(params) Delete documents (batch)
listFolders(params?) List folders

Error Handling

import { PageIndexError } from '@pageindex/sdk';

try {
  await client.api.getDocument('invalid-id');
} catch (error) {
  if (error instanceof PageIndexError) {
    console.log(error.code); // "NOT_FOUND" | "UNAUTHORIZED" | "PLAN_REQUIRED" | ...
    console.log(error.message);
  }
}

Examples

Links

License

MIT

README mirrored from the source repository 3 months ago. The original is authoritative.

Questions

About sdk

How do I install sdk?

Run npx @pageindex/mcp-sdk, then add the server to your MCP client's configuration. Conduid has recorded 0 installs, so the command is known to work with current clients.

Is sdk safe to use with an AI agent?

Its trust score is 39 out of 100 (low). It passes 0 of 1 static security checks; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is sdk still maintained?

Conduid hasn't recorded a commit date for this repository yet. Check the repository directly for recent activity.