zotero-bridge 1.1.2 → 1.1.4

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-en.md CHANGED
@@ -1,324 +1,443 @@
1
- # ZoteroBridge
2
-
3
- <p align="right">
4
- <a href="README.md">đŸ‡¨đŸ‡ŗ įŽ€äŊ“中文</a> | <b>đŸ‡Ŧ🇧 English</b>
5
- </p>
6
-
7
- <p align="center">
8
- <b>Model Context Protocol (MCP) Server for Zotero SQLite Database</b>
9
- </p>
10
-
11
- <p align="center">
12
- <a href="https://www.zotero.org/"><img src="https://img.shields.io/badge/Zotero-7.0+-red" alt="Zotero"></a>
13
- <a href="https://nodejs.org/"><img src="https://img.shields.io/badge/Node.js-18+-green" alt="Node.js"></a>
14
- <a href="https://www.typescriptlang.org/"><img src="https://img.shields.io/badge/TypeScript-5.0+-blue" alt="TypeScript"></a>
15
- <a href="https://modelcontextprotocol.io/"><img src="https://img.shields.io/badge/MCP-1.0-purple" alt="MCP"></a>
16
- <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow" alt="License"></a>
17
- </p>
18
-
19
- ---
20
-
21
- ## 📚 Overview
22
-
23
- ZoteroBridge is a Model Context Protocol (MCP) server that connects directly to Zotero's SQLite database (`zotero.sqlite`), enabling AI assistants (like Claude, ChatGPT, etc.) to interact with your Zotero reference library.
24
-
25
- ### ✨ Key Features
26
-
27
- - đŸ—‚ī¸ **Collection Management** - Create, rename, move, and delete Zotero collections (folders)
28
- - đŸˇī¸ **Tag Management** - Add, remove, and query tags for references
29
- - 📖 **Item Operations** - Search items, get details, manage collection relationships
30
- - 📝 **Abstract Management** - Read and set item abstracts, add notes
31
- - 📄 **PDF Processing** - Extract PDF full text, generate summaries, full-text search
32
-
33
- ---
34
-
35
- ## 🚀 Quick Start
36
-
37
- ### Prerequisites
38
-
39
- - Node.js 18.0 or higher
40
- - Zotero 7.0 or higher
41
- - An MCP-compatible AI client (e.g., Claude Desktop, Cursor)
42
-
43
- ### Installation
44
-
45
- ```bash
46
- # Clone the repository
47
- git clone https://github.com/Combjellyshen/ZoteroBridge.git
48
- cd ZoteroBridge
49
-
50
- # Install dependencies
51
- npm install
52
-
53
- # Build the project
54
- npm run build
55
- ```
56
-
57
- ### Configure AI Clients
58
-
59
- #### Claude Desktop
60
-
61
- Add to your Claude Desktop configuration file:
62
-
63
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
64
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
65
-
66
- ```json
67
- {
68
- "mcpServers": {
69
- "zotero-bridge": {
70
- "command": "node",
71
- "args": ["path/to/ZoteroBridge/dist/index.js"],
72
- "env": {}
73
- }
74
- }
75
- }
76
- ```
77
-
78
- #### Cursor IDE
79
-
80
- Create `.cursor/mcp.json` in your project root:
81
-
82
- ```json
83
- {
84
- "mcpServers": {
85
- "zotero-bridge": {
86
- "command": "node",
87
- "args": ["path/to/ZoteroBridge/dist/index.js"]
88
- }
89
- }
90
- }
91
- ```
92
-
93
- #### VS Code Copilot
94
-
95
- 1. Open VS Code Settings (`Ctrl+,`).
96
- 2. Search for `github.copilot.chat.mcpServers`.
97
- 3. Click "Edit in settings.json".
98
- 4. Add the following configuration:
99
-
100
- ```json
101
- "github.copilot.chat.mcpServers": {
102
- "zotero-bridge": {
103
- "command": "node",
104
- "args": ["path/to/ZoteroBridge/dist/index.js"]
105
- }
106
- }
107
- ```
108
- Make sure to replace `path/to/ZoteroBridge/dist/index.js` with the actual absolute path.
109
-
110
- #### Custom Database Path
111
-
112
- If your Zotero database is not in the default location:
113
-
114
- ```json
115
- {
116
- "mcpServers": {
117
- "zotero-bridge": {
118
- "command": "node",
119
- "args": [
120
- "path/to/ZoteroBridge/dist/index.js",
121
- "--db", "D:/MyZotero/zotero.sqlite"
122
- ]
123
- }
124
- }
125
- }
126
- ```
127
-
128
- ---
129
-
130
- ## đŸ› ī¸ Available Tools
131
-
132
- ### Collection Management
133
-
134
- | Tool | Description |
135
- |------|-------------|
136
- | `list_collections` | List all collections |
137
- | `get_collection` | Get collection details |
138
- | `create_collection` | Create a new collection |
139
- | `rename_collection` | Rename a collection |
140
- | `move_collection` | Move collection to new parent |
141
- | `delete_collection` | Delete a collection |
142
- | `get_subcollections` | Get subcollections |
143
-
144
- ### Tag Management
145
-
146
- | Tool | Description |
147
- |------|-------------|
148
- | `list_tags` | List all tags |
149
- | `create_tag` | Create a new tag |
150
- | `add_tag` | Add a tag to an item |
151
- | `remove_tag` | Remove a tag from an item |
152
- | `get_item_tags` | Get all tags for an item |
153
-
154
- ### Item Operations
155
-
156
- | Tool | Description |
157
- |------|-------------|
158
- | `search_items` | Search items by title |
159
- | `get_item_details` | Get detailed item information |
160
- | `add_item_to_collection` | Add item to a collection |
161
- | `remove_item_from_collection` | Remove item from a collection |
162
- | `get_collection_items` | Get all items in a collection |
163
-
164
- ### Abstract and Notes
165
-
166
- | Tool | Description |
167
- |------|-------------|
168
- | `get_item_abstract` | Get item abstract |
169
- | `set_item_abstract` | Set item abstract |
170
- | `get_item_notes` | Get item notes |
171
- | `add_item_note` | Add a note to an item |
172
-
173
- ### PDF Processing
174
-
175
- | Tool | Description |
176
- |------|-------------|
177
- | `extract_pdf_text` | Extract full text from PDF |
178
- | `get_pdf_summary` | Get PDF summary information |
179
- | `get_item_pdfs` | Get PDF attachments for an item |
180
- | `search_pdf` | Search text within a PDF |
181
- | `generate_abstract_from_pdf` | Generate abstract from PDF content |
182
-
183
- ### Utilities
184
-
185
- | Tool | Description |
186
- |------|-------------|
187
- | `get_database_info` | Get database information |
188
- | `raw_query` | Execute raw SQL query (SELECT only) |
189
-
190
- ### Identifier Search (DOI/ISBN)
191
-
192
- | Tool | Description |
193
- |------|-------------|
194
- | `find_by_doi` | Find item by DOI |
195
- | `find_by_isbn` | Find item by ISBN |
196
- | `find_by_identifier` | Find item by any identifier (DOI, ISBN, PMID, arXiv) |
197
-
198
- ### PDF Annotations
199
-
200
- | Tool | Description |
201
- |------|-------------|
202
- | `get_item_annotations` | Get all annotations for an item (highlights, notes, etc.) |
203
- | `get_attachment_annotations` | Get annotations from a specific attachment |
204
- | `get_annotations_by_type` | Filter annotations by type (highlight, note, etc.) |
205
- | `get_annotations_by_color` | Filter annotations by color |
206
- | `search_annotations` | Search within annotation content |
207
-
208
- ### Fulltext Search
209
-
210
- | Tool | Description |
211
- |------|-------------|
212
- | `search_fulltext` | Search in fulltext index |
213
- | `get_fulltext_content` | Get fulltext content of an attachment |
214
- | `search_fulltext_with_context` | Fulltext search with context snippets |
215
-
216
- ### Related Items
217
-
218
- | Tool | Description |
219
- |------|-------------|
220
- | `get_related_items` | Get manually linked related items |
221
- | `find_similar_by_tags` | Find similar items by shared tags |
222
- | `find_similar_by_creators` | Find similar items by shared authors |
223
- | `find_similar_by_collection` | Find similar items in same collection |
224
-
225
- ---
226
-
227
- ## 📖 Usage Examples
228
-
229
- ### Using with Claude
230
-
231
- ```
232
- # List all collections
233
- List all collections in my Zotero library
234
-
235
- # Create a new collection
236
- Create a new collection called "Machine Learning Papers"
237
-
238
- # Search items
239
- Search for items with "deep learning" in the title
240
-
241
- # Extract PDF content
242
- Extract the full text from this item's PDF and generate a summary
243
-
244
- # Add tags
245
- Add "important" and "to-read" tags to this item
246
- ```
247
-
248
- ---
249
-
250
- ## đŸ—ī¸ Project Structure
251
-
252
- ```
253
- ZoteroBridge/
254
- ├── src/
255
- │ ├── index.ts # MCP server entry point
256
- │ ├── database.ts # Zotero SQLite database operations
257
- │ ├── pdf.ts # PDF processing module
258
- │ └── tools.ts # MCP tool definitions
259
- ├── dist/ # Compiled output
260
- ├── package.json
261
- ├── tsconfig.json
262
- └── README.md
263
- ```
264
-
265
- ---
266
-
267
- ## 👨‍đŸ’ģ Development Guide
268
-
269
- ### Development Mode
270
-
271
- ```bash
272
- # Watch for file changes and auto-compile
273
- npm run dev
274
- ```
275
-
276
- ### Build
277
-
278
- ```bash
279
- npm run build
280
- ```
281
-
282
- ### Command Line Arguments
283
-
284
- ```bash
285
- # Show help
286
- node dist/index.js --help
287
-
288
- # Specify database path
289
- node dist/index.js --db /path/to/zotero.sqlite
290
-
291
- # Read-only mode
292
- node dist/index.js --readonly
293
- ```
294
-
295
- ---
296
-
297
- ## âš ī¸ Important Notes
298
-
299
- 1. **Close Zotero**: When using write features, close the Zotero client to avoid database locking
300
- 2. **Backup Data**: Backup `zotero.sqlite` before making modifications
301
- 3. **Read-only Mode**: Use `--readonly` flag when only reading data for safety
302
-
303
- ---
304
-
305
- ## 📄 License
306
-
307
- This project is licensed under the [MIT License](LICENSE).
308
-
309
- ---
310
-
311
- ## 🙏 Acknowledgements
312
-
313
- - [Zotero](https://www.zotero.org/) - Excellent open-source reference management tool
314
- - [Model Context Protocol](https://modelcontextprotocol.io/) - AI tool integration protocol
315
- - [cookjohn/zotero-mcp](https://github.com/cookjohn/zotero-mcp) - Project reference
316
-
317
- ---
318
-
319
- ## đŸ“Ŧ Contact
320
-
321
- - Author: Combjellyshen
322
- - GitHub: [https://github.com/Combjellyshen/ZoteroBridge](https://github.com/Combjellyshen/ZoteroBridge)
323
-
324
- Feel free to submit Issues or Pull Requests!
1
+ # ZoteroBridge
2
+
3
+ <p align="right">
4
+ <a href="README.md">đŸ‡¨đŸ‡ŗ įŽ€äŊ“中文</a> | <b>đŸ‡Ŧ🇧 English</b>
5
+ </p>
6
+
7
+ <p align="center">
8
+ <b>Model Context Protocol (MCP) Server for Zotero SQLite Database</b>
9
+ </p>
10
+
11
+ <p align="center">
12
+ <a href="https://www.npmjs.com/package/zotero-bridge"><img src="https://img.shields.io/npm/v/zotero-bridge" alt="npm version"></a>
13
+ <a href="https://www.zotero.org/"><img src="https://img.shields.io/badge/Zotero-7.0+-red" alt="Zotero"></a>
14
+ <a href="https://nodejs.org/"><img src="https://img.shields.io/badge/Node.js-18+-green" alt="Node.js"></a>
15
+ <a href="https://www.typescriptlang.org/"><img src="https://img.shields.io/badge/TypeScript-5.0+-blue" alt="TypeScript"></a>
16
+ <a href="https://modelcontextprotocol.io/"><img src="https://img.shields.io/badge/MCP-1.0-purple" alt="MCP"></a>
17
+ <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow" alt="License"></a>
18
+ </p>
19
+
20
+ ---
21
+
22
+ ## 📚 Overview
23
+
24
+ ZoteroBridge is a Model Context Protocol (MCP) server that connects directly to Zotero''s SQLite database (`zotero.sqlite`), enabling AI assistants (like Claude, ChatGPT, GitHub Copilot, etc.) to interact with your Zotero reference library.
25
+
26
+ ### ✨ Key Features
27
+
28
+ - đŸ—‚ī¸ **Collection Management** - Create, rename, move, and delete Zotero collections (folders)
29
+ - đŸˇī¸ **Tag Management** - Add, remove, and query tags for references
30
+ - 📖 **Item Operations** - Search items, get details, manage collection relationships
31
+ - 📝 **Content Management** - Read/set abstracts, add notes
32
+ - 📄 **PDF Processing** - Extract full text, generate summaries, full-text search, get annotations
33
+ - 🔍 **Identifier Search** - Find items by DOI, ISBN, PMID, arXiv, URL
34
+ - 🔗 **Related Items** - Find similar items by manual links, shared tags/creators
35
+ - đŸ› ī¸ **Library Maintenance** - Find duplicates, validate attachments, cleanup orphans, merge items
36
+
37
+ ---
38
+
39
+ ## īŋŊ Changelog
40
+ ### v1.1.4 (2026-02-01)
41
+
42
+ 🔧 **Critical Fixes - Database Compatibility**
43
+ - ✅ Fixed duplicate query inconsistency - `findItemByDOI/ISBN` now always returns the most recently modified item
44
+ - ✅ Fixed `itemTags.type` field - this field is NOT NULL and must be provided
45
+ - ✅ Dynamic retrieval of `note`/`attachment` itemTypeID instead of hardcoding
46
+ - ✅ All queries now exclude items in the `deletedItems` table
47
+
48
+ 🚀 **New Features**
49
+ - ✨ Added transaction support (`beginTransaction/commitTransaction/rollbackTransaction`)
50
+ - ✨ `mergeItems` now uses transactions to ensure data consistency
51
+ - ✨ `mergeItems` now includes attachment transfer functionality
52
+ - ✨ Duplicate queries now return `_duplicateWarning` information
53
+
54
+ đŸ›Ąī¸ **Security Improvements**
55
+ - All write operations check Zotero process status first
56
+ - Automatic database backup before modifications
57
+ - Batch operations protected by transactions
58
+ ### v1.1.3 (2026-02-01)
59
+
60
+ 🔧 **Fixes**
61
+ - ✅ Fixed collection (folder) creation - added required `clientDateModified` field
62
+ - ✅ Fixed collection rename - properly updates `clientDateModified` timestamp
63
+ - ✅ Fixed collection move - ensures parent-child relationships are correctly established
64
+ - ✅ All collection operations now fully comply with Zotero's official database schema
65
+
66
+ Now working properly:
67
+ - Create new collections (top-level folders)
68
+ - Create subcollections (supports multi-level nesting)
69
+ - Rename collections
70
+ - Move collections to other parent collections
71
+ - Get subcollection lists
72
+
73
+ ### v1.1.2
74
+
75
+ - Improved database connection stability
76
+ - Optimized error handling mechanisms
77
+
78
+ ### v1.1.0
79
+
80
+ - Consolidated 42 tools into 13 action-based tools
81
+ - Simplified interface while maintaining all functionality
82
+
83
+ ---
84
+
85
+ ## īŋŊ🚀 Quick Start
86
+
87
+ ### Prerequisites
88
+
89
+ - Node.js 18.0 or higher
90
+ - Zotero 7.0 or higher
91
+ - An MCP-compatible AI client (e.g., Claude Desktop, Cursor, VS Code Copilot)
92
+
93
+ ### Installation
94
+
95
+ #### Option 1: Install via npm (Recommended)
96
+
97
+ ```bash
98
+ npm install -g zotero-bridge
99
+ ```
100
+
101
+ #### Option 2: Build from Source
102
+
103
+ ```bash
104
+ # Clone the repository
105
+ git clone https://github.com/Combjellyshen/ZoteroBridge.git
106
+ cd ZoteroBridge
107
+
108
+ # Install dependencies
109
+ npm install
110
+
111
+ # Build the project
112
+ npm run build
113
+ ```
114
+
115
+ ### Configure AI Clients
116
+
117
+ #### Claude Desktop
118
+
119
+ Add to your Claude Desktop configuration file:
120
+
121
+ **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
122
+ **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
123
+
124
+ ```json
125
+ {
126
+ "mcpServers": {
127
+ "zotero-bridge": {
128
+ "command": "npx",
129
+ "args": ["-y", "zotero-bridge"],
130
+ "env": {}
131
+ }
132
+ }
133
+ }
134
+ ```
135
+
136
+ If building from source:
137
+
138
+ ```json
139
+ {
140
+ "mcpServers": {
141
+ "zotero-bridge": {
142
+ "command": "node",
143
+ "args": ["path/to/ZoteroBridge/dist/index.js"],
144
+ "env": {}
145
+ }
146
+ }
147
+ }
148
+ ```
149
+
150
+ #### Cursor IDE
151
+
152
+ Create `.cursor/mcp.json` in your project root:
153
+
154
+ ```json
155
+ {
156
+ "mcpServers": {
157
+ "zotero-bridge": {
158
+ "command": "npx",
159
+ "args": ["-y", "zotero-bridge"]
160
+ }
161
+ }
162
+ }
163
+ ```
164
+
165
+ #### VS Code Copilot
166
+
167
+ 1. Open VS Code Settings (`Ctrl+,`)
168
+ 2. Search for `github.copilot.chat.mcpServers`
169
+ 3. Click "Edit in settings.json"
170
+ 4. Add the following configuration:
171
+
172
+ ```json
173
+ "github.copilot.chat.mcpServers": {
174
+ "zotero-bridge": {
175
+ "command": "npx",
176
+ "args": ["-y", "zotero-bridge"]
177
+ }
178
+ }
179
+ ```
180
+
181
+ #### Custom Database Path
182
+
183
+ If your Zotero database is not in the default location:
184
+
185
+ ```json
186
+ {
187
+ "mcpServers": {
188
+ "zotero-bridge": {
189
+ "command": "npx",
190
+ "args": ["-y", "zotero-bridge", "--db", "D:/MyZotero/zotero.sqlite"]
191
+ }
192
+ }
193
+ }
194
+ ```
195
+
196
+ ---
197
+
198
+ ## đŸ› ī¸ Available Tools (13 Consolidated Tools)
199
+
200
+ > Version 1.1.0+ consolidates the original 42 tools into 13 action-based tools, simplifying the interface while maintaining full functionality.
201
+
202
+ ### manage_collection - Collection Management
203
+
204
+ All operations for managing Zotero collections (folders).
205
+
206
+ | Action | Description |
207
+ |--------|-------------|
208
+ | `list` | List all collections |
209
+ | `get` | Get collection details |
210
+ | `create` | Create a new collection |
211
+ | `rename` | Rename a collection |
212
+ | `move` | Move collection to new parent |
213
+ | `delete` | Delete a collection |
214
+ | `get_subcollections` | Get subcollections |
215
+ | `add_item` | Add item to collection |
216
+ | `remove_item` | Remove item from collection |
217
+ | `get_items` | Get all items in collection |
218
+
219
+ ### manage_tags - Tag Management
220
+
221
+ All operations for managing tags.
222
+
223
+ | Action | Description |
224
+ |--------|-------------|
225
+ | `list` | List all tags |
226
+ | `get_item_tags` | Get all tags for an item |
227
+ | `add` | Add tag to an item |
228
+ | `remove` | Remove tag from an item |
229
+ | `create` | Create a new tag |
230
+
231
+ ### search_items - Search Items
232
+
233
+ Search Zotero items by title.
234
+
235
+ ### get_item_details - Get Item Details
236
+
237
+ Get detailed information about an item by ID or key.
238
+
239
+ ### manage_item_content - Content Management
240
+
241
+ Manage item abstracts and notes.
242
+
243
+ | Action | Description |
244
+ |--------|-------------|
245
+ | `get_abstract` | Get item abstract |
246
+ | `set_abstract` | Set item abstract |
247
+ | `get_notes` | Get item notes |
248
+ | `add_note` | Add a note to item |
249
+
250
+ ### manage_pdf - PDF Operations
251
+
252
+ Various operations for PDF files.
253
+
254
+ | Action | Description |
255
+ |--------|-------------|
256
+ | `extract_text` | Extract full text from PDF |
257
+ | `get_summary` | Get PDF summary information |
258
+ | `list` | Get PDF attachments for an item |
259
+ | `search` | Search text within PDF |
260
+ | `generate_abstract` | Generate abstract from PDF content |
261
+
262
+ ### find_by_identifier - Identifier Search
263
+
264
+ Find items by various identifiers with auto-detection support.
265
+
266
+ | Type | Description |
267
+ |------|-------------|
268
+ | `doi` | Find by DOI |
269
+ | `isbn` | Find by ISBN |
270
+ | `pmid` | Find by PubMed ID |
271
+ | `arxiv` | Find by arXiv ID |
272
+ | `url` | Find by URL |
273
+ | `auto` | Auto-detect identifier type |
274
+
275
+ ### get_annotations - Get Annotations
276
+
277
+ Get PDF annotations (highlights, notes, etc.) with optional filters by type, color, or search query.
278
+
279
+ ### search_fulltext - Full-text Search
280
+
281
+ Search in Zotero''s full-text index or get full-text content of an attachment.
282
+
283
+ ### find_related_items - Find Related Items
284
+
285
+ Find related items through multiple methods.
286
+
287
+ | Method | Description |
288
+ |--------|-------------|
289
+ | `manual` | Get manually linked items |
290
+ | `tags` | Find by shared tags |
291
+ | `creators` | Find by shared authors |
292
+ | `collection` | Find in same collection |
293
+ | `all` | Use all methods |
294
+
295
+ ### get_database_info - Database Info
296
+
297
+ Get Zotero database information (path, storage, statistics).
298
+
299
+ ### raw_query - Raw SQL Query
300
+
301
+ Execute raw SQL queries (SELECT only, read-only).
302
+
303
+ ### library_maintenance - Library Maintenance 🆕
304
+
305
+ Tools for maintaining and cleaning up your Zotero library.
306
+
307
+ | Action | Description |
308
+ |--------|-------------|
309
+ | `find_duplicates` | Find duplicate items (by title, DOI, or ISBN) |
310
+ | `validate_attachments` | Validate if attachment files exist |
311
+ | `get_valid_attachment` | Get valid attachment for an item |
312
+ | `find_with_valid_pdf` | Find items with valid PDFs |
313
+ | `cleanup_orphans` | Cleanup orphan attachment records (supports dry-run) |
314
+ | `merge_items` | Merge duplicate items |
315
+
316
+ ---
317
+
318
+ ## 📖 Usage Examples
319
+
320
+ ### Using with Claude/Copilot
321
+
322
+ ```
323
+ # Search items
324
+ Search for items with "deep learning" in the title
325
+
326
+ # Get details
327
+ Get detailed information for item ID 1234
328
+
329
+ # Manage collections
330
+ Create a new collection called "Machine Learning Papers"
331
+ Add item 1234 to collection 5678
332
+
333
+ # PDF operations
334
+ Extract full text from attachment ID 100
335
+ Search for "neural network" in this PDF
336
+
337
+ # Find by DOI
338
+ Find the item with DOI 10.1126/science.aaa2397
339
+
340
+ # Get annotations
341
+ Get all highlight annotations for item 1234
342
+
343
+ # Library maintenance
344
+ Find duplicate items in my library
345
+ Check if attachments for item 1234 are valid
346
+ ```
347
+
348
+ ---
349
+
350
+ ## đŸ—ī¸ Project Structure
351
+
352
+ ```
353
+ ZoteroBridge/
354
+ ├── src/
355
+ │ ├── index.ts # MCP server entry point
356
+ │ ├── database.ts # Zotero SQLite database operations
357
+ │ ├── pdf.ts # PDF processing module
358
+ │ └── tools.ts # MCP tool definitions (13 consolidated tools)
359
+ ├── dist/ # Compiled output
360
+ ├── test/ # Test files
361
+ ├── package.json
362
+ ├── tsconfig.json
363
+ └── README.md
364
+ ```
365
+
366
+ ---
367
+
368
+ ## 👨‍đŸ’ģ Development Guide
369
+
370
+ ### Development Mode
371
+
372
+ ```bash
373
+ # Watch for file changes and auto-compile
374
+ npm run dev
375
+ ```
376
+
377
+ ### Build
378
+
379
+ ```bash
380
+ npm run build
381
+ ```
382
+
383
+ ### Command Line Arguments
384
+
385
+ ```bash
386
+ # Show help
387
+ zotero-bridge --help
388
+
389
+ # Specify database path
390
+ zotero-bridge --db /path/to/zotero.sqlite
391
+
392
+ # Read-only mode
393
+ zotero-bridge --readonly
394
+ ```
395
+
396
+ ---
397
+
398
+ ## âš ī¸ Important Notes
399
+
400
+ 1. **Close Zotero**: When using write features, close the Zotero client to avoid database locking
401
+ 2. **Backup Data**: Backup `zotero.sqlite` before making modifications
402
+ 3. **Read-only Mode**: Use `--readonly` flag when only reading data for safety
403
+ 4. **Attachment Validation**: Use `library_maintenance` with `validate_attachments` to check if files exist
404
+
405
+ ---
406
+
407
+ ## 📝 Changelog
408
+
409
+ ### v1.1.2 (2025-02-01)
410
+ - Updated all dependencies to latest versions
411
+ - Fixed Zod 4.x compatibility issues
412
+ - Fixed pdf-parse 2.x ESM import issues
413
+
414
+ ### v1.1.1 (2025-02-01)
415
+ - Consolidated 42 tools into 13 action-based tools
416
+ - Added `library_maintenance` tool (duplicate detection, attachment validation, orphan cleanup, item merging)
417
+
418
+ ### v1.1.0
419
+ - Initial consolidated version
420
+
421
+ ---
422
+
423
+ ## 📄 License
424
+
425
+ This project is licensed under the [MIT License](LICENSE).
426
+
427
+ ---
428
+
429
+ ## 🙏 Acknowledgements
430
+
431
+ - [Zotero](https://www.zotero.org/) - Excellent open-source reference management tool
432
+ - [Model Context Protocol](https://modelcontextprotocol.io/) - AI tool integration protocol
433
+ - [cookjohn/zotero-mcp](https://github.com/cookjohn/zotero-mcp) - Project reference
434
+
435
+ ---
436
+
437
+ ## đŸ“Ŧ Contact
438
+
439
+ - Author: Combjellyshen
440
+ - GitHub: [https://github.com/Combjellyshen/ZoteroBridge](https://github.com/Combjellyshen/ZoteroBridge)
441
+ - npm: [https://www.npmjs.com/package/zotero-bridge](https://www.npmjs.com/package/zotero-bridge)
442
+
443
+ Feel free to submit Issues or Pull Requests!