Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"logseq": {
"env": {
"LOGSEQ_API_URL": "http://127.0.0.1:12315",
"LOGSEQ_API_TOKEN": "<YOUR_KEY>"
},
"args": [
"mcp-server-logseq"
],
"command": "uvx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
A Model Context Protocol server that provides direct integration with Logseq's knowledge base. This server enables LLMs to interact with Logseq graphs, create pages, manage blocks, and organize information programmatically.
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
uvx 'mcp-server-logseq' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
Checked mcp-server-logseq against OSV.dev.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in productivity
Dynamic problem-solving through sequential thought chains
Persistent memory using a knowledge graph
mini cli search engine for your docs, knowledge bases, meeting notes, whatever. Tracking current sota approaches while being all local
Official Notion MCP Server
MCP Security Weekly
Get CVE alerts and security updates for Logseq Mcp and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
A Model Context Protocol server that gives an LLM configurable, safety-scoped access to a Logseq graph: query and search broadly (all output filtered by a blacklist), but write only inside the agent's own namespace plus a narrow task-status channel.
Built on FastMCP (the high-level API of the official mcp package).
Targets the file/Markdown ("OG") version of Logseq. The newer DB (SQLite) version changed the underlying schema; some methods may behave differently there.
{
"mcpServers": {
"logseq": {
"command": "uvx",
"args": ["mcp-server-logseq"],
"env": {
"LOGSEQ_API_TOKEN": "<YOUR_TOKEN>",
"LOGSEQ_API_URL": "http://127.0.0.1:12315"
}
}
}
}
| Source | Token | URL |
|---|---|---|
| Environment | LOGSEQ_API_TOKEN | LOGSEQ_API_URL (default http://localhost:12315) |
| CLI flag | --api-key | --url |
The token is read from the environment or --api-key; it is never stored in
code. A .env file is supported (see .env.example).
Behaviour beyond the defaults is set in a TOML file — path from
LOGSEQ_MCP_CONFIG (default ~/.config/logseq-mcp/config.toml). Custom queries
live in EDN files next to it. The server runs fine with no config file (safe
read-mostly defaults); see examples/config.toml for a
full annotated example.
| Section | Key options |
|---|---|
[read] | resolve_depth — how deep to expand ((block refs)) |
[write] | agent_write_prefix (default byAgent), allow_agents_write_any |
[search] | files_path — graph folder; set it to use the ripgrep backend |
[blacklist] | pages — pages (and subpages) to hide and redact everywhere |
[tasks] | allow_status_change — gate for set_task_status |
[audit_log] | enabled — log writes to today's journal |
[queries.<name>] | a named query: file/inline query, register_as_tool, … |
Secrets and the API URL stay in the environment, never in this file.
By default the server runs over stdio (for Claude Desktop and other local clients). A Streamable HTTP transport is also available for remote/networked use (e.g. a phone client):
LOGSEQ_MCP_HTTP_TOKEN=<client-secret> \
mcp-server-logseq --transport streamable-http --host 0.0.0.0 --port 8000
# MCP endpoint: http://<host>:8000/mcp
Env vars: LOGSEQ_MCP_TRANSPORT, LOGSEQ_MCP_HOST, LOGSEQ_MCP_PORT,
LOGSEQ_MCP_HTTP_TOKEN (or --http-token).
The Streamable HTTP transport requires a bearer token: every request must
send Authorization: Bearer <LOGSEQ_MCP_HTTP_TOKEN>, or it gets 401. The
server refuses to start in this mode without a token set. Note this is a
distinct secret from LOGSEQ_API_TOKEN:
| Secret | Direction |
|---|---|
LOGSEQ_API_TOKEN | this server → Logseq |
LOGSEQ_MCP_HTTP_TOKEN | client (phone) → this server |
⚠️ A bearer token over plain HTTP is only safe on an already-encrypted channel. Don't expose the raw port to the open internet. The easy path for a home/headless host is Tailscale: install it on the host and the client, and reach
http://<host>.<tailnet>.ts.net:8000/mcpover the encrypted tunnel — no domains, nginx, or certificates. (tailscale servecan add TLS if you wanthttps://.)
Build once:
docker build -t logseq-mcp .
Quick t