Logseq MCP Tools

Logseq MCP 도구
이 프로젝트는 AI 에이전트가 로컬 Logseq 인스턴스와 상호 작용할 수 있도록 하는 MCP(Model Context Protocol) 도구 세트를 제공합니다.
설치
Python 3.11 이상이 설치되어 있는지 확인하세요.
이 저장소를 복제하세요
종속성 설치:
지엑스피1
Related MCP server: Logseq MCP Tools
설정
Logseq에 API가 활성화되어 있는지 확인하세요.
Logseq에서 설정 > 고급 > 개발자 모드 > 개발자 모드 활성화로 이동합니다.
그런 다음 플러그인 > Logseq 개발자 플러그인 켜기로 이동하세요.
고급 설정에서 API 토큰도 설정하세요
Logseq 재시작
Cursor MCP 구성 파일(일반적으로
~/.cursor/mcp.json)에서 MCP 서버를 구성합니다.{ "mcpServers": { "logseq": { "command": "/opt/homebrew/bin/uvx", "args": ["logseq-mcp"], "env": { "LOGSEQ_API_URL": "http://localhost:12315", "LOGSEQ_TOKEN": "your-token-here" } } } }
또는
MCP 서버를 사용하도록 Claude Code를 구성합니다.
claude mcp add범위 선택
Stdio 선택
LOGSEQ_API_URL=http://localhost:12315 LOGSEQ_TOKEN=your-token-here /opt/homebrew/bin/uvx logseq-mcp
커서와 클로드와 함께 사용
커서의 MCP 도구에 추가
위의 설정 섹션에서 표시된 대로 MCP 서버를 구성하세요.
커서를 열고 MCP 패널(사이드바)로 이동합니다.
Logseq 도구는 사용 가능한 도구 목록에 나타나야 합니다.
Claude와 함께 사용
Cursor에서 Claude를 사용하는 경우 다음과 유사한 프롬프트를 통해 Logseq 도구를 사용할 수 있음을 알려야 합니다.
"Logseq 그래프와 상호 작용하는 데 도움이 되는 Logseq 도구를 이용하실 수 있습니다. logseq.get_all_pages(), logseq.get_page(name), logseq.create_page(name) 등의 함수를 사용하실 수 있습니다."
사용 가능한 도구
모든 도구는 logseq 네임스페이스에서 사용할 수 있습니다.
페이지
logseq.get_all_pages: Logseq 그래프의 모든 페이지 목록을 가져옵니다.logseq.get_page: 이름으로 특정 페이지를 가져옵니다.logseq.create_page: 새 페이지를 만듭니다logseq.delete_page: 페이지와 해당 페이지의 모든 블록을 삭제합니다.
블록
logseq.get_page_blocks: 특정 페이지의 모든 블록을 가져옵니다.logseq.get_block: ID로 특정 블록 가져오기logseq.create_block: 페이지에 새 블록을 만듭니다.logseq.insert_block: 블록을 다른 블록의 자식으로 삽입합니다.logseq.update_block: 기존 블록을 업데이트합니다.logseq.move_block: 블록을 다른 위치로 이동합니다.logseq.remove_block: 블록과 그 모든 자식을 제거합니다.logseq.search_blocks: 쿼리와 일치하는 블록을 검색합니다.
Logseq 작업
저널 페이지
Logseq의 저널 페이지에는 특정 형식과 속성이 있습니다.
저널 페이지를 만들거나 액세스할 때 "mmm dth, yyyy"(예: "2025년 4월 4일") 형식을 사용하세요.
저널 페이지는 적절한 날짜로 Logseq에 의해 자동으로 포맷됩니다.
저널 페이지에는 Logseq에서 자동으로 설정되는 특수 속성이 있습니다.
journal?: true - 이것이 저널 페이지임을 나타냅니다.journalDay: YYYYMMDD - 숫자 형식의 날짜(예: 2025년 4월 4일의 경우 20250404)
예:
await logseq.create_page("Apr 4th, 2025")
중요: journal? 또는 journalDay 속성을 수동으로 설정할 필요는 없습니다. 적절한 날짜 형식(예: "2025년 4월 4일")으로 페이지를 생성하기만 하면 해당 속성이 적용된 저널 페이지로 자동 설정됩니다.
블록 구조 및 형식
Logseq의 블록에는 이해해야 할 몇 가지 중요한 특성이 있습니다.
자동 글머리 기호 : 모든 블록은 Logseq UI에서 자동으로 글머리 기호로 렌더링됩니다.
페이지 링크 : 이중 괄호를 사용하여 링크를 만듭니다:
[[Page Name]]계층적 블록 :
블록 구조 데이터에는 계층적 정보가 포함되어 있습니다.
parent: 부모 블록의 IDlevel: 들여쓰기 레벨(최상위 레벨의 경우 1, 들여쓰기 블록의 경우 2+)left: 왼쪽 블록(일반적으로 들여쓰기된 블록의 부모)
블록 콘텐츠 : 블록을 만들 때 텍스트 서식을 포함할 수 있습니다.
기본 마크다운이 지원됩니다(굵게, 기울임꼴 등)
블록 내의 글머리 기호는 지원이 제한될 수 있습니다.
다중 줄 콘텐츠가 지원되지만 Logseq의 구문 분석 규칙이 적용될 수 있습니다.
저널 블록 : 저널 페이지에서 생성된 블록은 다음과 같은 특수 속성을 상속합니다.
journal?: 사실journalDay: YYYYMMDD - 저널 페이지와 동일
참고: 저널 페이지와 마찬가지로 이러한 블록 속성은 Logseq에서 자동으로 처리됩니다. 저널 페이지에 블록을 생성할 때 journal? 또는 journalDay 속성을 수동으로 설정할 필요가 없습니다.
일반적인 작업에 대한 사용 예
Cursor 에이전트 작업: Cursor에 Logseq MCP 도구가 구성된 경우 다음과 같은 프롬프트를 에이전트에 제공할 수 있습니다.
"오늘의 일정에 대한 요점을 담은 '회의 메모'라는 새 페이지를 만드세요."
"오늘의 작업을 '작업' 섹션이 있는 저널 페이지에 추가"
"[[프로젝트 계획]]으로 오늘의 저널 항목을 업데이트하고, 해당 자식 요소를 '완료된 마일스톤 1'로 설정합니다."
"내 그래프에서 '파이썬 프로젝트'에 대한 블록을 검색하여 새 페이지에 구성합니다."
에이전트는 적절한 Logseq 도구를 사용하여 그래프에서 이러한 작업을 수행합니다.
Available Tools
13 toolscreate_blockA
Creates a new block on a page in the Logseq graph.
IMPORTANT NOTES:
1. All blocks are automatically formatted as bullet points in Logseq UI
2. To create links to other pages, use double brackets: [[Page Name]]
When creating blocks on journal pages:
- The block will inherit the "journal?" and "journalDay" attributes from the page
- "journalDay" will be in YYYYMMDD format (e.g., 20250404 for April 4, 2025)
Args:
page_name (str): The name of the page to create the block on.
content (str): The content of the new block.
properties (dict, optional): Properties to set on the new block.
Returns:
dict: Information about the created block.
Inputs: page_name (required), content (required), properties.
create_pageA
Creates a new page in the Logseq graph.
For journal pages, use the format "mmm dth, yyyy" (e.g., "Apr 4th, 2025").
Journal pages are specially formatted in Logseq with automatic dating.
When you create a journal page, Logseq automatically:
- Sets "journal?": true
- Sets "journalDay": YYYYMMDD (e.g., 20250404 for April 4, 2025)
- Formats the page as a journal entry
Args:
name (str): The name of the new page.
properties (dict, optional): Properties to set on the new page.
Returns:
dict: Information about the created page.
Inputs: name (required), properties.
delete_pageA
Deletes a page from the Logseq graph.
This operation removes the specified page and all its blocks. This action cannot be undone.
For journal pages, use the format "mmm dth, yyyy" (e.g., "Apr 4th, 2025").
Args:
name (str): The name of the page to delete.
Returns:
dict: Result of the deletion operation.
Inputs: name (required).
get_all_pagesA
Gets all pages from the Logseq graph.
Journal pages can be identified by the "journal?" attribute set to true and
will include a "journalDay" attribute in the format YYYYMMDD.
Returns:
list: A list of all pages in the Logseq graph.
Inputs: no named parameters.
get_blockA
Gets a specific block from the Logseq graph by its ID.
The returned block contains information about its hierarchical structure:
- parent: The parent block's ID
- level: The indentation level (1 for top-level, 2+ for indented blocks)
- left: The block to the left (typically the parent for indented blocks)
If the block is from a journal page, it will include:
- "journal?": true
- "journalDay": YYYYMMDD - Date in numeric format
Args:
block_id (str): The ID of the block to retrieve.
Returns:
dict: Information about the requested block.
Inputs: block_id (required).
get_pageA
Gets a specific page from the Logseq graph by name.
For journal pages, use the format "mmm dth, yyyy" (e.g., "Apr 4th, 2025").
Note that journal pages are automatically created in Logseq with this date format.
Journal pages have specific attributes:
- "journal?": true - Indicates this is a journal page
- "journalDay": YYYYMMDD - The date in numeric format (e.g., 20250404 for April 4, 2025)
Args:
name (str): The name of the page to retrieve.
Returns:
dict: Information about the requested page.
Inputs: name (required).
get_page_blocksA
Gets all blocks from a specific page in the Logseq graph.
For journal pages, use the format "mmm dth, yyyy" (e.g., "Apr 4th, 2025").
Returned blocks contain information about their hierarchical structure:
- parent: The parent block's ID
- level: The indentation level (1 for top-level, 2+ for indented blocks)
- left: The block to the left (typically the parent for indented blocks)
Blocks from journal pages will have:
- "journal?": true
- "journalDay": YYYYMMDD - The date in numeric format (e.g., 20250404)
Args:
page_name (str): The name of the page to retrieve blocks from.
Returns:
list: A list of blocks from the specified page.
Inputs: page_name (required).
get_page_linked_referencesA
Gets all linked references to a specific page in the Logseq graph.
This returns blocks that contain links to the specified page using
the Logseq double bracket notation: [[Page Name]].
For journal pages, use the format "mmm dth, yyyy" (e.g., "Apr 4th, 2025").
Args:
page_name (str): The name of the page to find references to.
Returns:
list: A list of blocks that reference the specified page.
Inputs: page_name (required).
insert_blockA
Inserts a new block as a child of the specified parent block.
This allows for creating hierarchical content by adding children to existing blocks.
IMPORTANT NOTES:
1. All blocks are automatically formatted as bullet points in Logseq UI
2. To create links to other pages, use double brackets: [[Page Name]]
3. The new block will be inserted at the beginning or end of the parent's children
depending on the 'before' parameter
When inserting blocks into journal pages:
- The block will inherit the "journal?" and "journalDay" attributes
- "journalDay" will be in YYYYMMDD format (e.g., 20250404 for April 4, 2025)
Args:
parent_block_id (str): The ID of the parent block to insert under.
content (str): The content of the new block.
properties (dict, optional): Properties to set on the new block.
before (bool, optional): Whether to insert at the beginning of children.
Default is False (append at the end).
Returns:
dict: Information about the created block.
Inputs: parent_block_id (required), content (required), properties, before.
move_blockA
Moves a block to a new location in the graph.
This allows for reorganizing the structure of blocks in the graph by moving
a block (and all its children) to a different location.
IMPORTANT NOTES:
1. The block will maintain its children when moved
2. The hierarchical position depends on the 'as_child' parameter:
- If as_child=True: The block becomes a child of the target block
- If as_child=False: The block becomes a sibling after the target block
Args:
block_id (str): The ID of the block to move.
target_block_id (str): The ID of the target block to move to.
as_child (bool, optional): Whether to make the block a child of the target.
Default is False (insert as sibling).
Returns:
dict: Result of the move operation.
Inputs: block_id (required), target_block_id (required), as_child.
remove_blockA
Removes a block from the Logseq graph.
This operation permanently removes the specified block and all its children.
This action cannot be undone.
To remove a block, you need its block ID, which can be obtained from:
- get_page_blocks() function
- get_block() function
- search_blocks() function
Args:
block_id (str): The ID of the block to remove.
Returns:
dict: Result of the removal operation.
Inputs: block_id (required).
search_blocksA
Searches for blocks matching a query in the Logseq graph.
Examples of useful queries:
- page:"Page Name" - find all blocks on a specific page
- "search term" - find blocks containing the term
- page:"Apr 4th, 2025" - find all blocks in a journal
- [[Page Name]] - find references to a specific page
Returned blocks from journal pages will include:
- "journal?": true
- "journalDay": YYYYMMDD - The date in numeric format
Args:
query (str): The search query.
Returns:
list: A list of blocks matching the search query.
Inputs: query (required).
update_blockA
Updates an existing block in the Logseq graph.
IMPORTANT NOTES:
1. All blocks are automatically formatted as bullet points in Logseq UI
2. To create links to other pages, use double brackets: [[Page Name]]
When updating blocks on journal pages:
- The "journal?" and "journalDay" attributes will be preserved
- "journalDay" will remain in YYYYMMDD format (e.g., 20250404)
Args:
block_id (str): The ID of the block to update.
content (str): The new content for the block.
properties (dict, optional): Properties to update on the block.
Returns:
dict: Information about the updated block.
Inputs: block_id (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 13 tools
Each tool has a clearly distinct purpose with no overlap. For example, create_block and insert_block serve different functions (creating a block on a page vs. inserting a block as a child), and get_page_blocks and search_blocks target different retrieval methods. The descriptions reinforce these distinctions, making misselection unlikely.
All tool names follow a consistent verb_noun pattern with snake_case, such as create_block, get_page, and update_block. This uniformity makes the tool set predictable and easy to navigate, with no deviations in naming conventions.
With 13 tools, the set is well-scoped for managing a Logseq graph, covering essential operations like CRUD for pages and blocks, hierarchical manipulation, and search. Each tool serves a clear purpose without redundancy, making the count appropriate for the domain.
The tool set provides comprehensive coverage for Logseq graph management, including full CRUD for pages and blocks, hierarchical operations (move_block, insert_block), retrieval methods (get_all_pages, search_blocks), and advanced features like linked references. There are no obvious gaps that would hinder agent workflows.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Related MCP Servers
- AlicenseBqualityBmaintenanceA server that enables LLMs to programmatically interact with Logseq knowledge graphs, allowing creation and management of pages and blocks.1050 PyPI47MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides AI assistants with structured access to your Logseq knowledge graph, enabling retrieval, searching, analysis, and creation of content within your personal knowledge base.70MIT
- AlicenseAqualityDmaintenanceA Model Context Protocol server that enables AI agents to interact with local Logseq knowledge graphs, supporting operations like creating/editing pages and blocks, searching content, and managing journal entries.1315MIT
- AlicenseNot gradedqualityBmaintenanceA Model Context Protocol (MCP) server implementation that enables AI assistants to interact with Anytype's API through natural language, allowing users to manage their knowledge base through conversation.71,433 npm544MIT