@sylphx/pdf-reader-mcp 1.1.0 → 1.3.0
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/README.md +508 -246
- package/dist/handlers/readPdf.js +64 -55
- package/dist/index.js +1 -1
- package/dist/pdf/extractor.js +255 -14
- package/dist/pdf/parser.js +6 -4
- package/dist/schemas/readPdf.js +5 -1
- package/dist/utils/pathUtils.js +7 -12
- package/package.json +37 -33
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sylphx/pdf-reader-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "An MCP server providing tools to read PDF files.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -39,20 +39,48 @@
|
|
|
39
39
|
"agent",
|
|
40
40
|
"tool"
|
|
41
41
|
],
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build": "tsc",
|
|
44
|
+
"watch": "tsc --watch",
|
|
45
|
+
"inspector": "npx @modelcontextprotocol/inspector dist/index.js",
|
|
46
|
+
"test": "vitest run",
|
|
47
|
+
"test:watch": "vitest watch",
|
|
48
|
+
"test:cov": "vitest run --coverage --reporter=junit --outputFile=test-report.junit.xml",
|
|
49
|
+
"lint": "biome lint .",
|
|
50
|
+
"lint:fix": "biome lint --write .",
|
|
51
|
+
"format": "biome format --write .",
|
|
52
|
+
"check-format": "biome format .",
|
|
53
|
+
"check": "biome check .",
|
|
54
|
+
"check:fix": "biome check --write .",
|
|
55
|
+
"validate": "npm run check && npm run test",
|
|
56
|
+
"docs:dev": "vitepress dev docs",
|
|
57
|
+
"docs:build": "vitepress build docs",
|
|
58
|
+
"docs:preview": "vitepress preview docs",
|
|
59
|
+
"start": "node dist/index.js",
|
|
60
|
+
"typecheck": "tsc --noEmit",
|
|
61
|
+
"benchmark": "vitest bench",
|
|
62
|
+
"clean": "rm -rf dist coverage",
|
|
63
|
+
"docs:api": "typedoc --entryPoints src/index.ts --tsconfig tsconfig.json --plugin typedoc-plugin-markdown --out docs/api --readme none",
|
|
64
|
+
"prepublishOnly": "pnpm run clean && pnpm run build",
|
|
65
|
+
"release": "standard-version",
|
|
66
|
+
"prepare": "husky"
|
|
67
|
+
},
|
|
42
68
|
"dependencies": {
|
|
43
|
-
"@modelcontextprotocol/sdk": "1.
|
|
69
|
+
"@modelcontextprotocol/sdk": "^1.21.0",
|
|
44
70
|
"glob": "^11.0.1",
|
|
45
71
|
"pdfjs-dist": "^5.4.296",
|
|
46
|
-
"
|
|
47
|
-
"zod
|
|
72
|
+
"pngjs": "^7.0.0",
|
|
73
|
+
"zod": "^3.25.76",
|
|
74
|
+
"zod-to-json-schema": "^3.24.6"
|
|
48
75
|
},
|
|
49
76
|
"devDependencies": {
|
|
50
77
|
"@biomejs/biome": "^2.3.2",
|
|
51
|
-
"@commitlint/cli": "^
|
|
52
|
-
"@commitlint/config-conventional": "^
|
|
78
|
+
"@commitlint/cli": "^20.1.0",
|
|
79
|
+
"@commitlint/config-conventional": "^20.0.0",
|
|
53
80
|
"@types/glob": "^8.1.0",
|
|
54
81
|
"@types/node": "^24.0.7",
|
|
55
|
-
"@
|
|
82
|
+
"@types/pngjs": "^6.0.5",
|
|
83
|
+
"@vitest/coverage-v8": "^4.0.7",
|
|
56
84
|
"husky": "^9.1.7",
|
|
57
85
|
"lint-staged": "^16.2.6",
|
|
58
86
|
"standard-version": "^9.5.0",
|
|
@@ -60,7 +88,7 @@
|
|
|
60
88
|
"typedoc-plugin-markdown": "^4.9.0",
|
|
61
89
|
"typescript": "^5.8.3",
|
|
62
90
|
"vitepress": "^1.6.3",
|
|
63
|
-
"vitest": "^
|
|
91
|
+
"vitest": "^4.0.7",
|
|
64
92
|
"vue": "^3.5.13"
|
|
65
93
|
},
|
|
66
94
|
"commitlint": {
|
|
@@ -72,29 +100,5 @@
|
|
|
72
100
|
"*.{ts,tsx,js,cjs,json}": [
|
|
73
101
|
"biome check --write --no-errors-on-unmatched --files-ignore-unknown=true"
|
|
74
102
|
]
|
|
75
|
-
},
|
|
76
|
-
"scripts": {
|
|
77
|
-
"build": "tsc",
|
|
78
|
-
"watch": "tsc --watch",
|
|
79
|
-
"inspector": "npx @modelcontextprotocol/inspector dist/index.js",
|
|
80
|
-
"test": "vitest run",
|
|
81
|
-
"test:watch": "vitest watch",
|
|
82
|
-
"test:cov": "vitest run --coverage --reporter=junit --outputFile=test-report.junit.xml",
|
|
83
|
-
"lint": "biome lint .",
|
|
84
|
-
"lint:fix": "biome lint --write .",
|
|
85
|
-
"format": "biome format --write .",
|
|
86
|
-
"check-format": "biome format .",
|
|
87
|
-
"check": "biome check .",
|
|
88
|
-
"check:fix": "biome check --write .",
|
|
89
|
-
"validate": "npm run check && npm run test",
|
|
90
|
-
"docs:dev": "vitepress dev docs",
|
|
91
|
-
"docs:build": "vitepress build docs",
|
|
92
|
-
"docs:preview": "vitepress preview docs",
|
|
93
|
-
"start": "node dist/index.js",
|
|
94
|
-
"typecheck": "tsc --noEmit",
|
|
95
|
-
"benchmark": "vitest bench",
|
|
96
|
-
"clean": "rm -rf dist coverage",
|
|
97
|
-
"docs:api": "typedoc --entryPoints src/index.ts --tsconfig tsconfig.json --plugin typedoc-plugin-markdown --out docs/api --readme none",
|
|
98
|
-
"release": "standard-version"
|
|
99
103
|
}
|
|
100
|
-
}
|
|
104
|
+
}
|