You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,8 +33,12 @@
33
33
-**`duplicateRecord.ts`**: Duplicates records to any database (creates independent copies)
34
34
-**`convertRecord.ts`**: Converts records to different formats
35
35
-**`updateRecordContent.ts`**: Updates the content of existing records while preserving UUID
36
+
-**`getZoteroMetadata.ts`**: Looks up Zotero metadata for DEVONthink records using Finder paths or record identifiers
37
+
-**`findRecordsByCitationKey.ts`**: Resolves Zotero citation keys to attachment metadata and matching DEVONthink records
36
38
-**`src/utils/`**: Utility functions
37
39
-**`escapeString.ts`**: Provides safe string escaping for JXA script interpolation
40
+
-**`jxaHelpers.ts`**: Shared helper functions injected into JXA scripts for record lookup and conversion
41
+
-**`zoteroMetadata.ts`**: Loads Zotero export files and resolves attachment metadata by Finder path
38
42
-**`src/applescript/execute.ts`**: A utility module that provides the `executeJxa` function to run JXA scripts via the command line.
39
43
40
44
## Available Tools
@@ -64,6 +68,8 @@ The MCP server currently provides the following tools:
64
68
21.**`duplicate_record`** - Duplicate records to any database (creates independent copies)
65
69
22.**`convert_record`** - Convert records to different formats (plain text, rich text, markdown, HTML, PDF, etc.)
66
70
23.**`update_record_content`** - Update the content of existing records while preserving UUID and metadata
71
+
24.**`get_zotero_metadata`** - Look up Zotero attachment metadata for a DEVONthink record or Finder path, returning handy top-level `citationKey`, `zoteroId`, attachment listings, and a short `metadataSummary`
72
+
25.**`find_records_by_citation_key`** - Resolve a Zotero citation key to its attachment metadata and any DEVONthink records whose Finder paths match those attachments
Copy file name to clipboardExpand all lines: README.md
+41-2Lines changed: 41 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
-
# Devonthink MCP Server
1
+
Modified based on [dvcrn/mcp-server-devonthink](https://github.com/dvcrn/mcp-server-devonthink)
2
2
3
-
This MCP server provides access to DEVONthink functionality via the Model Context Protocol (MCP). It enables listing, searching, creating, modifying, and managing records and databases in DEVONthink Pro on macOS.
3
+
# DEVONthink Zotero MCP Server
4
+
5
+
This MCP server provides access to DEVONthink functionality via the Model Context Protocol (MCP). It enables listing, searching, creating, modifying, and managing records and databases in DEVONthink Pro on macOS. Additionally, it includes tools to resolve Zotero metadata for DEVONthink attachments based on exported Zotero data.
4
6
5
7

6
8
@@ -12,6 +14,8 @@ This MCP server provides access to DEVONthink functionality via the Model Contex
12
14
- Retrieve and modify record content, properties, and tags
13
15
- Create records from URLs in multiple formats
14
16
- List open databases and group contents
17
+
- Resolve Zotero metadata for DEVONthink attachments via Zotero exports
18
+
- Locate DEVONthink records directly from Zotero citation keys or attachment metadata
15
19
- All tools are type-safe and validated with Zod schemas
16
20
17
21
## Tools
@@ -100,6 +104,16 @@ This MCP server provides access to DEVONthink functionality via the Model Contex
100
104
- Input: primary record UUID, optional second record UUID, database name, and comparison type
101
105
- Returns: Either similar records (single mode) or detailed comparison analysis (two-record mode)
102
106
107
+
17.`get_zotero_metadata`
108
+
- Resolves Zotero metadata for a DEVONthink record or Finder path
109
+
- Input: Finder path, record UUID, DEVONthink ID + database, or DEVONthink location path (optional `zoteroJsonPath` / `zoteroBibPath` override export locations)
110
+
- Returns: The matched Zotero item with top-level `citationKey`, `zoteroId`, attachment list, and a short summary string for LLM prompts
111
+
112
+
18.`find_records_by_citation_key`
113
+
- Resolves a Zotero citation key to its attachment metadata and matching DEVONthink records
114
+
- Input: `citationKey` along with optional overrides for Zotero JSON/BibTeX export paths
115
+
- Returns: Zotero metadata (JSON or BibTeX) plus any DEVONthink records whose Finder paths match the attachment entries
116
+
103
117
### Example: Search Tool
104
118
105
119
```json
@@ -144,3 +158,28 @@ Add to your Claude configuration:
144
158
- Includes comprehensive tests using Vitest
145
159
146
160
See [CLAUDE.md](./CLAUDE.md) for full documentation, tool development guidelines, and API reference.
161
+
162
+
## Zotero Metadata Lookup
163
+
164
+
Zotero attachments stored in DEVONthink can be matched to exported Zotero metadata. The MCP server inspects both JSON and BibTeX exports and prefers JSON when both are present.
165
+
166
+
1. Export your Zotero library (or a subset) to `bibliography.json` and/or `bibliography.bib`.
167
+
2. Point the server at the exports via environment variables before launching it (using Claude's MCP configuration or your shell):
- Supplying only one file is fine—the server detects whether you provided a `.json` or `.bib` path and uses it automatically.
175
+
- If no metadata file is configured, the tool returns an informative error so you can correct the setup.
176
+
177
+
3. Call the `get_zotero_metadata` tool with a Finder path or any supported DEVONthink identifier. The tool returns the matched Zotero entry (including citation key, fields, and the property that matched), exposes `citationKey` / `zoteroId` at the top level, and provides a brief `metadataSummary` string for LLM prompts. If no match is found, the response lists the files that were checked.
0 commit comments