DEVONthink MCP Server

DEVONthink MCP Server

Enables comprehensive management of DEVONthink records and databases, including searching, creating, and modifying content via JXA. It also integrates bibliography metadata resolution to link DEVONthink attachments with Zotero-exported citation data.

Category
访问服务器

README

Modified based on dvcrn/mcp-server-devonthink

DEVONthink MCP Server

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 bibliography metadata for DEVONthink attachments based on exported bibliography data.

screenshot

Features

  • Exposes a comprehensive set of DEVONthink operations as MCP tools
  • List, search, and look up records by various attributes
  • Create, delete, move, and rename records and groups
  • Retrieve and modify record content, properties, and tags
  • Create records from URLs in multiple formats
  • List open databases and group contents
  • Resolve bibliography metadata for DEVONthink attachments via bibliography exports
  • Locate DEVONthink records directly from citation keys or attachment metadata
  • All tools are type-safe and validated with Zod schemas

Tools

Core Tools

  1. is_running

    • Checks if DEVONthink is currently running
    • No input required
    • Returns: { "success": true | false }
  2. create_record

    • Creates new records (notes, bookmarks, groups) with specified properties
    • Input: record type, name, parent group, and optional metadata
  3. delete_record

    • Deletes records by ID, name, or path
    • Input: record identifier
  4. move_record

    • Moves records between groups
    • Input: record ID and destination group
  5. get_record_properties

    • Retrieves detailed metadata and properties for records
    • Input: record identifier
  6. search

    • Performs text-based searches with various comparison options
    • Input: query string and search options
  7. lookup_record

    • Looks up records by filename, path, URL, tags, comment, or content hash (exact matches only)
    • Input: lookup type and value
  8. create_from_url

    • Creates records from web URLs in multiple formats
    • Input: URL and format options
  9. get_open_databases

    • Lists all currently open databases
    • No input required
  10. list_group_content

    • Lists the content of a specific group
    • Input: group identifier
  11. get_record_content

    • Retrieves the content of a specific record
    • Input: record identifier
  12. rename_record

    • Renames a specific record
    • Input: record ID and new name
  13. add_tags

    • Adds tags to a specific record
    • Input: record ID and tags
  14. remove_tags

    • Removes tags from a specific record
    • Input: record ID and tags
  15. classify

    • Gets classification proposals for a record using DEVONthink's AI
    • Input: record UUID, optional database name, comparison type, and tags option
    • Returns: Array of classification proposals (groups or tags) with scores
  16. compare

    • Compares records to find similarities (hybrid approach)
    • Input: primary record UUID, optional second record UUID, database name, and comparison type
    • Returns: Either similar records (single mode) or detailed comparison analysis (two-record mode)
  17. get_bib_metadata

    • Resolves bibliography metadata for a DEVONthink record or Finder path
    • Input: Finder path, record UUID, DEVONthink ID + database, or DEVONthink location path (optional bibliographyJsonPath / bibliographyBibPath override export locations)
    • Returns: The matched bibliography item with top-level citationKey, bibliographyId, attachment list, and a short summary string for LLM prompts
  18. get_records_by_citation_key

    • Resolves a citation key to its attachment metadata and matching DEVONthink records
    • Input: citationKey along with optional overrides for JSON/BibTeX export paths
    • Returns: Bibliography metadata (JSON or BibTeX) plus any DEVONthink records whose Finder paths match the attachment entries

Example: Search Tool

{
  "query": "project plan",
  "comparison": "contains",
  "database": "Inbox"
}

Returns:

{
  "results": [
    { "id": "123", "name": "Project Plan", "path": "/Inbox/Project Plan.md" }
  ]
}

Installation

Claude Code

claude mcp add --scope user devonthink --env BIBLIOGRAPHY_JSON=/path/to/bibliography.json -- npx -y github:TomBener/devonthink-mcp

The --scope user flag installs the MCP server for your user account (available in all projects). You can also use --scope local for the current workspace only.

Codex

codex mcp add devonthink --env BIBLIOGRAPHY_JSON=/path/to/bibliography.json -- npx -y github:TomBener/devonthink-mcp

Configuration

Claude Desktop

Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "devonthink": {
      "command": "npx",
      "args": ["-y", "github:TomBener/devonthink-mcp"],
      "env": {
        "BIBLIOGRAPHY_JSON": "/path/to/bibliography.json"
        // "BIBLIOGRAPHY_BIB": "/path/to/bibliography.bib"
      }
    }
  }
}

VS Code

Add to your VS Code MCP settings (~/Library/Application Support/Code/User/mcp.json):

{
  "servers": {
    "devonthink": {
      "command": "npx",
      "args": ["-y", "github:TomBener/devonthink-mcp"],
      "env": {
        "BIBLIOGRAPHY_JSON": "/path/to/bibliography.json"
        // "BIBLIOGRAPHY_BIB": "/path/to/bibliography.bib"
      }
    }
  }
}

Implementation Details

  • Uses JXA (JavaScript for Automation) to control DEVONthink via AppleScript APIs
  • All tool inputs are validated with Zod schemas for safety and clarity
  • Returns structured JSON for all tool outputs
  • Implements robust error handling for all operations
  • Includes comprehensive tests using Vitest

See CLAUDE.md for full documentation, tool development guidelines, and API reference.

Bibliography Metadata Lookup

Bibliography attachments stored in DEVONthink can be matched to exported bibliography metadata. The MCP server inspects both JSON and BibTeX exports and prefers JSON when both are present.

  1. Export your bibliography library (or a subset) to .json or .bib in Zotero.

  2. Point the server at the exports via environment variables before launching it (using Claude's MCP configuration or your shell):

    export BIBLIOGRAPHY_JSON="/path/to/bibliography.json"
    export BIBLIOGRAPHY_BIB="/path/to/bibliography.bib"
    
    • Supplying only one file is fine—the server detects whether you provided a .json or .bib path and uses it automatically.
    • If no metadata file is configured, the tool returns an informative error so you can correct the setup.
  3. Call the get_bib_metadata tool with a Finder path or any supported DEVONthink identifier. The tool returns the matched bibliography entry (including citation key, fields, and the property that matched), exposes citationKey / bibliographyId 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.

Example invocation:

{
  "uuid": "7F8C5A5B-1234-5678-ABCD-9876543210EF"
}

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选