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.
Install Logseq cli
Built from the published package, never by AI.
claude mcp add logseq-cli -- uvx logseq-cliRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"logseq-cli": {
"args": [
"logseq-cli"
],
"command": "uvx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"logseq-cli": {
"args": [
"logseq-cli"
],
"command": "uvx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"logseq-cli": {
"args": [
"logseq-cli"
],
"command": "uvx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add logseq-cli -- uvx logseq-cli{
"mcpServers": {
"logseq-cli": {
"args": [
"logseq-cli"
],
"command": "uvx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add logseq-cli uvx logseq-cliGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
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
ANo 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 →Connects a Zotero research library to AI assistants such as Claude and ChatGPT through the Model Context Protocol. It lets the assistant search, read, annotate and add papers, in local mode or through the web API. Built for researchers who want their references available in chat.
AgentDB is a vector memory database for AI agents. It stores embeddings, indexes and learning state in one file and exposes 41 MCP tools to clients such as Claude Code, Cursor and Cline.
Genkitx MCP is listed as a Genkit plugin for Model Context Protocol interoperability. The source is the main Genkit framework README and does not describe this plugin, so its features cannot be confirmed.
QMD is an on-device search engine for markdown notes, meeting transcripts and documentation. It combines BM25 keyword search, vector search and LLM reranking, and exposes an MCP server for AI assistants.
RuVector is a Rust native vector database that gives AI agents persistent memory and local semantic retrieval. Its npm package includes an MCP server for MCP compatible clients, and it suits developers building agent memory in Node.js, Python, or Rust.
Gives AI coding agents persistent memory, so each new session starts where the last one left off. Works with Claude Code, Codex, Cursor, OpenCode and 11 more agents.
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.
