Skip to main content
Glama
Logseq MCP Server

Logseq MCP Server

by dailydaniel

Logseq MCP 서버

Logseq 지식 기반과 직접 통합되는 모델 컨텍스트 프로토콜 서버입니다. 이 서버를 통해 LLM은 Logseq 그래프와 상호 작용하고, 페이지를 생성하고, 블록을 관리하고, 정보를 프로그래밍 방식으로 구성할 수 있습니다.

Claude Desktop과 함께 사용

지엑스피1

오류가 있는 경우 0.0.1 버전을 사용하세요.

{
  "mcpServers": {
    "logseq": {
      "command": "uvx",
      "args": ["mcp-server-logseq==0.0.1"],
      "env": {
        "LOGSEQ_API_TOKEN": "<YOUR_KEY>",
        "LOGSEQ_API_URL": "http://127.0.0.1:12315"
      }
    }
  }
}

Related MCP server: Logseq MCP Tools

사용 가능한 도구

블록 작업

  • logseq_insert_block - Logseq에 새 블록을 만듭니다. 매개변수 :

    • parent_block (문자열): 부모 블록 UUID 또는 페이지 이름

    • content (문자열, 필수): 블록 콘텐츠

    • is_page_block (부울): 페이지 수준 블록으로 생성

    • before (boolean): 부모 블록 앞에 삽입

    • custom_uuid (문자열): 블록에 대한 사용자 지정 UUIDv4

  • logseq_edit_block - 블록 편집 모드로 전환 매개변수 :

    • src_block (문자열, 필수): 블록 UUID

    • pos (숫자): 커서 위치

  • logseq_exit_editing_mode - 편집 모드 종료 매개변수 :

    • select_block (부울): 블록을 선택된 상태로 유지

페이지 작업

  • logseq_create_page - 새 페이지 생성 매개변수 :

    • page_name (문자열, 필수): 페이지 이름

    • properties (객체): 페이지 속성

    • journal (boolean): 저널 페이지로 생성

    • format (문자열): 페이지 형식(markdown/org)

  • logseq_get_page - 페이지 세부 정보 가져오기 매개변수 :

    • src_page (문자열, 필수): 페이지 식별자

    • include_children (부울): 자식 블록 포함

  • logseq_get_all_pages - 모든 페이지 나열 매개변수 :

    • repo (문자열): 저장소 이름

콘텐츠 검색

  • logseq_get_current_page - 활성 페이지/블록 가져오기 매개변수 : 없음

  • logseq_get_current_blocks_tree - 현재 페이지의 블록 계층 구조 매개변수 : 없음

  • logseq_get_editing_block_content - 활성 블록의 콘텐츠 가져오기 매개변수 : 없음

  • logseq_get_page_blocks_tree - 페이지의 블록 구조 가져오기 매개변수 :

    • src_page (문자열, 필수): 페이지 식별자

프롬프트

로그시퀀스 삽입 블록

Logseq 인수에 새 블록을 만듭니다.

  • parent_block : 부모 블록 참조(페이지 이름 또는 UUID)

  • content : 블록 콘텐츠

  • is_page_block : 페이지 수준 블록에 대해 true로 설정합니다.

로그시퀀스_생성_페이지

새로운 Logseq 페이지 생성 인수:

  • page_name : 페이지 이름

  • properties : JSON 형태의 페이지 속성

  • journal : 저널 페이지에 대해 true로 설정

설치

pip 사용하기

pip install mcp-server-logseq

출처에서

git clone https://github.com/dailydaniel/logseq-mcp.git
cd logseq-mcp
cp .env.example .env
uv sync

서버를 실행합니다:

python -m mcp_server_logseq

구성

API 키

  1. Logseq에서 API 토큰 생성: API → 인증 토큰

  2. 환경 변수 설정:

export LOGSEQ_API_TOKEN=your_token_here

또는 명령줄을 통해 전달하세요.

python -m mcp_server_logseq --api-key=your_token_here

그래프 구성

기본 URL: http://localhost:12315 사용자 지정 방법:

python -m mcp_server_logseq --url=http://your-logseq-instance:port

예시

회의록 페이지 만들기

Create new page "Team Meeting 2024-03-15" with properties:
- Tags: #meeting #engineering
- Participants: Alice, Bob, Charlie
- Status: pending

기존 페이지에 작업 블록 추가

Add task to [[Project Roadmap]]:
- [ ] Finalize API documentation
- Due: 2024-03-20
- Priority: high

첫 번째 블록으로 저널 항목 만들기

Create journal entry for today with initial content:
- Morning standup completed
- Started work on new authentication system

디버깅

npx @modelcontextprotocol/inspector uv --directory . run mcp-server-logseq

기여하다

Logseq 통합을 강화하기 위한 기여를 환영합니다.

  • 새로운 API 엔드포인트 추가(페이지 링크, 쿼리 지원)

  • 블록 조작 기능 개선

  • 템플릿 지원 추가

  • 오류 처리 향상

Available Tools

10 tools
logseq_create_pageB

Create a new page in Logseq with optional properties. Features: - Journal page creation with date formatting - Custom page properties (tags, status, etc.) - Format selection (Markdown/Org-mode) - Automatic first block creation Perfect for template-based page creation and knowledge management.

Inputs: page_name (required), create_first_block, format, journal, +1 more.

logseq_edit_blockC

Enter editing mode for a specific block

Inputs: src_block (required), pos.

logseq_exit_editing_modeC

Exit current editing mode

Inputs: select_block.

logseq_get_all_pagesC

List all pages in the graph with basic metadata

Inputs: repo.

logseq_get_current_pageB

Retrieves the currently active page or block in the user's workspace

Inputs: no named parameters.

logseq_get_current_page_contentB

Get hierarchical block structure of current page

Inputs: no named parameters.

logseq_get_editing_block_contentB

Get content of currently edited block

Inputs: no named parameters.

logseq_get_pageC

Retrieve detailed information about a specific page including metadata and content

Inputs: src_page (required), include_children.

logseq_get_page_contentC

Get block hierarchy for specific page

Inputs: src_page (required).

logseq_insert_blockA

Insert a new block into Logseq. Can create: - Page-level blocks (use is_page_block=true with page name as parent_block) - Nested blocks under existing blocks - Blocks with custom UUIDs for precise reference Supports before/after positioning and property management.

Inputs: content (required), before, custom_uuid, is_page_block, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 10 tools

    Disambiguation3/5

    The tools have clear distinct purposes for core operations like creating pages, editing blocks, and retrieving content, but there is notable overlap between retrieval tools. Specifically, logseq_get_page and logseq_get_page_content both retrieve page details, and logseq_get_current_page_content and logseq_get_editing_block_content focus on current workspace content, which could cause confusion in selection. Descriptions help differentiate, but the boundaries are not perfectly distinct.

    Naming Consistency5/5

    All tool names follow a consistent snake_case pattern with a 'logseq_' prefix, using clear verb_noun combinations such as create_page, edit_block, and get_all_pages. This uniformity makes the tools predictable and easy to parse, with no deviations in style or structure across the set.

    Tool Count5/5

    With 10 tools, the count is well-scoped for a Logseq server, covering essential operations like page creation, editing, and content retrieval. Each tool serves a specific function without redundancy, fitting within the typical 3-15 range for such a domain, and no tools feel unnecessary or missing for basic interactions.

    Completeness4/5

    The tool set provides good coverage for core Logseq workflows, including CRUD-like operations for pages and blocks (create, get, edit, insert). However, there are minor gaps, such as no explicit tools for deleting pages or blocks, updating block content beyond editing mode, or managing properties post-creation, which agents might need to work around using existing tools.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A 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.
      69
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      A 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.
      13
      15
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      A Model Context Protocol server that enables AI agents to interact with a local Logseq instance, allowing operations like creating pages, managing blocks, and searching across a knowledge graph.
      13
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables 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.
      39 npm
      7
      MIT