Logseq MCP 服务器
模型上下文协议 (MLM) 服务器,可与 Logseq 知识库直接集成。该服务器支持 LLM 与 Logseq 图表交互、创建页面、管理区块,并以编程方式组织信息。
与 Claude Desktop 一起使用
如果出现错误,请使用0.0.1版本:
可用工具
块操作
logseq_insert_block - 在 Logseq 中创建新块参数:
parent_block
(字符串):父块 UUID 或页面名称content
(字符串,必需):阻止内容is_page_block
(布尔值):创建为页面级块before
(布尔值):在父块之前插入custom_uuid
(字符串):块的自定义 UUIDv4
logseq_edit_block - 进入块编辑模式参数:
src_block
(字符串,必需):块 UUIDpos
(数字):光标位置
logseq_exit_editing_mode - 退出编辑模式参数:
select_block
(布尔值):保持块被选中
页面操作
logseq_create_page - 创建新页面参数:
page_name
(字符串,必需):页面名称properties
(对象):页面属性journal
(布尔值):创建为日志页面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_insert_block
在 Logseq参数中创建一个新块:
parent_block
:父块引用(页面名称或 UUID)content
:块内容is_page_block
:对于页面级块设置为 true
logseq_create_page
创建一个新的 Logseq 页面参数:
page_name
:页面名称properties
:页面属性为 JSONjournal
:对于日记页面,设置为 true
安装
使用 pip
从源头
运行服务器:
配置
API 密钥
在 Logseq 中生成 API 令牌:API → 授权令牌
设置环境变量:
或者通过命令行传递:
图形配置
默认 URL: http://localhost:12315自定义:
示例
创建会议记录页面
将任务块添加到现有页面
使用第一个块创建日记帐分录
调试
贡献
我们欢迎为增强 Logseq 集成做出贡献:
添加新的 API 端点(页面链接、查询支持)
提高区块操作能力
添加模板支持
增强错误处理
Related MCP Servers
- -securityFlicense-qualityA 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.Last updated -50
- -securityAlicense-qualityA Model Context Protocol server that enables LLMs to interact with GraphQL APIs by providing schema introspection and query execution capabilities.Last updated -5201MIT License
- -securityFlicense-qualityA Model Context Protocol server that enables LLMs to interact with GraphQL APIs by providing schema introspection and query execution capabilities.Last updated -1
- AsecurityAlicenseAqualityA 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.Last updated -1314MIT License