Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

Logseq cli

MCP server by wolf-jonathan Verified · gh:wolf-jonathan

Logseq CLI is a command line tool for the Logseq local HTTP API. It lets people and AI agents list, read, edit and query a Logseq graph from shell pipelines, with NDJSON output.

  • Score 54
  • 13 stars
  • MIT
  • Updated

Install Logseq cli

Built from the published package, never by AI.

claude mcp add logseq-cli -- uvx logseq-cli

Run in your terminal. Add --scope user to use it in every project.

Step-by-step: install Logseq cli in Claude Code

MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the logseq-cli block.

About

Logseq CLI wraps the official Logseq local HTTP API as Unix-style shell commands. Commands such as page list, page get, block append and query run return one JSON object per line, so their output can be piped into jq or the next command. Errors are written to stderr, which keeps stdout clean for piping. Some commands read identifiers from upstream NDJSON when no argument is given, and a --fields option trims output to chosen keys.

The tool requires Logseq Desktop with the HTTP API server enabled, plus an API token stored with logseq auth set-token. The README says it is built for humans and AI agents alike. It suits users who want to script Logseq, and agents that need structured, token-efficient access to a graph without extra glue code.

Written from the project's README and checked against it.

Tools it gives your assistant

  • page listLists all pages, with optional --fields, --plain, --page and --page-size options.
  • page getGets a page by name, reading the name from upstream NDJSON when omitted.
  • page journalCreates or gets a journal page for a date in YYYY-MM-DD format.
  • block appendInserts a block at the bottom of a page.
  • block insert-batchInserts a JSON array of blocks with content and optional children.
  • block prop-setUpserts a property on a block.
  • query runRuns a Datalog query, with repeatable --input values for parameterized queries.
  • graph infoReturns the current graph name and path.

What you need

  • Python 3.10+
  • Logseq Desktop with the HTTP API server enabled
  • Windows, macOS, or Linux

Try asking

  • Append a new thought to my journal page using logseq block append
  • List all my Logseq pages and show only the name and uuid fields
  • Run a Datalog query on my graph and summarize the results

Good to know

  • Requires Logseq Desktop to be running with the HTTP API server enabled.
  • Some Logseq HTTP API methods are absent or non-functional in current builds.
  • Some commands use fallbacks, such as reading the page tree for block append.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: README.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to Logseq cli

All alternatives →

Compare with Zotero MCP, Agentdb or Genkitx MCP

Logseq cli: common questions

Does Logseq CLI work with AI agents?

The README says it is built for humans and AI agents alike. Its NDJSON output and --fields option are described as suitable for LLM-driven workflows.

Where does Logseq CLI send errors?

Errors are always written to stderr so that stdout only carries data. This keeps pipelines safe at each step.

Does it need a separate Logseq plugin?

The CLI uses the official local HTTP API exposed by Logseq Desktop. The README says this avoids both the plugin API and direct file manipulation.

How do I install Logseq cli?

In Claude Code run claude mcp add logseq-cli -- uvx logseq-cli. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.

Is Logseq cli the official server?

Logseq cli is published by gh:wolf-jonathan from its verified domain in the official MCP Registry.

Is Logseq cli free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is Logseq cli safe to use?

It scores 54 of 100. Grades: maintenance C, licence A, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to Logseq cli?

Similar MCP servers: Zotero MCP, Agentdb, Genkitx MCP, Qmd.

Does Logseq cli work with ChatGPT?

Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.

Logseq cli Install

Add to stack

Loading.