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