pdf-table-pull-lite 1.2.0__tar.gz → 1.2.1__tar.gz

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.
Files changed (24) hide show
  1. {pdf_table_pull_lite-1.2.0 → pdf_table_pull_lite-1.2.1}/CHANGELOG.md +6 -0
  2. {pdf_table_pull_lite-1.2.0/pdf_table_pull_lite.egg-info → pdf_table_pull_lite-1.2.1}/PKG-INFO +97 -6
  3. {pdf_table_pull_lite-1.2.0 → pdf_table_pull_lite-1.2.1}/README.md +96 -5
  4. {pdf_table_pull_lite-1.2.0 → pdf_table_pull_lite-1.2.1/pdf_table_pull_lite.egg-info}/PKG-INFO +97 -6
  5. {pdf_table_pull_lite-1.2.0 → pdf_table_pull_lite-1.2.1}/pdf_table_pull_lite.egg-info/SOURCES.txt +1 -0
  6. {pdf_table_pull_lite-1.2.0 → pdf_table_pull_lite-1.2.1}/pdf_table_pull_lite.py +14 -1
  7. {pdf_table_pull_lite-1.2.0 → pdf_table_pull_lite-1.2.1}/pyproject.toml +1 -1
  8. {pdf_table_pull_lite-1.2.0 → pdf_table_pull_lite-1.2.1}/server.json +10 -3
  9. pdf_table_pull_lite-1.2.1/tests/test_mcp_subcommand.py +44 -0
  10. {pdf_table_pull_lite-1.2.0 → pdf_table_pull_lite-1.2.1}/LICENSE +0 -0
  11. {pdf_table_pull_lite-1.2.0 → pdf_table_pull_lite-1.2.1}/MANIFEST.in +0 -0
  12. {pdf_table_pull_lite-1.2.0 → pdf_table_pull_lite-1.2.1}/llms.txt +0 -0
  13. {pdf_table_pull_lite-1.2.0 → pdf_table_pull_lite-1.2.1}/pdf_table_pull_lite.egg-info/dependency_links.txt +0 -0
  14. {pdf_table_pull_lite-1.2.0 → pdf_table_pull_lite-1.2.1}/pdf_table_pull_lite.egg-info/entry_points.txt +0 -0
  15. {pdf_table_pull_lite-1.2.0 → pdf_table_pull_lite-1.2.1}/pdf_table_pull_lite.egg-info/requires.txt +0 -0
  16. {pdf_table_pull_lite-1.2.0 → pdf_table_pull_lite-1.2.1}/pdf_table_pull_lite.egg-info/top_level.txt +0 -0
  17. {pdf_table_pull_lite-1.2.0 → pdf_table_pull_lite-1.2.1}/pdf_table_pull_lite_mcp.py +0 -0
  18. {pdf_table_pull_lite-1.2.0 → pdf_table_pull_lite-1.2.1}/setup.cfg +0 -0
  19. {pdf_table_pull_lite-1.2.0 → pdf_table_pull_lite-1.2.1}/tests/fixtures/empty.pdf +0 -0
  20. {pdf_table_pull_lite-1.2.0 → pdf_table_pull_lite-1.2.1}/tests/fixtures/plain.pdf +0 -0
  21. {pdf_table_pull_lite-1.2.0 → pdf_table_pull_lite-1.2.1}/tests/fixtures/ruled.pdf +0 -0
  22. {pdf_table_pull_lite-1.2.0 → pdf_table_pull_lite-1.2.1}/tests/fixtures/scanned.pdf +0 -0
  23. {pdf_table_pull_lite-1.2.0 → pdf_table_pull_lite-1.2.1}/tests/test_lite.py +0 -0
  24. {pdf_table_pull_lite-1.2.0 → pdf_table_pull_lite-1.2.1}/tests/test_mcp.py +0 -0
@@ -2,6 +2,12 @@
2
2
 
3
3
  What changed in pdf-table-pull-lite, newest first.
4
4
 
5
+ ## 1.2.1 - 2026-11-04
6
+
7
+ - Fix: installing from the MCP Registry now starts the MCP server. Before, it started the plain command-line tool by mistake.
8
+ - New: `pdf-table-pull-lite mcp` starts the MCP server. `uvx pdf-table-pull-lite mcp` works too. The old `pdf-table-pull-lite-mcp` command still works.
9
+ - To read a file that is named `mcp`, use `./mcp`.
10
+
5
11
  ## 1.2.0 - 2026-11-04
6
12
 
7
13
  - MCP tool now has safety labels (tool annotations) so AI apps know what it does:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pdf-table-pull-lite
3
- Version: 1.2.0
3
+ Version: 1.2.1
4
4
  Summary: Pull the tables out of a text PDF into CSV files. Runs locally. CLI and MCP server.
5
5
  Author: Tidy Byte Tools
6
6
  License-Expression: MIT
@@ -43,9 +43,14 @@ Dynamic: license-file
43
43
 
44
44
  [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/tidybytetools/pdf-table-pull-lite/blob/main/LICENSE)
45
45
  [![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/)
46
- [![MCP server](https://img.shields.io/badge/MCP-stdio-purple.svg)](#use-it-from-claude-desktop-or-cursor-mcp)
46
+ [![MCP server](https://img.shields.io/badge/MCP-stdio-purple.svg)](#use-it-with-your-ai-app-mcp)
47
+ [![MCP Registry](https://img.shields.io/badge/MCP_Registry-listed-green.svg)](https://registry.modelcontextprotocol.io/v0/servers?search=io.github.tidybytetools/pdf-table-pull-lite)
48
+ [![PyPI downloads](https://img.shields.io/pypi/dm/pdf-table-pull-lite.svg)](https://pypistats.org/packages/pdf-table-pull-lite)
49
+ [![Glama score](https://glama.ai/mcp/servers/tidybytetools/pdf-table-pull-lite/badges/score.svg)](https://glama.ai/mcp/servers/tidybytetools/pdf-table-pull-lite)
47
50
 
48
- Free tool that pulls the tables out of a text PDF and saves each one as a CSV file.
51
+ **Free. No API key. Runs on your own computer, so your PDFs stay with you.**
52
+
53
+ A tool that pulls the tables out of a text PDF and saves each one as a CSV file.
49
54
  Need Excel output, scanned PDFs or tables joined across pages? The paid version does that: **[pdf-table-pull on Gumroad](https://tidybyte.gumroad.com/l/hkxqxh)**
50
55
 
51
56
  Runs on your own computer, so your PDFs are never uploaded anywhere. MIT license. Python 3.10 or newer, on Windows, Mac and Linux.
@@ -129,9 +134,9 @@ All of these are free and open source. Pick what fits you.
129
134
 
130
135
  This tool is built on pdfplumber. If you want full control in your own code, use pdfplumber or Camelot directly.
131
136
 
132
- ## Use it from Claude Desktop or Cursor (MCP)
137
+ ## Use it with your AI app (MCP)
133
138
 
134
- There is a small free MCP server built in. It gives your AI app one tool, `extract_pdf_tables`. It needs [uv](https://docs.astral.sh/uv/).
139
+ There is a small free MCP server built in. It gives your AI app one tool, `extract_pdf_tables`. No API key or account is needed. It needs [uv](https://docs.astral.sh/uv/), which gives you the `uvx` command.
135
140
 
136
141
  Run it by hand to check it starts (it waits quietly for an app to talk to it):
137
142
 
@@ -139,7 +144,30 @@ Run it by hand to check it starts (it waits quietly for an app to talk to it):
139
144
  uvx --from pdf-table-pull-lite pdf-table-pull-lite-mcp
140
145
  ```
141
146
 
142
- Claude Desktop (`claude_desktop_config.json`) or Cursor (`~/.cursor/mcp.json`):
147
+ Shorter way to start the same server: `uvx pdf-table-pull-lite mcp`.
148
+
149
+ Pick your app below and copy the block. Restart the app after you save.
150
+
151
+ ### Claude Desktop
152
+
153
+ Open **Settings > Developer > Edit Config**. That opens `claude_desktop_config.json`. Add this:
154
+
155
+ ```json
156
+ {
157
+ "mcpServers": {
158
+ "pdf-table-pull-lite": {
159
+ "command": "uvx",
160
+ "args": ["--from", "pdf-table-pull-lite", "pdf-table-pull-lite-mcp"]
161
+ }
162
+ }
163
+ }
164
+ ```
165
+
166
+ If Claude says it can't find `uvx`, run `which uvx` (Mac/Linux) or `where uvx` (Windows) and put that full path in `"command"`.
167
+
168
+ ### Cursor
169
+
170
+ Put the same block in `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (one project):
143
171
 
144
172
  ```json
145
173
  {
@@ -152,6 +180,69 @@ Claude Desktop (`claude_desktop_config.json`) or Cursor (`~/.cursor/mcp.json`):
152
180
  }
153
181
  ```
154
182
 
183
+ ### VS Code
184
+
185
+ VS Code uses `servers`, not `mcpServers`. Put this in `.vscode/mcp.json` in your project, or run **MCP: Open User Configuration** to use it everywhere:
186
+
187
+ ```json
188
+ {
189
+ "servers": {
190
+ "pdf-table-pull-lite": {
191
+ "type": "stdio",
192
+ "command": "uvx",
193
+ "args": ["--from", "pdf-table-pull-lite", "pdf-table-pull-lite-mcp"]
194
+ }
195
+ }
196
+ }
197
+ ```
198
+
199
+ Or add it with one command:
200
+
201
+ ```
202
+ code --add-mcp '{"name":"pdf-table-pull-lite","type":"stdio","command":"uvx","args":["--from","pdf-table-pull-lite","pdf-table-pull-lite-mcp"]}'
203
+ ```
204
+
205
+ ### Cline
206
+
207
+ In the Cline panel, click the **MCP Servers** icon, open **Configure**, then click **Configure MCP Servers**. Add this inside `mcpServers`:
208
+
209
+ ```json
210
+ {
211
+ "mcpServers": {
212
+ "pdf-table-pull-lite": {
213
+ "command": "uvx",
214
+ "args": ["--from", "pdf-table-pull-lite", "pdf-table-pull-lite-mcp"],
215
+ "disabled": false,
216
+ "autoApprove": []
217
+ }
218
+ }
219
+ }
220
+ ```
221
+
222
+ ### Codex
223
+
224
+ One command:
225
+
226
+ ```
227
+ codex mcp add pdf-table-pull-lite -- uvx --from pdf-table-pull-lite pdf-table-pull-lite-mcp
228
+ ```
229
+
230
+ Or add this to `~/.codex/config.toml`:
231
+
232
+ ```toml
233
+ [mcp_servers.pdf-table-pull-lite]
234
+ command = "uvx"
235
+ args = ["--from", "pdf-table-pull-lite", "pdf-table-pull-lite-mcp"]
236
+ ```
237
+
238
+ ### Gemini CLI
239
+
240
+ This repo is also a Gemini CLI extension. Install it with:
241
+
242
+ ```
243
+ gemini extensions install https://github.com/tidybytetools/pdf-table-pull-lite
244
+ ```
245
+
155
246
  Tool: `extract_pdf_tables(path, pages="", strategy="auto", output_dir="")`. It returns a list with the CSV text of each table. If you set `output_dir`, it saves the CSVs there and returns the file paths instead.
156
247
 
157
248
  ## For AI agents
@@ -11,9 +11,14 @@
11
11
 
12
12
  [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/tidybytetools/pdf-table-pull-lite/blob/main/LICENSE)
13
13
  [![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/)
14
- [![MCP server](https://img.shields.io/badge/MCP-stdio-purple.svg)](#use-it-from-claude-desktop-or-cursor-mcp)
14
+ [![MCP server](https://img.shields.io/badge/MCP-stdio-purple.svg)](#use-it-with-your-ai-app-mcp)
15
+ [![MCP Registry](https://img.shields.io/badge/MCP_Registry-listed-green.svg)](https://registry.modelcontextprotocol.io/v0/servers?search=io.github.tidybytetools/pdf-table-pull-lite)
16
+ [![PyPI downloads](https://img.shields.io/pypi/dm/pdf-table-pull-lite.svg)](https://pypistats.org/packages/pdf-table-pull-lite)
17
+ [![Glama score](https://glama.ai/mcp/servers/tidybytetools/pdf-table-pull-lite/badges/score.svg)](https://glama.ai/mcp/servers/tidybytetools/pdf-table-pull-lite)
15
18
 
16
- Free tool that pulls the tables out of a text PDF and saves each one as a CSV file.
19
+ **Free. No API key. Runs on your own computer, so your PDFs stay with you.**
20
+
21
+ A tool that pulls the tables out of a text PDF and saves each one as a CSV file.
17
22
  Need Excel output, scanned PDFs or tables joined across pages? The paid version does that: **[pdf-table-pull on Gumroad](https://tidybyte.gumroad.com/l/hkxqxh)**
18
23
 
19
24
  Runs on your own computer, so your PDFs are never uploaded anywhere. MIT license. Python 3.10 or newer, on Windows, Mac and Linux.
@@ -97,9 +102,9 @@ All of these are free and open source. Pick what fits you.
97
102
 
98
103
  This tool is built on pdfplumber. If you want full control in your own code, use pdfplumber or Camelot directly.
99
104
 
100
- ## Use it from Claude Desktop or Cursor (MCP)
105
+ ## Use it with your AI app (MCP)
101
106
 
102
- There is a small free MCP server built in. It gives your AI app one tool, `extract_pdf_tables`. It needs [uv](https://docs.astral.sh/uv/).
107
+ There is a small free MCP server built in. It gives your AI app one tool, `extract_pdf_tables`. No API key or account is needed. It needs [uv](https://docs.astral.sh/uv/), which gives you the `uvx` command.
103
108
 
104
109
  Run it by hand to check it starts (it waits quietly for an app to talk to it):
105
110
 
@@ -107,7 +112,30 @@ Run it by hand to check it starts (it waits quietly for an app to talk to it):
107
112
  uvx --from pdf-table-pull-lite pdf-table-pull-lite-mcp
108
113
  ```
109
114
 
110
- Claude Desktop (`claude_desktop_config.json`) or Cursor (`~/.cursor/mcp.json`):
115
+ Shorter way to start the same server: `uvx pdf-table-pull-lite mcp`.
116
+
117
+ Pick your app below and copy the block. Restart the app after you save.
118
+
119
+ ### Claude Desktop
120
+
121
+ Open **Settings > Developer > Edit Config**. That opens `claude_desktop_config.json`. Add this:
122
+
123
+ ```json
124
+ {
125
+ "mcpServers": {
126
+ "pdf-table-pull-lite": {
127
+ "command": "uvx",
128
+ "args": ["--from", "pdf-table-pull-lite", "pdf-table-pull-lite-mcp"]
129
+ }
130
+ }
131
+ }
132
+ ```
133
+
134
+ If Claude says it can't find `uvx`, run `which uvx` (Mac/Linux) or `where uvx` (Windows) and put that full path in `"command"`.
135
+
136
+ ### Cursor
137
+
138
+ Put the same block in `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (one project):
111
139
 
112
140
  ```json
113
141
  {
@@ -120,6 +148,69 @@ Claude Desktop (`claude_desktop_config.json`) or Cursor (`~/.cursor/mcp.json`):
120
148
  }
121
149
  ```
122
150
 
151
+ ### VS Code
152
+
153
+ VS Code uses `servers`, not `mcpServers`. Put this in `.vscode/mcp.json` in your project, or run **MCP: Open User Configuration** to use it everywhere:
154
+
155
+ ```json
156
+ {
157
+ "servers": {
158
+ "pdf-table-pull-lite": {
159
+ "type": "stdio",
160
+ "command": "uvx",
161
+ "args": ["--from", "pdf-table-pull-lite", "pdf-table-pull-lite-mcp"]
162
+ }
163
+ }
164
+ }
165
+ ```
166
+
167
+ Or add it with one command:
168
+
169
+ ```
170
+ code --add-mcp '{"name":"pdf-table-pull-lite","type":"stdio","command":"uvx","args":["--from","pdf-table-pull-lite","pdf-table-pull-lite-mcp"]}'
171
+ ```
172
+
173
+ ### Cline
174
+
175
+ In the Cline panel, click the **MCP Servers** icon, open **Configure**, then click **Configure MCP Servers**. Add this inside `mcpServers`:
176
+
177
+ ```json
178
+ {
179
+ "mcpServers": {
180
+ "pdf-table-pull-lite": {
181
+ "command": "uvx",
182
+ "args": ["--from", "pdf-table-pull-lite", "pdf-table-pull-lite-mcp"],
183
+ "disabled": false,
184
+ "autoApprove": []
185
+ }
186
+ }
187
+ }
188
+ ```
189
+
190
+ ### Codex
191
+
192
+ One command:
193
+
194
+ ```
195
+ codex mcp add pdf-table-pull-lite -- uvx --from pdf-table-pull-lite pdf-table-pull-lite-mcp
196
+ ```
197
+
198
+ Or add this to `~/.codex/config.toml`:
199
+
200
+ ```toml
201
+ [mcp_servers.pdf-table-pull-lite]
202
+ command = "uvx"
203
+ args = ["--from", "pdf-table-pull-lite", "pdf-table-pull-lite-mcp"]
204
+ ```
205
+
206
+ ### Gemini CLI
207
+
208
+ This repo is also a Gemini CLI extension. Install it with:
209
+
210
+ ```
211
+ gemini extensions install https://github.com/tidybytetools/pdf-table-pull-lite
212
+ ```
213
+
123
214
  Tool: `extract_pdf_tables(path, pages="", strategy="auto", output_dir="")`. It returns a list with the CSV text of each table. If you set `output_dir`, it saves the CSVs there and returns the file paths instead.
124
215
 
125
216
  ## For AI agents
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pdf-table-pull-lite
3
- Version: 1.2.0
3
+ Version: 1.2.1
4
4
  Summary: Pull the tables out of a text PDF into CSV files. Runs locally. CLI and MCP server.
5
5
  Author: Tidy Byte Tools
6
6
  License-Expression: MIT
@@ -43,9 +43,14 @@ Dynamic: license-file
43
43
 
44
44
  [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/tidybytetools/pdf-table-pull-lite/blob/main/LICENSE)
45
45
  [![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/)
46
- [![MCP server](https://img.shields.io/badge/MCP-stdio-purple.svg)](#use-it-from-claude-desktop-or-cursor-mcp)
46
+ [![MCP server](https://img.shields.io/badge/MCP-stdio-purple.svg)](#use-it-with-your-ai-app-mcp)
47
+ [![MCP Registry](https://img.shields.io/badge/MCP_Registry-listed-green.svg)](https://registry.modelcontextprotocol.io/v0/servers?search=io.github.tidybytetools/pdf-table-pull-lite)
48
+ [![PyPI downloads](https://img.shields.io/pypi/dm/pdf-table-pull-lite.svg)](https://pypistats.org/packages/pdf-table-pull-lite)
49
+ [![Glama score](https://glama.ai/mcp/servers/tidybytetools/pdf-table-pull-lite/badges/score.svg)](https://glama.ai/mcp/servers/tidybytetools/pdf-table-pull-lite)
47
50
 
48
- Free tool that pulls the tables out of a text PDF and saves each one as a CSV file.
51
+ **Free. No API key. Runs on your own computer, so your PDFs stay with you.**
52
+
53
+ A tool that pulls the tables out of a text PDF and saves each one as a CSV file.
49
54
  Need Excel output, scanned PDFs or tables joined across pages? The paid version does that: **[pdf-table-pull on Gumroad](https://tidybyte.gumroad.com/l/hkxqxh)**
50
55
 
51
56
  Runs on your own computer, so your PDFs are never uploaded anywhere. MIT license. Python 3.10 or newer, on Windows, Mac and Linux.
@@ -129,9 +134,9 @@ All of these are free and open source. Pick what fits you.
129
134
 
130
135
  This tool is built on pdfplumber. If you want full control in your own code, use pdfplumber or Camelot directly.
131
136
 
132
- ## Use it from Claude Desktop or Cursor (MCP)
137
+ ## Use it with your AI app (MCP)
133
138
 
134
- There is a small free MCP server built in. It gives your AI app one tool, `extract_pdf_tables`. It needs [uv](https://docs.astral.sh/uv/).
139
+ There is a small free MCP server built in. It gives your AI app one tool, `extract_pdf_tables`. No API key or account is needed. It needs [uv](https://docs.astral.sh/uv/), which gives you the `uvx` command.
135
140
 
136
141
  Run it by hand to check it starts (it waits quietly for an app to talk to it):
137
142
 
@@ -139,7 +144,30 @@ Run it by hand to check it starts (it waits quietly for an app to talk to it):
139
144
  uvx --from pdf-table-pull-lite pdf-table-pull-lite-mcp
140
145
  ```
141
146
 
142
- Claude Desktop (`claude_desktop_config.json`) or Cursor (`~/.cursor/mcp.json`):
147
+ Shorter way to start the same server: `uvx pdf-table-pull-lite mcp`.
148
+
149
+ Pick your app below and copy the block. Restart the app after you save.
150
+
151
+ ### Claude Desktop
152
+
153
+ Open **Settings > Developer > Edit Config**. That opens `claude_desktop_config.json`. Add this:
154
+
155
+ ```json
156
+ {
157
+ "mcpServers": {
158
+ "pdf-table-pull-lite": {
159
+ "command": "uvx",
160
+ "args": ["--from", "pdf-table-pull-lite", "pdf-table-pull-lite-mcp"]
161
+ }
162
+ }
163
+ }
164
+ ```
165
+
166
+ If Claude says it can't find `uvx`, run `which uvx` (Mac/Linux) or `where uvx` (Windows) and put that full path in `"command"`.
167
+
168
+ ### Cursor
169
+
170
+ Put the same block in `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (one project):
143
171
 
144
172
  ```json
145
173
  {
@@ -152,6 +180,69 @@ Claude Desktop (`claude_desktop_config.json`) or Cursor (`~/.cursor/mcp.json`):
152
180
  }
153
181
  ```
154
182
 
183
+ ### VS Code
184
+
185
+ VS Code uses `servers`, not `mcpServers`. Put this in `.vscode/mcp.json` in your project, or run **MCP: Open User Configuration** to use it everywhere:
186
+
187
+ ```json
188
+ {
189
+ "servers": {
190
+ "pdf-table-pull-lite": {
191
+ "type": "stdio",
192
+ "command": "uvx",
193
+ "args": ["--from", "pdf-table-pull-lite", "pdf-table-pull-lite-mcp"]
194
+ }
195
+ }
196
+ }
197
+ ```
198
+
199
+ Or add it with one command:
200
+
201
+ ```
202
+ code --add-mcp '{"name":"pdf-table-pull-lite","type":"stdio","command":"uvx","args":["--from","pdf-table-pull-lite","pdf-table-pull-lite-mcp"]}'
203
+ ```
204
+
205
+ ### Cline
206
+
207
+ In the Cline panel, click the **MCP Servers** icon, open **Configure**, then click **Configure MCP Servers**. Add this inside `mcpServers`:
208
+
209
+ ```json
210
+ {
211
+ "mcpServers": {
212
+ "pdf-table-pull-lite": {
213
+ "command": "uvx",
214
+ "args": ["--from", "pdf-table-pull-lite", "pdf-table-pull-lite-mcp"],
215
+ "disabled": false,
216
+ "autoApprove": []
217
+ }
218
+ }
219
+ }
220
+ ```
221
+
222
+ ### Codex
223
+
224
+ One command:
225
+
226
+ ```
227
+ codex mcp add pdf-table-pull-lite -- uvx --from pdf-table-pull-lite pdf-table-pull-lite-mcp
228
+ ```
229
+
230
+ Or add this to `~/.codex/config.toml`:
231
+
232
+ ```toml
233
+ [mcp_servers.pdf-table-pull-lite]
234
+ command = "uvx"
235
+ args = ["--from", "pdf-table-pull-lite", "pdf-table-pull-lite-mcp"]
236
+ ```
237
+
238
+ ### Gemini CLI
239
+
240
+ This repo is also a Gemini CLI extension. Install it with:
241
+
242
+ ```
243
+ gemini extensions install https://github.com/tidybytetools/pdf-table-pull-lite
244
+ ```
245
+
155
246
  Tool: `extract_pdf_tables(path, pages="", strategy="auto", output_dir="")`. It returns a list with the CSV text of each table. If you set `output_dir`, it saves the CSVs there and returns the file paths instead.
156
247
 
157
248
  ## For AI agents
@@ -15,6 +15,7 @@ pdf_table_pull_lite.egg-info/requires.txt
15
15
  pdf_table_pull_lite.egg-info/top_level.txt
16
16
  tests/test_lite.py
17
17
  tests/test_mcp.py
18
+ tests/test_mcp_subcommand.py
18
19
  tests/fixtures/empty.pdf
19
20
  tests/fixtures/plain.pdf
20
21
  tests/fixtures/ruled.pdf
@@ -11,7 +11,7 @@ Usage:
11
11
  """
12
12
  import argparse, csv, os, re, sys
13
13
 
14
- __version__ = "1.2.0"
14
+ __version__ = "1.2.1"
15
15
  PRO_URL = "https://tidybyte.gumroad.com/l/hkxqxh"
16
16
  PRO_LINE = f"Need Excel output, scanned PDFs or tables joined across pages? pdf-table-pull (paid): {PRO_URL}"
17
17
 
@@ -93,7 +93,20 @@ def write_csv(tables, out_dir):
93
93
  return paths
94
94
 
95
95
 
96
+ def run_mcp():
97
+ """Start the stdio MCP server (needs the mcp package, which pip installs for you)."""
98
+ try:
99
+ import pdf_table_pull_lite_mcp
100
+ except ImportError as e:
101
+ print(f"error: the MCP server needs the mcp package ({e}). Run: pip install pdf-table-pull-lite", file=sys.stderr)
102
+ return 1
103
+ pdf_table_pull_lite_mcp.main()
104
+ return 0
105
+
96
106
  def main(argv=None):
107
+ argv = sys.argv[1:] if argv is None else argv
108
+ if argv == ["mcp"]:
109
+ return run_mcp()
97
110
  ap = argparse.ArgumentParser(prog="pdf-table-pull-lite",
98
111
  description="Pull tables out of a text PDF into CSV files (one file per table).",
99
112
  epilog=PRO_LINE)
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pdf-table-pull-lite"
7
- version = "1.2.0"
7
+ version = "1.2.1"
8
8
  description = "Pull the tables out of a text PDF into CSV files. Runs locally. CLI and MCP server."
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -8,17 +8,24 @@
8
8
  "source": "github"
9
9
  },
10
10
  "websiteUrl": "https://github.com/tidybytetools/pdf-table-pull-lite",
11
- "version": "1.2.0",
11
+ "version": "1.2.1",
12
12
  "packages": [
13
13
  {
14
14
  "registryType": "pypi",
15
15
  "registryBaseUrl": "https://pypi.org",
16
16
  "identifier": "pdf-table-pull-lite",
17
- "version": "1.2.0",
17
+ "version": "1.2.1",
18
18
  "runtimeHint": "uvx",
19
19
  "transport": {
20
20
  "type": "stdio"
21
- }
21
+ },
22
+ "packageArguments": [
23
+ {
24
+ "type": "positional",
25
+ "value": "mcp",
26
+ "description": "Starts the MCP server instead of the command-line tool."
27
+ }
28
+ ]
22
29
  }
23
30
  ]
24
31
  }
@@ -0,0 +1,44 @@
1
+ """`pdf-table-pull-lite mcp` starts the MCP server (this is how the MCP Registry launches it)."""
2
+ import asyncio, os, subprocess, sys, unittest
3
+ HERE = os.path.dirname(os.path.abspath(__file__))
4
+ ROOT = os.path.dirname(HERE)
5
+
6
+ try:
7
+ from mcp import ClientSession, StdioServerParameters
8
+ from mcp.client.stdio import stdio_client
9
+ except ImportError:
10
+ ClientSession = None
11
+
12
+ ANN = {'readOnlyHint': False, 'destructiveHint': True, 'idempotentHint': True, 'openWorldHint': False}
13
+
14
+
15
+ async def _tools():
16
+ params = StdioServerParameters(command=sys.executable, args=[os.path.join(ROOT, "pdf_table_pull_lite.py"), "mcp"], cwd=ROOT)
17
+ async with stdio_client(params) as (r, w):
18
+ async with ClientSession(r, w) as s:
19
+ await s.initialize()
20
+ return (await s.list_tools()).tools
21
+
22
+
23
+ @unittest.skipIf(ClientSession is None, "mcp not installed")
24
+ class McpSubcommand(unittest.TestCase):
25
+ def test_mcp_subcommand_lists_tool_with_annotations(self):
26
+ tools = asyncio.run(_tools())
27
+ self.assertEqual([t.name for t in tools], ["extract_pdf_tables"])
28
+ ann = tools[0].annotations
29
+ self.assertIsNotNone(ann)
30
+ for k, v in ANN.items():
31
+ self.assertIs(getattr(ann, k), v, k)
32
+
33
+
34
+ class CliStillWorks(unittest.TestCase):
35
+ def test_version_and_help(self):
36
+ out = subprocess.run([sys.executable, os.path.join(ROOT, "pdf_table_pull_lite.py"), "--version"], capture_output=True, text=True)
37
+ self.assertEqual(out.returncode, 0)
38
+ self.assertEqual(out.stdout.strip(), "1.2.1")
39
+ h = subprocess.run([sys.executable, os.path.join(ROOT, "pdf_table_pull_lite.py"), "--help"], capture_output=True, text=True)
40
+ self.assertEqual(h.returncode, 0)
41
+
42
+
43
+ if __name__ == "__main__":
44
+ unittest.main()