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
Visit Server

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"
}

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured