mcp-logseq: MCP server for Logseq
MCP server for LogSeq
MCP server for Logseq: the agent reads, searches and edits pages and blocks of your graph over the local HTTP API
- 348 ★ on the repository
- Last commit
- MIT
Broad access
Why this level
- The agent can create, change and delete pages and blocks of your graph unless a write namespace list is set
- Notes are read in full, and with hosted embeddings their text is sent to a third-party provider
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add mcp/mcp-server-for-logseqDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- The agent can create, change and delete pages and blocks of your graph unless a write namespace list is set
- Notes are read in full, and with hosted embeddings their text is sent to a third-party provider
This is third-party code. Review the repository files before installing.
What it does
The server connects an agent to Logseq through its local HTTP API and gives it 17 tools for pages and blocks. The agent creates, reads, edits, renames and deletes pages. It works with blocks by UUID, nested ones included, and also sees backlinks, searches and runs queries in the Logseq query language. Pages can be selected by property, and namespaces viewed as a tree. The server turns Markdown text into Logseq blocks itself: headings become sections, lists become nested blocks, a YAML header becomes page properties, and checkboxes become TODO and DONE tasks. If a page title is already taken, creation fails with an error, so a retry after a timeout does not spawn duplicates like Page(1). Semantic search by meaning is optional and brings three tools of its own. Embeddings come from a local Ollama or an OpenAI-compatible provider, while the LanceDB vector store stays on your machine. For Logseq graphs in DB mode there is an option to read and write class properties.
Who it is for. For people who keep notes in Logseq and want Claude Code, Codex or OpenCode to digest the graph, build summaries and create pages.
Good fit when
- You want to assemble a weekly review from journal pages and save it as a new page
- You need to find open TODO tasks across the whole graph and list them
- Meeting notes should be split into separate task pages with nested blocks
- You want to search notes by meaning even when the exact word is missing, which the vector search covers
- The agent should see only part of the graph, for example without pages carrying private tags
Not a fit when
- Your notes live in Obsidian or another store: the server works only with Logseq
- The Logseq app is closed: the HTTP API works only while its server runs inside the app
- You need complex selections in raw datalog: the query tool accepts Logseq DSL queries only
- Notes must not go to an outside provider: with hosted embeddings the note text is sent to their server
Example request
Find open TODO tasks tagged with the project across all pages and create a page that summarizes them by due date.MCP
- Transport
- stdio, http
- Authentication
- API key
Environment variables
LOGSEQ_API_TOKENrequired, secret- Authorization token created in the Logseq API panel.
LOGSEQ_API_URL- Logseq API address, http://localhost:12315 by default.
LOGSEQ_EXCLUDE_TAGS- Comma-separated tags; pages carrying them are hidden from the agent.
Limitations
In Logseq you must enable the HTTP API server in settings, start it with the button and create an authorization token. Running the server needs the uv package manager.
The agent's access is restricted at page level: you can hide pages by tag, keep only chosen namespaces or allow writes in some of them. Without these settings the agent sees and changes the whole graph, including deleting pages and blocks.
The query tool understands the Logseq query language and does not accept raw datalog. Vector search is still experimental and needs separate setup. Whether embedding providers are reachable from Russia has not been checked.
How to disable. Remove the server with claude mcp remove mcp-logseq or delete its block from the client configuration, then revoke the token in the Logseq API panel.
FAQ
How do I connect Logseq to Claude Code?
Once the HTTP API is on and the token exists, run claude mcp add mcp-logseq with the LOGSEQ_API_TOKEN and LOGSEQ_API_URL variables and the command uv run --with mcp-logseq mcp-logseq. No prior install is needed, uv fetches the package itself.
Can I limit which pages the agent sees?
Yes. LOGSEQ_EXCLUDE_TAGS hides pages with the listed tags, LOGSEQ_INCLUDE_NAMESPACES keeps only the listed namespaces, and LOGSEQ_WRITE_NAMESPACES allows writes in some of them only. Hidden pages never appear in listings or search.
How do I turn on semantic search?
It is optional, and the separate VECTOR_SEARCH.md guide covers the setup. After that the agent gets the vector_search, sync_vector_db and vector_db_status tools.
Does the server work with Codex and OpenCode?
Yes, the documentation has ready settings for Codex CLI in config.toml and for OpenCode in opencode.json. For Codex the API address is given without the mcp suffix, and the server runs over stdio.
What happens if a page with that title already exists?
The create_page tool returns an error and makes no copy. For large writes the author suggests creating a nearly empty page, appending chunks with update_page and verifying by reading back.
Discussion
No questions or reviews yet.
Related
MCP serversObsidian MCP Server
obsidian-mcp-server
An MCP server for an Obsidian vault: read, search and precisely edit notes, sections, frontmatter and tags
A Rust MCP server for a folder of Markdown notes: an agent searches and reads notes and sees backlinks, tags, tasks and version history
An MCP server for an Obsidian vault via the Local REST API plugin: search, read, append and patch notes
An MCP server for Linear: issues, projects, cycles, milestones, documents and project updates via the GraphQL API
Minutes
minutes
A local-first MCP server for meeting memory: on-device recording and transcription into Markdown, searchable from Claude Code, Codex, Cursor and any MCP client
A skill and MCP server let an agent search and analyze meeting, lecture and stream transcripts kept by the DeLive app
README in short
The documentation walks through example requests to the graph and gives a table of every tool. Separate sections cover private pages, splitting read access from write access and setup for different clients.