pdfco-mcp 0.0.4__py3-none-any.whl → 0.0.5__py3-none-any.whl
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.
- pdfco/mcp/__init__.py +19 -3
- pdfco/mcp/models.py +140 -49
- pdfco/mcp/services/client.py +14 -12
- pdfco/mcp/services/pdf.py +96 -38
- pdfco/mcp/tools/apis/conversion.py +979 -202
- pdfco/mcp/tools/apis/document.py +21 -7
- pdfco/mcp/tools/apis/editing.py +54 -24
- pdfco/mcp/tools/apis/extraction.py +21 -7
- pdfco/mcp/tools/apis/file.py +10 -6
- pdfco/mcp/tools/apis/form.py +64 -21
- pdfco/mcp/tools/apis/job.py +22 -7
- pdfco/mcp/tools/apis/modification.py +51 -14
- pdfco/mcp/tools/apis/search.py +61 -19
- pdfco/mcp/tools/apis/searchable.py +57 -18
- pdfco/mcp/tools/apis/security.py +97 -37
- {pdfco_mcp-0.0.4.dist-info → pdfco_mcp-0.0.5.dist-info}/METADATA +4 -4
- pdfco_mcp-0.0.5.dist-info/RECORD +23 -0
- pdfco_mcp-0.0.4.dist-info/RECORD +0 -23
- {pdfco_mcp-0.0.4.dist-info → pdfco_mcp-0.0.5.dist-info}/WHEEL +0 -0
- {pdfco_mcp-0.0.4.dist-info → pdfco_mcp-0.0.5.dist-info}/entry_points.txt +0 -0
- {pdfco_mcp-0.0.4.dist-info → pdfco_mcp-0.0.5.dist-info}/licenses/LICENSE +0 -0
@@ -7,14 +7,35 @@ from pydantic import Field
|
|
7
7
|
|
8
8
|
@mcp.tool()
|
9
9
|
async def pdf_make_searchable(
|
10
|
-
url: str = Field(
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
10
|
+
url: str = Field(
|
11
|
+
description="URL to the source file. Supports publicly accessible links including Google Drive, Dropbox, PDF.co Built-In Files Storage. Use 'upload_file' tool to upload local files."
|
12
|
+
),
|
13
|
+
httpusername: str = Field(
|
14
|
+
description="HTTP auth user name if required to access source url. (Optional)",
|
15
|
+
default="",
|
16
|
+
),
|
17
|
+
httppassword: str = Field(
|
18
|
+
description="HTTP auth password if required to access source url. (Optional)",
|
19
|
+
default="",
|
20
|
+
),
|
21
|
+
lang: str = Field(
|
22
|
+
description="Language for OCR for scanned documents. Default is 'eng'. See PDF.co docs for supported languages. (Optional, Default: 'eng')",
|
23
|
+
default="eng",
|
24
|
+
),
|
25
|
+
pages: str = Field(
|
26
|
+
description="Comma-separated page indices (e.g., '0, 1, 2-' or '1, 3-7'). Use '!' for inverted page numbers (e.g., '!0' for last page). Processes all pages if None. (Optional)",
|
27
|
+
default="",
|
28
|
+
),
|
29
|
+
password: str = Field(
|
30
|
+
description="Password of the PDF file. (Optional)", default=""
|
31
|
+
),
|
32
|
+
name: str = Field(
|
33
|
+
description="File name for the generated output. (Optional)", default=""
|
34
|
+
),
|
35
|
+
api_key: str = Field(
|
36
|
+
description="PDF.co API key. If not provided, will use X_API_KEY environment variable. (Optional)",
|
37
|
+
default=None,
|
38
|
+
),
|
18
39
|
) -> BaseResponse:
|
19
40
|
"""
|
20
41
|
Convert scanned PDF documents or image files into a text-searchable PDF.
|
@@ -30,19 +51,37 @@ async def pdf_make_searchable(
|
|
30
51
|
password=password,
|
31
52
|
name=name,
|
32
53
|
)
|
33
|
-
|
54
|
+
|
34
55
|
return await make_pdf_searchable(params, api_key=api_key)
|
35
56
|
|
36
57
|
|
37
58
|
@mcp.tool()
|
38
59
|
async def pdf_make_unsearchable(
|
39
|
-
url: str = Field(
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
60
|
+
url: str = Field(
|
61
|
+
description="URL to the source file. Supports publicly accessible links including Google Drive, Dropbox, PDF.co Built-In Files Storage. Use 'upload_file' tool to upload local files."
|
62
|
+
),
|
63
|
+
httpusername: str = Field(
|
64
|
+
description="HTTP auth user name if required to access source url. (Optional)",
|
65
|
+
default="",
|
66
|
+
),
|
67
|
+
httppassword: str = Field(
|
68
|
+
description="HTTP auth password if required to access source url. (Optional)",
|
69
|
+
default="",
|
70
|
+
),
|
71
|
+
pages: str = Field(
|
72
|
+
description="Comma-separated page indices (e.g., '0, 1, 2-' or '1, 3-7'). Use '!' for inverted page numbers (e.g., '!0' for last page). Processes all pages if None. (Optional)",
|
73
|
+
default="",
|
74
|
+
),
|
75
|
+
password: str = Field(
|
76
|
+
description="Password of the PDF file. (Optional)", default=""
|
77
|
+
),
|
78
|
+
name: str = Field(
|
79
|
+
description="File name for the generated output. (Optional)", default=""
|
80
|
+
),
|
81
|
+
api_key: str = Field(
|
82
|
+
description="PDF.co API key. If not provided, will use X_API_KEY environment variable. (Optional)",
|
83
|
+
default=None,
|
84
|
+
),
|
46
85
|
) -> BaseResponse:
|
47
86
|
"""
|
48
87
|
Make existing PDF document non-searchable by removing the text layer from it.
|
@@ -56,5 +95,5 @@ async def pdf_make_unsearchable(
|
|
56
95
|
password=password,
|
57
96
|
name=name,
|
58
97
|
)
|
59
|
-
|
60
|
-
return await make_pdf_unsearchable(params, api_key=api_key)
|
98
|
+
|
99
|
+
return await make_pdf_unsearchable(params, api_key=api_key)
|
pdfco/mcp/tools/apis/security.py
CHANGED
@@ -7,23 +7,68 @@ from pydantic import Field
|
|
7
7
|
|
8
8
|
@mcp.tool()
|
9
9
|
async def pdf_add_password(
|
10
|
-
url: str = Field(
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
10
|
+
url: str = Field(
|
11
|
+
description="URL to the source PDF file. Supports publicly accessible links including Google Drive, Dropbox, PDF.co Built-In Files Storage. Use 'upload_file' tool to upload local files."
|
12
|
+
),
|
13
|
+
owner_password: str = Field(
|
14
|
+
description="The main owner password that is used for document encryption and for setting/removing restrictions."
|
15
|
+
),
|
16
|
+
user_password: str = Field(
|
17
|
+
description="The optional user password will be asked for viewing and printing document.",
|
18
|
+
default="",
|
19
|
+
),
|
20
|
+
encryption_algorithm: str = Field(
|
21
|
+
description="Encryption algorithm. Valid values: RC4_40bit, RC4_128bit, AES_128bit, AES_256bit. AES_128bit or higher is recommended.",
|
22
|
+
default="AES_256bit",
|
23
|
+
),
|
24
|
+
allow_accessibility_support: bool = Field(
|
25
|
+
description="Allow or prohibit content extraction for accessibility needs.",
|
26
|
+
default=False,
|
27
|
+
),
|
28
|
+
allow_assembly_document: bool = Field(
|
29
|
+
description="Allow or prohibit assembling the document.", default=False
|
30
|
+
),
|
31
|
+
allow_print_document: bool = Field(
|
32
|
+
description="Allow or prohibit printing PDF document.", default=False
|
33
|
+
),
|
34
|
+
allow_fill_forms: bool = Field(
|
35
|
+
description="Allow or prohibit the filling of interactive form fields (including signature fields) in the PDF documents.",
|
36
|
+
default=False,
|
37
|
+
),
|
38
|
+
allow_modify_document: bool = Field(
|
39
|
+
description="Allow or prohibit modification of PDF document.", default=False
|
40
|
+
),
|
41
|
+
allow_content_extraction: bool = Field(
|
42
|
+
description="Allow or prohibit copying content from PDF document.",
|
43
|
+
default=False,
|
44
|
+
),
|
45
|
+
allow_modify_annotations: bool = Field(
|
46
|
+
description="Allow or prohibit interacting with text annotations and forms in PDF document.",
|
47
|
+
default=False,
|
48
|
+
),
|
49
|
+
print_quality: str = Field(
|
50
|
+
description="Allowed printing quality. Valid values: HighResolution, LowResolution.",
|
51
|
+
default="",
|
52
|
+
),
|
53
|
+
httpusername: str = Field(
|
54
|
+
description="HTTP auth user name if required to access source url. (Optional)",
|
55
|
+
default="",
|
56
|
+
),
|
57
|
+
httppassword: str = Field(
|
58
|
+
description="HTTP auth password if required to access source url. (Optional)",
|
59
|
+
default="",
|
60
|
+
),
|
61
|
+
password: str = Field(
|
62
|
+
description="Password of the PDF file if it's already password-protected. (Optional)",
|
63
|
+
default="",
|
64
|
+
),
|
65
|
+
name: str = Field(
|
66
|
+
description="File name for the generated output. (Optional)", default=""
|
67
|
+
),
|
68
|
+
api_key: str = Field(
|
69
|
+
description="PDF.co API key. If not provided, will use X_API_KEY environment variable. (Optional)",
|
70
|
+
default=None,
|
71
|
+
),
|
27
72
|
) -> BaseResponse:
|
28
73
|
"""
|
29
74
|
Add password protection to a PDF file.
|
@@ -36,52 +81,67 @@ async def pdf_add_password(
|
|
36
81
|
password=password,
|
37
82
|
name=name,
|
38
83
|
)
|
39
|
-
|
84
|
+
|
40
85
|
additional_params = {
|
41
86
|
"ownerPassword": owner_password,
|
42
87
|
}
|
43
|
-
|
88
|
+
|
44
89
|
if user_password is not None:
|
45
90
|
additional_params["userPassword"] = user_password
|
46
|
-
|
91
|
+
|
47
92
|
if encryption_algorithm is not None:
|
48
93
|
additional_params["EncryptionAlgorithm"] = encryption_algorithm
|
49
|
-
|
94
|
+
|
50
95
|
if allow_accessibility_support is not None:
|
51
96
|
additional_params["AllowAccessibilitySupport"] = allow_accessibility_support
|
52
|
-
|
97
|
+
|
53
98
|
if allow_assembly_document is not None:
|
54
99
|
additional_params["AllowAssemblyDocument"] = allow_assembly_document
|
55
|
-
|
100
|
+
|
56
101
|
if allow_print_document is not None:
|
57
102
|
additional_params["AllowPrintDocument"] = allow_print_document
|
58
|
-
|
103
|
+
|
59
104
|
if allow_fill_forms is not None:
|
60
105
|
additional_params["AllowFillForms"] = allow_fill_forms
|
61
|
-
|
106
|
+
|
62
107
|
if allow_modify_document is not None:
|
63
108
|
additional_params["AllowModifyDocument"] = allow_modify_document
|
64
|
-
|
109
|
+
|
65
110
|
if allow_content_extraction is not None:
|
66
111
|
additional_params["AllowContentExtraction"] = allow_content_extraction
|
67
|
-
|
112
|
+
|
68
113
|
if allow_modify_annotations is not None:
|
69
114
|
additional_params["AllowModifyAnnotations"] = allow_modify_annotations
|
70
|
-
|
115
|
+
|
71
116
|
if print_quality is not None:
|
72
117
|
additional_params["PrintQuality"] = print_quality
|
73
|
-
|
118
|
+
|
74
119
|
return await add_pdf_password(params, **additional_params, api_key=api_key)
|
75
120
|
|
76
121
|
|
77
122
|
@mcp.tool()
|
78
123
|
async def pdf_remove_password(
|
79
|
-
url: str = Field(
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
124
|
+
url: str = Field(
|
125
|
+
description="URL to the source PDF file. Supports publicly accessible links including Google Drive, Dropbox, PDF.co Built-In Files Storage. Use 'upload_file' tool to upload local files."
|
126
|
+
),
|
127
|
+
httpusername: str = Field(
|
128
|
+
description="HTTP auth user name if required to access source url. (Optional)",
|
129
|
+
default="",
|
130
|
+
),
|
131
|
+
httppassword: str = Field(
|
132
|
+
description="HTTP auth password if required to access source url. (Optional)",
|
133
|
+
default="",
|
134
|
+
),
|
135
|
+
password: str = Field(
|
136
|
+
description="Password of the PDF file to be removed. (Optional)", default=""
|
137
|
+
),
|
138
|
+
name: str = Field(
|
139
|
+
description="File name for the generated output. (Optional)", default=""
|
140
|
+
),
|
141
|
+
api_key: str = Field(
|
142
|
+
description="PDF.co API key. If not provided, will use X_API_KEY environment variable. (Optional)",
|
143
|
+
default=None,
|
144
|
+
),
|
85
145
|
) -> BaseResponse:
|
86
146
|
"""
|
87
147
|
Remove password protection from a PDF file.
|
@@ -94,5 +154,5 @@ async def pdf_remove_password(
|
|
94
154
|
password=password,
|
95
155
|
name=name,
|
96
156
|
)
|
97
|
-
|
98
|
-
return await remove_pdf_password(params, api_key=api_key)
|
157
|
+
|
158
|
+
return await remove_pdf_password(params, api_key=api_key)
|
@@ -1,11 +1,11 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: pdfco-mcp
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.5
|
4
4
|
Summary: MCP server for PDF.Co
|
5
5
|
Project-URL: Homepage, https://pdf.co
|
6
6
|
Project-URL: Documentation, https://developer.pdf.co
|
7
|
-
Project-URL: Repository, https://github.com/
|
8
|
-
Project-URL: Issues, https://github.com/
|
7
|
+
Project-URL: Repository, https://github.com/pdfdotco/pdfco-mcp
|
8
|
+
Project-URL: Issues, https://github.com/pdfdotco/pdfco-mcp/issues
|
9
9
|
Author-email: "PDF.Co" <support@pdf.co>
|
10
10
|
License: MIT License
|
11
11
|
|
@@ -43,7 +43,7 @@ Requires-Dist: httpx>=0.28.1
|
|
43
43
|
Requires-Dist: mcp[cli]>=1.6.0
|
44
44
|
Description-Content-Type: text/markdown
|
45
45
|
|
46
|
-
# PDF.co MCP
|
46
|
+
# PDF.co MCP
|
47
47
|
|
48
48
|
PDF.co MCP Server provides [PDF.co API](https://pdf.co) functionality through the Model Context Protocol (MCP), enabling AI assistants to easily perform various PDF processing tasks.
|
49
49
|
|
@@ -0,0 +1,23 @@
|
|
1
|
+
pdfco/mcp/__init__.py,sha256=weqClEpwZAgMFKpVbe0pVp7SqVqfdpfUhtd4sIa-DNw,1139
|
2
|
+
pdfco/mcp/models.py,sha256=_t5k_FbgiFT7FBkhbwza1zt2WtRaubzSg-sqDKgyoF8,6358
|
3
|
+
pdfco/mcp/server.py,sha256=C82IrVqxNhICyxNn4oeJ_IFl0_NOuO1EqDIeAT03Dc0,52
|
4
|
+
pdfco/mcp/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
|
+
pdfco/mcp/services/client.py,sha256=u9cbfZPETP0-jagnB-Ku4DloZYG3UflT6GQeXxJzMVs,1685
|
6
|
+
pdfco/mcp/services/pdf.py,sha256=neyJFXcXgU50RYiTLs4ijPLxHWeetO03J3RUL6cj5B0,4933
|
7
|
+
pdfco/mcp/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
|
+
pdfco/mcp/tools/apis/conversion.py,sha256=8FuONkzrVgSYAxCC2vBtFVe_msoJqs4QXL5eDhZVYj8,43991
|
9
|
+
pdfco/mcp/tools/apis/document.py,sha256=vx4YK3W5ptKIMjA0PX7tt8_4TBIwX3_p3Yi841IZ9Ps,1414
|
10
|
+
pdfco/mcp/tools/apis/editing.py,sha256=xKvbUUBdXUzkSr4jjmqpERaGX-9msy9ipJdocPHMWp8,4806
|
11
|
+
pdfco/mcp/tools/apis/extraction.py,sha256=3uXmXnExpLOR91dqrN-PYROcNbtU3_CyGB_MtYpVUC4,2085
|
12
|
+
pdfco/mcp/tools/apis/file.py,sha256=qjx6_JUkg3cBvs-UH9bF6ub9-UDuRAy0XlWArdm4wUg,1140
|
13
|
+
pdfco/mcp/tools/apis/form.py,sha256=dn3duwVr7OlPWsoZVFE5qp-rQgcGomOXV3AKEMYI4pE,4974
|
14
|
+
pdfco/mcp/tools/apis/job.py,sha256=M6IAmoV2_shm_FgEz-fJoTwiG-6xhCps3OZTA318gEU,3480
|
15
|
+
pdfco/mcp/tools/apis/modification.py,sha256=yjwdriBs7JoXjctJA_gJxH0oam_2ZGQnY0kE73fHJHk,3096
|
16
|
+
pdfco/mcp/tools/apis/search.py,sha256=KN7A89yZ4x3lFwCjs7NjvpIZJMpP8EbcGZjvMRedF0U,3602
|
17
|
+
pdfco/mcp/tools/apis/searchable.py,sha256=ClrxLG9WH6fOI2wigHE9YJU_OMC2Kjnbo7UyPMOhn1E,3765
|
18
|
+
pdfco/mcp/tools/apis/security.py,sha256=oZe6aS5Ctcyra5_Rr3OlWnVpUGD2ahb8urh07GtqnKM,5886
|
19
|
+
pdfco_mcp-0.0.5.dist-info/METADATA,sha256=bs08m8OS_YIX561U1MV0oS7Sjj-uur0v89ApFcUpWWQ,8835
|
20
|
+
pdfco_mcp-0.0.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
21
|
+
pdfco_mcp-0.0.5.dist-info/entry_points.txt,sha256=Ja_Ud8LbrhKYUmQMo6hxd11SQX_vx7cwrqvco6ClwB4,45
|
22
|
+
pdfco_mcp-0.0.5.dist-info/licenses/LICENSE,sha256=DjYg-0Ei_vaAyXg45y8_otZRHJe-L1cU7cKhyf5gtFo,1063
|
23
|
+
pdfco_mcp-0.0.5.dist-info/RECORD,,
|
pdfco_mcp-0.0.4.dist-info/RECORD
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
pdfco/mcp/__init__.py,sha256=xfKRNYaFEREhWjiM_r4GAiXyld1DkLzE96OOaj28AMs,1054
|
2
|
-
pdfco/mcp/models.py,sha256=pnU9e18fQHrab27sYG1qr7ORhAkVFk70WpAkXSisu9Q,5602
|
3
|
-
pdfco/mcp/server.py,sha256=C82IrVqxNhICyxNn4oeJ_IFl0_NOuO1EqDIeAT03Dc0,52
|
4
|
-
pdfco/mcp/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
|
-
pdfco/mcp/services/client.py,sha256=OKmVSbjEoXCwvWKXcPh2PmEogWlyBuJhmQZBbRL_0RY,1722
|
6
|
-
pdfco/mcp/services/pdf.py,sha256=oV1P46epAI0pAURMxu9-gqtvGlYFKQy1mxzWCVku760,4779
|
7
|
-
pdfco/mcp/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
|
-
pdfco/mcp/tools/apis/conversion.py,sha256=EsvSljSRr37JIxTV892UJWbOQSkRtsz3hNR-engITBE,37424
|
9
|
-
pdfco/mcp/tools/apis/document.py,sha256=6-yfxzhRZHXtJJI6pePzxrw5e0EjrKNwXub2wHO1-w4,1320
|
10
|
-
pdfco/mcp/tools/apis/editing.py,sha256=Q8gSn9WyZzBS9lCJEo3z7OnoaiyweJ34DiP8yFao-yI,4632
|
11
|
-
pdfco/mcp/tools/apis/extraction.py,sha256=EGU1pfgFN0H44FKmq31kDc8GP99qkR9s-GQkM33dmb0,1987
|
12
|
-
pdfco/mcp/tools/apis/file.py,sha256=_LC-kKMIeuyrhlfR221WcqgqR9u-CjeQ9ido5t4Oglc,1119
|
13
|
-
pdfco/mcp/tools/apis/form.py,sha256=9uLm9rNsxCzVYUJ2uBwU2scGTRBmPM4gM3-6ma74KNM,4684
|
14
|
-
pdfco/mcp/tools/apis/job.py,sha256=rU-wm2CygYRxqaIe1NZQ5oYWBtLpbL6cdjeuIC8QSvU,3347
|
15
|
-
pdfco/mcp/tools/apis/modification.py,sha256=yPKwXjKpDOCo67YCHuWUOjGLqTqIZWKq0IOIJAxf5Js,2823
|
16
|
-
pdfco/mcp/tools/apis/search.py,sha256=-phrQbI5waPBvnI7ReWtLTMXzt1s6dSmHs-D7HMbdig,3296
|
17
|
-
pdfco/mcp/tools/apis/searchable.py,sha256=ZkD4LbRbbE16GILjNAbxmVBwugburCL9bNIsAh61jco,3482
|
18
|
-
pdfco/mcp/tools/apis/security.py,sha256=qeOqZUO11UuoPTwHb-DEfoLdkJp_Jvh7nzPm54ATYXw,5490
|
19
|
-
pdfco_mcp-0.0.4.dist-info/METADATA,sha256=5ZfqaqjK_MoyUHUUW_C8CNv2FqeSfkvMxl7liS80eks,8834
|
20
|
-
pdfco_mcp-0.0.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
21
|
-
pdfco_mcp-0.0.4.dist-info/entry_points.txt,sha256=Ja_Ud8LbrhKYUmQMo6hxd11SQX_vx7cwrqvco6ClwB4,45
|
22
|
-
pdfco_mcp-0.0.4.dist-info/licenses/LICENSE,sha256=DjYg-0Ei_vaAyXg45y8_otZRHJe-L1cU7cKhyf5gtFo,1063
|
23
|
-
pdfco_mcp-0.0.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|