logseq-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@logseq-mcplist my open tasks due today"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
logseq-mcp
An MCP server that lets an AI agent operate a Logseq (DB) graph through a small set of safe, high-level tools — read notes and tasks, capture notes, create and update tasks, and scaffold projects — without the agent having to know Logseq's internals.
It talks to Logseq's local HTTP API (the same one the desktop app exposes), and
encodes the DB-graph conventions that are easy to get wrong (real task statuses,
[[page]] vs #tag links, journal date resolution, and soft-delete awareness).
Supported: Logseq DB graphs (the newer SQLite-backed graphs). File/markdown graphs are not supported yet.
Features
Workflow tools, not raw API.
list_open_tasks,create_task,capture_note,create_project, etc. — each does the right multi-step thing under the hood.Safe by default. Reads are free; writes are validated; destructive tools (
archive_page,remove_block) only soft-delete and requireconfirm=trueafter showing a preview.Read-only mode. Set
LOGSEQ_MCP_READONLY=trueto disable all writes.Clear failures. Logseq closed, bad token, or bad input each return an actionable message, never a stack trace.
Related MCP server: kontexta
Install
# from source
pip install -e .
# or install as a stable command for daily use (MCP clients point at this)
uv tool install .
# or run without installing (once published)
uvx logseq-mcp
pipx run logseq-mcpRequires Python 3.10+.
Upgrading a
uv tool install:uv tool install . --forcecan reuse a cached wheel when the version is unchanged, so code edits may not take effect. Useuv tool install . --force --no-cacheto force a fresh build, then restart your MCP client so it picks up the new tools.
Configure
In Logseq desktop: Settings → Features → enable "HTTP APIs server", start the server, and copy the authorization token.
Provide these to the server (via your MCP client's
envblock, or a local.envfor development — see.env.example):
Variable | Default | Meaning |
| (required) | HTTP API token |
|
| API base URL |
|
| disable all write tools |
|
| request timeout (seconds) |
The token is never hardcoded or logged.
MCP client setup
Claude Code
claude mcp add logseq -- logseq-mcp
# then set env, e.g. in .mcp.json:{
"mcpServers": {
"logseq": {
"command": "logseq-mcp",
"env": { "LOGSEQ_TOKEN": "your-token-here" }
}
}
}Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"logseq": {
"command": "logseq-mcp",
"env": { "LOGSEQ_TOKEN": "your-token-here" }
}
}
}(If not installed on PATH, use "command": "python", "args": ["-m", "logseq_mcp"].)
Tools
Tool | Kind | Description |
| read | Find blocks by keyword; optionally filter by task status |
| read | Read a page as an outline |
| read | Open tasks (filtered, sorted by deadline) |
| read | Project pages + open-task counts |
| read | Read a journal entry |
| read | Blocks that link to a page (optionally via |
| read | Blocks that mention a page's name without linking it |
| read | Pages a block links to |
| read | Blocks that reference a block via |
| read | Read user/graph configuration |
| write | Create a real task |
| write | Create several tasks at once |
| write | Move a task's status |
| write | Set or clear a task's priority |
| write | Set or clear native SCHEDULED/DEADLINE dates |
| write | Append a note (journal or page) |
| write | Create a flashcard (review in Logseq) |
| read | Flashcards due for review (new or past-due) |
| write | Add a live-query dashboard widget |
| write | Scaffold a project page |
| write | Rename a project page |
| write | Add a |
| write | Remove a |
| write | Reference one block from another ( |
| destructive | Soft-delete a page (preview first) |
| destructive | Remove a block (preview first) |
Resources: logseq://graph, logseq://projects, logseq://today.
Safety model
Reads never modify anything.
Writes validate input first and are disabled entirely in read-only mode.
Destructive tools soft-delete only (recoverable in Logseq's trash), require an explicit
confirm=true, and return a preview whenconfirmis omitted.create_tasksets the status property (never injects "TODO" text);capture_noteis append-only;create_projectrefuses to overwrite an existing live page.
Troubleshooting
"Cannot reach Logseq…" — the desktop app isn't running, or the HTTP APIs server is off. Enable it in Settings → Features.
"Logseq rejected the API token" —
LOGSEQ_TOKENdoesn't match the token shown in Logseq's HTTP APIs server settings."supports Logseq DB graphs only" — the open graph is a file/markdown graph; open a DB graph.
A journal date has no page — open that day in Logseq once (or
capture_noteto it).
Development
pip install -e ".[dev]"
pytest # unit tests (offline)
LOGSEQ_TOKEN=… pytest -m integration # live tests (needs Logseq running)
ruff check . && mypy srcLicense
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/anshulbansod2/logseq-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server