ya-logseq-mcp
Exposes Logseq read/write tools over MCP for page and block retrieval, creation, updates, deletion, references, journal access, renaming, and moving blocks via the Logseq API.
Click on "Deploy 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., "@ya-logseq-mcp append 'Buy milk' to today's journal"
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.
ya-logseq-mcp
Python MCP server for Logseq.
What This Is
ya-logseq-mcp exposes Logseq read/write tools over MCP stdio so MCP clients can automate page and block workflows.
Related MCP server: MCP-Logseq
Why ya-logseq-mcp
ya-logseq-mcp is a Python MCP server that exposes Logseq read and write operations as MCP tools, targeting Claude Desktop and any compatible MCP stdio client. It deduplicates blocks by UUID at read time and returns lean responses by default.
Tools
Tool | Description |
| Ping Logseq and return graph name and page count |
| Return a page entity and deduplicated block tree by page name |
| Get a single block by UUID |
| List pages with optional namespace filter |
| Get backlinks to a page (pages that reference this page) |
| Create a new page with optional properties and initial blocks |
| Append blocks to a page; accepts flat strings or nested objects with content, properties, and children |
| Update block content by UUID |
| Delete a block by UUID |
| Delete a page by name |
| Rename a page from old_name to new_name |
| Move a block before, after, or as a child of a target block |
| Get or create today's journal page and return its block tree |
| Append blocks to a journal page for a given date |
| Return journal entries for all existing pages between start_date and end_date |
Requirements
Complete this checklist before install:
Python 3.12+ is installed:
python3 --versionuvis installed:uv --versionLogseq Desktop is running with API enabled:
Settings -> Features -> Enable developer mode -> Enable API serverLOGSEQ_API_TOKENis available from Logseq:Settings -> Features -> API server -> API token
Install
Clone or copy the repo, then run from the repo root:
set -euo pipefail
cd /path/to/ya-logseq-mcp
python3 --version
uv --version
uv syncRun Locally
Script-first launch:
LOGSEQ_API_TOKEN=<token> uv run ya-logseq-mcpModule fallback for troubleshooting only:
LOGSEQ_API_TOKEN=<token> uv run python -m logseq_mcpexpected first-run result:
Process starts without Python traceback.
MCP server stays attached to stdio while the client is connected.
healthrequests return{"status":"ok",...}from your MCP client.
MCP Client Config
Primary example for Claude Desktop (copy/paste-ready):
{
"mcpServers": {
"ya-logseq-mcp": {
"command": "uv",
"args": [
"run",
"--project",
"/path/to/ya-logseq-mcp",
"ya-logseq-mcp"
],
"cwd": "/path/to/ya-logseq-mcp",
"env": {
"LOGSEQ_API_URL": "http://127.0.0.1:12315",
"LOGSEQ_API_TOKEN": "<token>"
}
}
}
}Replace /path/to/ya-logseq-mcp with the absolute path to your cloned repo.
equivalent MCP clients (Cursor, VS Code MCP, custom launchers) should use the same
command, args, cwd, and env shape.
startup semantics: command + args must launch the ya-logseq-mcp entrypoint.
parse validation for this JSON block is included in the verification commands for this plan.
Smoke Check
Run checks in this order:
Unit smoke:
uv run pytest tests/test_server.py -qMCP stdio integration smoke:
export LOGSEQ_API_TOKEN=<token>
uv run pytest tests/integration/test_mcp_stdio.py -x -q -m integrationPass/fail interpretation:
PASS: pytest exits
0and reports passing tests.FAIL: pytest exits non-zero or reports failures/errors.
If smoke fails:
Re-check token and API availability (
LOGSEQ_API_TOKEN, Logseq API enabled).Re-run locally with
uv run ya-logseq-mcp --help.Follow troubleshooting and maintainer checks in
RUNBOOK.md.
Docs-Only Onboarding Verification (fresh shell)
Use this when validating docs from a clean environment:
env -i HOME="$HOME" PATH="$PATH" bash -lc '
set -euo pipefail
cd /path/to/ya-logseq-mcp
python3 --version
uv --version
uv sync
test -n "${LOGSEQ_API_TOKEN:-}" || echo "LOGSEQ_API_TOKEN not set in fresh shell"
uv run ya-logseq-mcp --help >/tmp/ya-logseq-mcp-help.txt
'DOCS-01 success markers:
prereqs visible in output (
python --version,uv --version)install command succeeds (
uv sync)startup command reaches ready/no-traceback state (
ya-logseq-mcp --helpexits cleanly)
For maintainers, onboarding accuracy checks live in RUNBOOK.md.
Available Tools
15 toolsblock_appendD
Inputs: page (required), blocks (required). Returns: result
block_deleteD
Inputs: uuid (required). Returns: result
block_updateD
Inputs: uuid (required), content (required). Returns: result
delete_pageD
Inputs: name (required). Returns: result
get_blockC
Get a single block by UUID.
Inputs: uuid (required), include_children. Returns: result
get_pageB
Return a page entity and deduplicated block tree by page name.
Inputs: name (required). Returns: result
get_referencesB
Get backlinks to a page (pages that reference this page).
Inputs: name (required). Returns: result
healthA
Ping Logseq and return graph name and page count.
Inputs: no named parameters. Returns: result
journal_appendD
Inputs: date (required), blocks (required). Returns: result
journal_rangeD
Inputs: end_date (required), start_date (required). Returns: result
journal_todayD
Inputs: no named parameters. Returns: result
list_pagesC
List pages with optional namespace filter.
Inputs: limit, namespace, include_journals. Returns: result
move_blockD
Inputs: uuid (required), position (required), target_uuid (required). Returns: result
page_createD
Inputs: name (required), blocks, properties. Returns: result
rename_pageD
Inputs: new_name (required), old_name (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 15 tools
Most tools target distinct resources/actions (page vs block vs journal vs references), but several write tools have empty descriptions, leaving ambiguity between block_append, journal_append, and page_create. The boundaries are inferable from names, but not as clear as they should be.
The set mixes verb_noun patterns (get_page, list_pages, delete_page, rename_page, move_block) with noun_verb patterns (page_create, block_append, block_update, block_delete, journal_append) and bare noun patterns (health, journal_today, journal_range). This inconsistency makes the naming convention unpredictable.
Fifteen tools is within a reasonable range for a Logseq integration, and each tool covers a distinct core operation across pages, blocks, journals, and references. The surface feels well-scoped rather than padded.
The server covers core page/block CRUD, moving blocks, references, and journal access, which is strong lifecycle coverage for a Logseq MCP. Minor gaps remain around search, page property updates, and fetching a specific journal date directly, but agents can work around most of these.
Maintenance
Related MCP Connectors
MCP-native open-source Notion alternative: read & write pages, databases and kanban boards.
Remote MCP server for notes, tasks, kanban boards and docs - the Slates agentic workspace
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Related MCP Servers
- AlicenseAqualityBmaintenanceExposes the mindgap knowledge graph as an MCP server over stdio, providing tools to add, link, query, and manage nodes and edges in a local org-roam-style graph.10MIT
- AlicenseNot gradedqualityDmaintenanceConnects MCP-compatible AI assistants to Logseq graphs, enabling block-first operations, block references, and context graph building.MIT
- AlicenseCqualityDmaintenancePython stdio MCP server that interfaces with the Logseq local HTTP API, enabling tools to manage pages, blocks, queries, and graph configurations in Logseq.642MIT

seojeom-mcpofficial
AlicenseNot gradedqualityDmaintenanceLocal-first MCP server that binds to a project opened by the Seojeom desktop app and serves its local wiki and graph data over stdio, enabling project-aware reading, searching, and writing of wiki and graph content.6 npmMIT