Skip to main content
Glama
MCP server for LogSeq

MCP server for LogSeq

by ergut

LogSeq用のMCPサーバー

API を介して LogSeq と対話するための MCP サーバー。

コンポーネント

ツール

サーバーは、LogSeq と対話するための複数のツールを実装しています。

  • list_graphs: 利用可能なすべてのグラフを一覧表示します

  • list_pages: 現在のグラフ内のすべてのページを一覧表示します

  • get_page_content: 1ページのコンテンツを返す

  • 検索: すべてのページのコンテンツを検索

  • create_page: 新しいページを作成する

  • update_page: 既存のページのコンテンツを更新する

  • delete_page: ページを削除する

プロンプトの例

まずClaudeにLogSeqを使うように指示するのが良いでしょう。そうすれば、常にツールが呼び出されるようになります。

プロンプトの例:

  • 最新の会議メモの内容を取得して要約する

  • プロジェクトXが言及されているすべてのページを検索し、その背景を説明します。

  • 今日の会議メモを新しいページとして作成する

  • プロジェクトのステータスページを最新のアップデートで更新します

Related MCP server: Logseq MCP Server

構成

LogSeq API 構成

LogSeq API 設定を使用して環境を構成するには、次の 2 つの方法があります。

  1. サーバー設定に追加(推奨)

{
  "mcp-logseq": {
    "command": "uvx",
    "args": [
      "mcp-logseq"
    ],
    "env": {
      "LOGSEQ_API_TOKEN": "<your_api_token_here>",
      "LOGSEQ_API_URL": "http://localhost:12315"
    }
  }
}
  1. 必要な変数を含む.envファイルを作業ディレクトリに作成します。

LOGSEQ_API_TOKEN=your_token_here
LOGSEQ_API_URL=http://localhost:12315

発達

建物

配布用のパッケージを準備するには:

  1. 依存関係を同期し、ロックファイルを更新します。

uv sync

デバッグ

MCPサーバーはstdio経由で実行されるため、デバッグが困難になる場合があります。最適なデバッグ環境を実現するには、 MCP Inspectorの使用をお勧めします。

MCP インスペクターは、次のようにnpm経由で起動できます。

npx @modelcontextprotocol/inspector uv --directory /path/to/mcp-logseq run mcp-logseq

Available Tools

17 tools
create_pageA

Create a new page in Logseq with properly structured blocks.

Fails if a page with the same title already exists (use update_page to modify existing pages). This makes retries safe: re-sending a create_page that timed out will not create numbered duplicates like "Page(1)".

Markdown content is automatically parsed into Logseq's block hierarchy:

  • Headings (# ## ###) create nested sections

  • Lists (- or 1.) become proper block trees

  • Code blocks are preserved as single blocks

  • YAML frontmatter (---) becomes page properties

Example content:

---
tags: [project, active]
priority: high
---

# Project Title
Introduction paragraph.

## Tasks
- Task 1
  - Subtask A
- Task 2

Inputs: title (required), content, properties.

delete_blockB

Delete a block from LogSeq by its UUID.

Inputs: block_uuid (required).

delete_pageB

Delete a page from LogSeq.

Inputs: page_name (required).

find_pages_by_propertyA

Find all pages that have a specific property, optionally filtered by value. Simpler alternative to the full query DSL.

Inputs: property_name (required), limit, property_value.

get_blockA

Get a single block by its UUID. Returns the block content, properties, and child blocks (recursively). Useful for inspecting a specific block after finding its UUID via search or query.

Inputs: block_uuid (required), format, include_children.

get_page_contentB

Get the content of a specific page from LogSeq.

Inputs: page_name (required), format, max_depth, resolve_refs.

get_pages_from_namespaceA

Get all pages within a namespace hierarchy (flat list). Use this to discover subpages of a parent page.

Inputs: namespace (required).

get_pages_tree_from_namespaceA

Get pages within a namespace as a hierarchical tree structure. Useful for understanding the full page hierarchy.

Inputs: namespace (required).

insert_nested_blockA

Insert a new block as a child or sibling of an existing block, enabling nested hierarchical structures

Inputs: content (required), parent_block_uuid (required), sibling, properties.

list_pagesA

Lists all pages in a LogSeq graph, each with its last-updated time (UTC). To find recently modified pages, use sort='updated' (most recent first) and/or updated_since.

Inputs: sort, limit, updated_since, include_journals.

queryB

Execute a Logseq DSL query to search pages and blocks. Supports property queries, tag queries, task queries, and logical combinations. Raw datalog ({:query ...} / [:find ...]) is not supported. See https://docs.logseq.com/#/page/queries for query syntax.

Inputs: query (required), limit, format, result_type.

rename_pageA

Rename an existing page. All references throughout the graph will be automatically updated.

Inputs: new_name (required), old_name (required).

set_block_propertiesA

Set properties on a block in Logseq DB-mode. Properties must be defined on the block's tag/class. Use property display names (e.g. 'Content status', not the internal ident).

Inputs: block_uuid (required), properties (required).

update_blockB

Update the content of an existing LogSeq block by UUID.

Inputs: content (required), block_uuid (required).

update_pageA

Update a page in Logseq with new content and/or properties.

Supports two modes:

  • append: Add new blocks after existing content (default)

  • replace: Clear all existing blocks and add new content

Markdown is parsed into proper block hierarchy just like create_page. YAML frontmatter in content will be merged with explicit properties.

Inputs: page_name (required), mode, content, properties.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 17 tools

    Disambiguation5/5

    Each tool targets a distinct resource and action: pages, blocks, search/query, namespaces, and properties. Overlaps like query vs find_pages_by_property are explicitly framed as simple alternatives, so an agent can choose correctly.

    Naming Consistency4/5

    Mostly consistent verb_noun snake_case (list_pages, get_block, create_page), but 'query' and 'search' are bare verbs, a minor deviation from the pattern.

    Tool Count4/5

    17 tools is slightly above the ideal 3-15 range for a cohesive set, though each covers a distinct operation. The count feels a bit heavy but not excessive for LogSeq's complexity.

    Completeness4/5

    Core CRUD for pages and blocks is covered, plus searching, querying, backlinks, and namespace navigation. Minor gaps remain (e.g., explicit block creation on a page, move/reorder operations), but agents can work around them.

    Maintenance

    ActivitySlowing
    ResponsivenessMixed handling

    Related MCP Connectors

    Related MCP Servers

    • 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.
      23 npm
      7
      MIT
    • A
      license
      B
      quality
      C
      maintenance
      Enables AI assistants like Claude to directly read, write, search, and navigate your local Logseq knowledge graph, including managing journals, pages, backlinks, and page relationships without manual copy-pasting.
      11
      10 npm
      6
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Connects 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 npm
      Apache 2.0