Logseq MCP Server
Logseq MCP 服务器
模型上下文协议 (MLM) 服务器,可与 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(布尔值):创建为页面级块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
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 端点(页面链接、查询支持)
提高区块操作能力
添加模板支持
增强错误处理
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityFmaintenanceA 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.70
- 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.377MIT
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Markdown-first MCP server for Notion API with 8 composite tools and 39 actions.
GibsonAI MCP server: manage your databases with natural language
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dailydaniel/logseq-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server