[Release] DEVONthink CLI + Agent Skill

Hi all! This is a (unofficial) Agent Skill and CLI to give tools like Claude Code, Codex or OpenClaw the ability to interact and search and manage your DEVONthink Database.

Available at GitHub - dvcrn/devonthink-cli: CLI and agent skill for DEVONthink with search, record management, and AI workflows. · GitHub

It’s a CLI to manage DEVONthink, together with SKILL.md definition to feed into agents to teach them how to use the CLI.

This is a distilled release off my mcp-server-devonthink to turn it into a CLI and is fully vibe-coded. I tested it a good bit, but use at own risk.

And of course the disclaimer: If you really want to hook up OpenClaw to DEVONthink, be aware that OpenClaw can wipe your entire DEVONthink data if it feels like it. Make sure sure you have backups or heavily restrict all write actions so it can only read.

CLI usage

Use dt –-help to get all tools

How to install?

With skills:

npx skills add dvcrn/devonthink-cli

And install the CLI itself with

npm install -g devonthink

What can it do?

Everything the MCP server can do:

tools
schema <tool>
is_running
open_databases
current_database
selected_records
search [query]
lookup_record [lookupType]
list_group_content [uuid]
record_properties [uuid]
record_content [uuid]
record_by_identifier [uuid]
create_record [name]
create_from_url [url]
rename_record [uuid]
move_record [uuid]
delete_record [uuid]
add_tags [uuid]
remove_tags [uuid]
update_record_content [uuid]
set_record_properties [uuid]
classify [recordUuid]
compare [recordUuid]
replicate_record [uuid]
duplicate_record [uuid]
convert_record [uuid]
check_ai_health
ask_ai_about_documents [question]
create_summary_document
ai_tool_documentation [toolName]

Can I use this with Claude Cowork?

Sadly no, Claude Cowork executes everything in a sandbox which doesn’t allow applescript connections from sandbox to host DEVONthink.

If you want to use Claude Cowork with DEVONthink, use the MCP Server. That one works

This vs MCP, what should I use?

I’m biased on this so I would say MCP. But if you use stuff like OpenClaw (which doesn’t support MCP) or Perplexity Computer, using the agent skill is probably better.

1 Like

Totally agree with you on severe Caution with OpenClaw - especially since your MCP works really well with Claude Dispatch, which does much of what OpenClaw can do with better guardrails.

That said- I am curious why you say OpenClaw or Perplexity Computer do not have good MCP support. Particularly for local MCP servers they work pretty well.

Oh do they support MCP now? Especially for OpenClaw, the maintainer was very vocal about not liking MCP and not wanting to add support for it. There’s a big group of people who prefer CLI > MCP for everything

I think OpenClaw has many avid developer types so they prefer CLI. “Power Users” may prefer MCP.

Your MCP server does work with Perplexity for Mac. However when using the same model (Opus 4.6) Perplexity for Mac fails at a query that works fine with Claude Cowork. Not sure why.

I gave it a quick try and it works fine for me in the Perplexity macOS app. Added in Settings → Connectors

Also wow, you’re probably the first person I know with Perplexity Max

The search syntax used by Perplexity (creation:==2026-04-01) is not (yet) supported.

1 Like

Thank you - I was able to get it working with a slight change in the prompt which changed the search syntax.

Well I am experimenting with something that may make Perplexity Max quite cost-effective for my use. Your MCP server may be part of that.

Perplexity Max offers high rate limits on “deep research” searches using Opus 4.6. There is also an Enterprise Perplexity Max plan which can be subscribed for only 1 person at a cost of $325 per month. While that is expensive, it is a HIPAA compliant offering. And it allows up to 500 deep research searches per month. With your MCP I can directly access files in a Devonthink group simply by referencing the X-Devonthink link for the group - and the final report can be placed back into Devonthink by the MCP.

If this works as I am hoping then it means I can use Devonthink 4 and Perplexity Desktop to get detailed summaries of large medical record sets using Opus 4.6 in a HIPAA compliant fashion for under $1 per detailed summary. That would be an incredible deal/value if it works as I suspect. And no need to upload files manually to Perplexity from Devonthink.

So I am testing things for a month to see if this arrangement can do this. If yes then it would be more than 10 times less expensive than any API-based solution particularly for use of Opus 4.6.

@cgrunenberg

Can you give some insight into this limitation? Perplexity Desktop created a very nice detailed summary of a set of records but it says the resulting report is too large to save directly into Devonthink.

There’s no such limitation actually. At least as far as DEVONthink is concerned - I can’t comment on the used MCP server or on Perplexity’s MCP support.

1 Like

OK Thanks.

It does work in some situations but not all - size does not seem to be the limiting issue. I will experiment a bit more.

Worst case since it is a local app I can just save it to the local desktop and then upload to Devonthink from there.

FWIW In many but not all cases the reason to prefer CLI over MCP is effeciency and a reduction in errors.

  1. Claude Code (and presumably Codex) work well with zsh/bash commands. Access via CLI is using a well trodden path.
  2. Token efficiency - some MCPs are fiddly spending time interacting with GUIs. This is slower, error prone and generally consumes more tokens.

For me it’s case by case. Before I use an MCP or CLI I look at the code under the hood and see how it works.

We can probably solve this by adding a new “import file” tool or similar to the MCP that uses the native DEVONthink import command instead of createRecord with content

haven’t looked into it yet but I recall this existing

1 Like

I tried it with Claude Cowork tonight. Claude Cowork used the MCP access to create a stuning detailed HTML-formatted document summary from a set of 30 PDF files. Interestingly instead of using the MCP to add the report to Devonthink it wrote a short Applescript to add the summary file.

Released importFile tool in 1.9.0 - Release 1.9.0 · dvcrn/mcp-server-devonthink · GitHub

Give it a try, but it might run into issues with sandboxing

Thanks

I found that sandboxing with Perplexity Desktop is limiting because that means it cannot save files or reports to iCloud. iCloud is a very convenient way to receive reports regardless of which device I am on. Is this likely to occur with the sandboxing in 1.9.0?

I meant, how the new importFile tool works is, it needs a file path to a file on your disk, then tells DEVONthink to import that file.

So when you run into issues that createRecord doesn’t work because of too much content, you can tell the agent to write a temporary file somewhere first, like /tmp/foo.txt and then use importFile on /tmp/foo.txt

But I don’t know if Claude Cowork sandbox allows host → sandbox file access

Thanks.. I will be out of town a few days and will try it when I return.

DEVONthink CLI is cool. However, I would suggest to output the specific results within the document, instead of the document only. For example, I used dt search "nationalism", its output is like:

Results:
  - Item 1
    Id: 2206588
    Uuid: 03CF4017-1689-4112-9213-E96C1EA37FD0
    Name: Nakai - 2025 - Nationalism and Environmentalism from the Global Perspective
    Path: /Users/username/Library/...
    Location: /Research/Nationalism/...
    Record Type: PDF document
    Kind: PDF+Text
    Creation Date: Fri May 10 2024 20:19:27 GMT-0400 (Eastern Daylight Time)
    Modification Date: Sun Feb 16 2025 06:37:46 GMT-0500 (Eastern Standard Time)
    Size: 973893
    Score: 1
    Tags:
      (empty)

If the output contains the matched paragraph within the documents, it would more similar to DEVONthink GUI’s search behaviors, and the search results would be much more helpful for AI Agents. Thanks for your consideration.

Thanks for the share! I took a different route (zero trust / human in the middle) and gutted any delete or edit operations from the Hermes skill I’m working on. Instead, Hermes (running in a vibe container (I want to use an Apple container but I’m lazy)) can do one of two things: it can edit docs and write the proposed draft to its own folder so I can review. Or, it has a hardwired DT database it can play with to show me what it wants to do. Sure, the sandboxed DT database is extreme but I never want to come home to find out that he decided my ancient untouched archives needed pruned. These skills are profiled in Hermes so it’s as close to air gapping as I could make it.

Hermes can’t send emails. Can only put the file in a watched folder with a message file and AppleScript will only send it only to me - that way I can avoid any exfiltration.

Poor Hermes isn’t even allowed to web search on his own either. He has to ask devonagent and wait for the results to show up as processed markdown.

Hermes so far likes it though. So do I.