Logseq MCP Server
The Logseq MCP Server enables AI assistants like Claude to directly read, write, and navigate your local Logseq knowledge graph through the Model Context Protocol.
Page Management (CRUD):
List all pages with metadata (tags, links, backlinks), filtered by
pagesorjournalsfoldersRead, create, update, delete, and append content to pages
Full support for Logseq properties and metadata
Search & Discovery:
Full-text search across page content and titles
Filter results by tags and folders
Get backlinks to see all pages referencing a specific page
Traverse the knowledge graph with configurable depth and center points
Journal Operations:
Access and create daily journals for today or any specific date
Create entries with optional templates
Log structured content: articles (with title, summary, tags, URL, highlights), books (with title, author, tags, memo), movies (with title, director, memo), and exhibitions (with title, venue, artist, memo)
Key Features:
Direct filesystem access to local Logseq graphs (Markdown format, not Logseq Sync)
Security protections against path traversal and injection attacks
Korean language optimizations (weather integration, cultural content templates)
Exposes graph pages as MCP resources for AI context
Use Cases: Automated note-taking during conversations, searching and summarizing past entries, managing TODO items, building knowledge connections, and logging media consumption.
Enables AI assistants to directly read, write, and manage Logseq graphs, including creating and modifying pages, searching content, navigating backlinks and page relationships, and managing journal entries with template support.
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., "@Logseq MCP Server 오늘 저널에 '오후 3시 팀 회의' 추가해줘"
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 Server
Let AI read and write your Logseq graph directly via MCP
Ask Codex, Claude Code, or Claude Desktop to "add this to today's journal", "find what I did last week", or "show me all pages linked to this one" - and it just works.
Why This?
Problem: Logseq is a great PKM tool, but integrating with AI assistants requires constant copy-pasting.
Solution: With this MCP server:
Claude directly writes to your journal (no copy-paste)
Search and summarize past entries (maintain context)
Navigate connections between pages (backlinks, graph)
Auto-generate daily journals with templates
You: "Summarize today's meeting notes and add them to my journal"
Claude: [writes directly to Logseq via logseq-mcp]
"Done! Added to today's journal. Anything else?"Related MCP server: Logseq AI
Is This For You?
Good fit if you...
Use Logseq as your primary PKM
Use Codex, Claude Code, or Claude Desktop regularly
Want to delegate note management to AI
Use local file-based Logseq (not Logseq Sync)
Not for you if...
Using Logseq Sync (requires local file access)
Obsidian user (different MCP server needed)
Have sensitive info in notes and uncomfortable with AI access
Use org-mode instead of Markdown (not yet supported)
Features
Feature | Description |
Page CRUD | Create, read, update, delete pages + property support |
Search | Full-text search + tag/folder filtering |
Graph Navigation | Links, backlinks, page relationship traversal |
Journal | Access today's/specific date journals + templates |
Content Logging | Log articles, books, movies, exhibitions to journal |
Resources | Expose graph pages as MCP resources |
Quick Start
1. Install
Use the published package:
npx -y @dearcloud09/logseq-mcpOr install from a local checkout for development:
git clone https://github.com/dearcloud09/logseq-mcp.git
cd logseq-mcp
npm ci
npm run build2. Configure Codex
Add the MCP server to ~/.codex/config.toml:
[mcp_servers.logseq]
command = "npx"
args = ["-y", "@dearcloud09/logseq-mcp"]
[mcp_servers.logseq.env]
LOGSEQ_GRAPH_PATH = "/path/to/your/logseq/graph"Then open Codex and run /mcp to confirm the logseq server is connected.
3. Configure Claude
Claude Code (~/.claude/settings.json):
{
"mcpServers": {
"logseq": {
"command": "npx",
"args": ["-y", "@dearcloud09/logseq-mcp"],
"env": {
"LOGSEQ_GRAPH_PATH": "/path/to/your/logseq/graph"
}
}
}
}Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"logseq": {
"command": "npx",
"args": ["-y", "@dearcloud09/logseq-mcp"],
"env": {
"LOGSEQ_GRAPH_PATH": "/path/to/your/logseq/graph"
}
}
}
}For a local checkout, replace the command with node and the args with
["/absolute/path/to/logseq-mcp/dist/index.js"].
4. Verify
Ask your MCP client: "Show me my Logseq page list"
Available Tools
Tool | Description |
| List all pages with metadata (tags, links, backlinks) |
| Read page content and metadata |
| Create new page (with property support) |
| Update page content |
| Delete a page |
| Append content to existing page |
| Search by content/title + tag/folder filters |
| Get pages that reference a specific page |
| Get page connection graph data |
| Get today's or specific date's journal |
| Create journal with optional template |
| Add article to journal (title, summary, tags, URL, highlights) |
| Add book to journal (title, author, tags, memo) |
| Add movie to journal (title, director, memo) |
| Add exhibition to journal (title, venue, artist, memo) |
Usage Examples
"Show me today's journal"
"Add this content to 'Project A' page: ..."
"Find all pages with #meeting tag"
"What pages are connected to my Goals page?"
"Search for TODO items in last week's journals"
"Create a new page called 'Reading List'"
"Summarize our conversation and save it as an article in my journal"Logseq Graph Structure
your-graph/
journals/ # Daily journals (2024_01_15.md format)
pages/ # Regular pages
logseq/ # Logseq settings
whiteboards/ # WhiteboardsSecurity
Path traversal protection (graph-only access)
Symlink/hardlink attack prevention
Input validation and sanitization
DoS protection (content size limits)
Error message sanitization
See SECURITY.md for the full security model.
Troubleshooting
"LOGSEQ_GRAPH_PATH environment variable is required"
Set LOGSEQ_GRAPH_PATH in your configuration file.
MCP server not recognized by Codex or Claude
Confirm Node.js 20+ is installed
Confirm
LOGSEQ_GRAPH_PATHis an absolute path (/Users/...format)In Codex, run
/mcpand check whetherlogseqis listedFor a local checkout, ensure
npm run buildwas executed
Pages not showing up
Check if
.mdfiles exist injournals/orpages/Verify you're using local graph (not Logseq Sync)
org-mode files not reading
Currently Markdown only. org-mode support planned for future.
Korean-Specific Features
This project includes features optimized for Korean users:
Daily Automation (Optional)
Auto-generate daily journal with weather (Korea only - uses Naver Weather) and diary template.
Copy and edit plist file:
cp com.logseq.daily-automation.plist.example ~/Library/LaunchAgents/com.logseq.daily-automation.plist
# Edit the file to replace /path/to/ with your actual pathsLoad launchd agent:
launchctl load ~/Library/LaunchAgents/com.logseq.daily-automation.plistTest manually:
./run-daily-automation.shGenerated template structure:
- [[일기]]
- [[날씨]]
- {weather info}
- [[오늘의 일기]]
- [[행복도]]
- [[오늘의 행복]]
- [[오늘의 컨디션]]
- [[수면]]
- 취침:
- 기상:
- 질: /5
- [[오늘의 생각]]
- [[Tasks]]
- TODO
- [[오늘 잘 해낸 일]]
- [[TIL]]See Korean README for more details.
Cultural Content Structure
add_book, add_movie, add_exhibition tools use Korean wikilink structure ([[문화]]). Customize the templates in src/index.ts for your language.
Development
# Install dependencies
npm ci
# Development mode (watch)
npm run dev
# TypeScript build
npm run build
# Run regression tests
npm test
# Check npm package contents
npm pack --dry-run
# Production run
npm startProject Structure
src/
index.ts # MCP server entry point, tool handlers
types.ts # TypeScript type definitions
graph.ts # Graph filesystem operationsContributing
Issues and pull requests are welcome. See CONTRIBUTING.md for setup, testing, and contribution guidelines.
Ideas for contribution
org-mode support
Logseq property search
Whiteboard support
Better graph visualization data
i18n for templates
License
Related
Available Tools
11 toolsappend_to_pageC
기존 페이지 끝에 내용 추가
Inputs: path (required), content (required).
create_journalC
오늘 또는 특정 날짜의 저널 페이지 생성
Inputs: date, template.
create_pageC
새 페이지 생성. Logseq 프로퍼티 포함 가능
Inputs: name (required), content (required), properties.
delete_pageD
페이지 삭제
Inputs: path (required).
get_backlinksC
특정 페이지를 참조하는 모든 페이지 조회
Inputs: path (required).
get_graphC
페이지 간 연결 그래프 데이터 조회. 링크/백링크/태그 관계 포함
Inputs: center, depth.
get_journalC
오늘 또는 특정 날짜의 저널 페이지 조회
Inputs: date.
list_pagesB
Graph 내 모든 페이지 목록 조회. 각 페이지의 메타데이터(경로, 이름, 태그, 링크, 백링크) 반환
Inputs: folder.
read_pageC
특정 페이지의 전체 내용과 메타데이터 조회
Inputs: path (required).
search_pagesC
페이지 내용/제목 검색. 태그 및 폴더 필터 지원
Inputs: query (required), tags, folder.
update_pageC
기존 페이지 내용 수정
Inputs: path (required), content (required), properties.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Each tool has a clearly distinct purpose targeting specific resources and actions in the Logseq domain, such as create_page vs. read_page vs. update_page vs. delete_page for page lifecycle, and get_backlinks vs. get_graph vs. search_pages for different query types. No tools appear to overlap or cause confusion in selection.
All tool names follow a consistent verb_noun pattern using snake_case, such as append_to_page, create_journal, and get_backlinks. This predictable naming scheme makes it easy for an agent to understand and use the tools without ambiguity or style mixing.
With 11 tools, the server is well-scoped for managing a knowledge graph like Logseq, covering essential operations from CRUD for pages and journals to advanced queries like backlinks and graph data. Each tool earns its place without feeling excessive or insufficient for the domain.
The tool set provides complete coverage for the Logseq domain, including full CRUD lifecycle for pages and journals, listing, reading, updating, deleting, and specialized operations like backlinks, graph retrieval, and search. There are no obvious gaps that would hinder agent workflows in this context.
Maintenance
Related MCP Connectors
Memory for Claude, ChatGPT and other AI apps: notes and docs as a searchable graph, EU-hosted.
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analy…
Long-term memory for Claude, ChatGPT, Cursor: search, save and organize notes, links, docs, videos.
Personal wiki and memory layer for AI assistants. Persistent, structured memory across sessions.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with your local Logseq knowledge base through advanced search, content creation, template management, and knowledge organization with privacy-first, local-only operations.23 npm7MIT
- AlicenseNot gradedqualityDmaintenanceEnables external AI assistants to interact with Logseq graphs through 34 specialized tools for managing pages, blocks, journals, and tasks via the local HTTP API.MIT
- AlicenseNot gradedqualityDmaintenanceConnects AI assistants to Logseq knowledge graphs to read, write, and search pages, blocks, and journals via the Model Context Protocol. It features 17 tools for full graph management, including CRUD operations, batch block insertion, and full-text search.23 npmApache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants like Claude and Codex to read, write, search, and traverse Markdown notes stored in a self-hosted knowledge base.9 npmMIT