Logseq MCP Server
Logseq MCP サーバー
Logseqのナレッジベースとの直接統合を提供するモデルコンテキストプロトコルサーバー。このサーバーにより、LLMはLogseqのグラフと対話し、ページを作成し、ブロックを管理し、プログラム的に情報を整理できるようになります。
Claude Desktopでの使用
{
"mcpServers": {
"logseq": {
"command": "uvx",
"args": ["mcp-server-logseq"],
"env": {
"LOGSEQ_API_TOKEN": "<YOUR_KEY>",
"LOGSEQ_API_URL": "http://127.0.0.1:12315"
}
}
}
}エラーがある場合は、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(boolean): ページレベルのブロックとして作成するbefore(boolean): 親ブロックの前に挿入custom_uuid(文字列): ブロックのカスタムUUIDv4
logseq_edit_block - ブロック編集モードに入るパラメータ:
src_block(文字列、必須): ブロックUUIDpos(数値): カーソル位置
logseq_exit_editing_mode - 編集モードを終了するパラメータ:
select_block(boolean): ブロックを選択したままにする
ページ操作
logseq_create_page - 新しいページを作成するパラメータ:
page_name(文字列、必須): ページ名properties(オブジェクト):ページのプロパティjournal(ブール値): ジャーナルページとして作成format(文字列):ページフォーマット(markdown/org)
logseq_get_page - ページの詳細を取得するパラメータ:
src_page(文字列、必須): ページ識別子include_children(boolean): 子ブロックを含める
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 Arguments に新しいブロックを作成します。
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キー
LogseqでAPIトークンを生成する: API → 認証トークン
環境変数を設定します:
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 toolslogseq_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
Scored across 10 tools
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.
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.
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.
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
Related MCP Connectors
Personal wiki and memory layer for AI assistants. Persistent, structured memory across sessions.
Shared long-term memory for AI agents: save and recall context as a searchable knowledge graph.
past.dev is a long-term memory API for AI agents. Send it timestamped text such as emails, meeting transcripts and support tickets. Ask a question and get the current fact, the value it replaced and the source behind it. With this server, your assistant can recall and save memory and manage your past.dev account.
Shared memory for AI agents, as a graph in your own Postgres. Writes never call an LLM.
Related MCP Servers
- 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.69MIT
- 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
- AlicenseAqualityDmaintenanceA 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.131MIT
- 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.39 npm7MIT