@modelcontextprotocol/server-pdf 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modelcontextprotocol/server-pdf",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "type": "module",
5
5
  "description": "MCP server for loading and extracting text from PDF files with chunked pagination and interactive viewer",
6
6
  "repository": {
@@ -22,7 +22,7 @@
22
22
  "prepublishOnly": "npm run build"
23
23
  },
24
24
  "dependencies": {
25
- "@modelcontextprotocol/ext-apps": "^0.4.1",
25
+ "@modelcontextprotocol/ext-apps": "../..",
26
26
  "@modelcontextprotocol/sdk": "^1.24.0",
27
27
  "cors": "^2.8.5",
28
28
  "express": "^5.1.0",
@@ -32,7 +32,7 @@
32
32
  "devDependencies": {
33
33
  "@types/cors": "^2.8.19",
34
34
  "@types/express": "^5.0.0",
35
- "@types/node": "^22.0.0",
35
+ "@types/node": "22.10.0",
36
36
  "concurrently": "^9.2.1",
37
37
  "cross-env": "^10.1.0",
38
38
  "typescript": "^5.9.3",
@@ -1,15 +0,0 @@
1
- import type { PdfIndex, PdfEntry } from "./types.js";
2
- /** Check if URL is from arxiv.org */
3
- export declare function isArxivUrl(url: string): boolean;
4
- /** Normalize arxiv URL to PDF format */
5
- export declare function normalizeArxivUrl(url: string): string;
6
- /** Check if URL is a file:// URL */
7
- export declare function isFileUrl(url: string): boolean;
8
- /** Convert local path to file:// URL */
9
- export declare function toFileUrl(filePath: string): string;
10
- /** Create a PdfEntry from a URL */
11
- export declare function createEntry(url: string): PdfEntry;
12
- /** Build index from a list of URLs */
13
- export declare function buildPdfIndex(urls: string[]): Promise<PdfIndex>;
14
- /** Find entry by URL */
15
- export declare function findEntryByUrl(index: PdfIndex, url: string): PdfEntry | undefined;
@@ -1,5 +0,0 @@
1
- import type { PdfEntry, PdfBytesChunk } from "./types.js";
2
- /** Fetch PDF data (with caching) */
3
- export declare function loadPdfData(entry: PdfEntry): Promise<Uint8Array>;
4
- export declare function loadPdfBytesChunk(entry: PdfEntry, offset?: number, byteCount?: number): Promise<PdfBytesChunk>;
5
- export declare function populatePdfMetadata(entry: PdfEntry): Promise<void>;
@@ -1,50 +0,0 @@
1
- /**
2
- * PDF Server Types - Simplified for didactic purposes
3
- */
4
- import { z } from "zod";
5
- export declare const PdfMetadataSchema: z.ZodObject<{
6
- title: z.ZodOptional<z.ZodString>;
7
- author: z.ZodOptional<z.ZodString>;
8
- pageCount: z.ZodNumber;
9
- fileSizeBytes: z.ZodNumber;
10
- }, z.core.$strip>;
11
- export type PdfMetadata = z.infer<typeof PdfMetadataSchema>;
12
- export declare const PdfEntrySchema: z.ZodObject<{
13
- url: z.ZodString;
14
- metadata: z.ZodObject<{
15
- title: z.ZodOptional<z.ZodString>;
16
- author: z.ZodOptional<z.ZodString>;
17
- pageCount: z.ZodNumber;
18
- fileSizeBytes: z.ZodNumber;
19
- }, z.core.$strip>;
20
- }, z.core.$strip>;
21
- export type PdfEntry = z.infer<typeof PdfEntrySchema>;
22
- export declare const PdfIndexSchema: z.ZodObject<{
23
- entries: z.ZodArray<z.ZodObject<{
24
- url: z.ZodString;
25
- metadata: z.ZodObject<{
26
- title: z.ZodOptional<z.ZodString>;
27
- author: z.ZodOptional<z.ZodString>;
28
- pageCount: z.ZodNumber;
29
- fileSizeBytes: z.ZodNumber;
30
- }, z.core.$strip>;
31
- }, z.core.$strip>>;
32
- }, z.core.$strip>;
33
- export type PdfIndex = z.infer<typeof PdfIndexSchema>;
34
- /** Max bytes per response chunk */
35
- export declare const MAX_CHUNK_BYTES: number;
36
- export declare const PdfBytesChunkSchema: z.ZodObject<{
37
- url: z.ZodString;
38
- bytes: z.ZodString;
39
- offset: z.ZodNumber;
40
- byteCount: z.ZodNumber;
41
- totalBytes: z.ZodNumber;
42
- hasMore: z.ZodBoolean;
43
- }, z.core.$strip>;
44
- export type PdfBytesChunk = z.infer<typeof PdfBytesChunkSchema>;
45
- export declare const ReadPdfBytesInputSchema: z.ZodObject<{
46
- url: z.ZodString;
47
- offset: z.ZodDefault<z.ZodNumber>;
48
- byteCount: z.ZodDefault<z.ZodNumber>;
49
- }, z.core.$strip>;
50
- export type ReadPdfBytesInput = z.infer<typeof ReadPdfBytesInputSchema>;