
joelhooks/logseq-mcp-tools 是从 https://github.com/joelhooks/logseq-mcp-tools. 导入的 MCP 服务器候选
概览
joelhooks/logseq-mcp-tools 是从 https://github.com/joelhooks/logseq-mcp-tools. 导入的 MCP 服务器候选
概述(AI 翻译)
一个模型上下文协议(MCP)服务器,为AI助手提供对你的Logseq知识图谱的结构化访问。
概述
该项目创建了一个MCP服务器,允许像Claude这样的AI助手与你的Logseq知识库交互。它 提供以下工具:
- 检索所有页面列表
- 从特定页面获取内容
- 生成灵活日期范围的期刊摘要
- 提取链接页面并探索连接
安装
通过Smithery安装
自动安装 Logseq Tools for Claude Desktop 摘自史密斯里:
-
克隆此仓库
-
使用 npm、yarn 或 pnpm 安装依赖:
-
复制环境模板并配置你的 Logseq 令牌:
配置
该项目包含一个 .env.template 文件,您可以复制并重命名为 .env。
您可以通过以下方式找到您的Logseq认证令牌:
- 开启Logseq(逻辑序列)
- 在设置中启用HTTP API,>功能>启用HTTP API
- 在设置中设置您的认证令牌> 功能 > HTTP API 认证令牌
用途
运行MCP服务器
服务器可通过以下方式启动:
与克劳德连接
克劳德桌面
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Logseq MCP Tools
A Model Context Protocol (MCP) server that provides AI assistants with structured access to your Logseq knowledge graph.
Overview
This project creates an MCP server that allows AI assistants like Claude to interact with your Logseq knowledge base. It provides tools for:
- Retrieving a list of all pages
- Getting content from specific pages
- Generating journal summaries for flexible date ranges
- Extracting linked pages and exploring connections
Installation
Installing via Smithery
To install Logseq Tools for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @joelhooks/logseq-mcp-tools --client claude
- Clone this repository
- Install dependencies using npm, yarn, or pnpm:
# Using npm
npm install
# Using yarn
yarn install
# Using pnpm
pnpm install
- Copy the environment template and configure your Logseq token:
cp .env.template .env
# Edit .env with your Logseq authentication token
Configuration
This project includes a .env.template file that you can copy and rename to .env.
You can find your Logseq auth token by:
- Opening Logseq
- Enabling the HTTP API in Settings > Features > Enable HTTP API
- Setting your authentication token in Settings > Features > HTTP API Authentication Token
Usage
Running the MCP Server
The server can be started using:
# Using the npm script
npm start
# Or directly with tsx
npx tsx index.ts
Connecting with Claude
Claude Desktop
Follow the Claude MCP Quickstart guide:
- Important: Install Node.js globally via Homebrew (or whatever):
brew install node
- Install the Claude desktop app
- Open the Claude menu and select “Settings…”
- Click on “Developer” in the left sidebar, then click “Edit Config”
- This will open your
claude_desktop_config.jsonfile. Replace its contents with:
{
"mcpServers": {
"logseq": {
"command": "npx",
"args": [
"tsx",
"/path/to/your/index.ts"
]
}
}
}
IMPORTANT: Replace /path/to/your/index.ts with the exact absolute path to your index.ts file (e.g.,
/Users/username/Code/logseq-mcp-tools/index.ts)
- Save the file and restart Claude Desktop
Now you can chat with Claude and ask it to use your Logseq data:
- “Show me my recent journal entries”
- “Summarize my notes from last week”
- “Find all pages related to [topic]”
Claude in Cursor
Follow the Cursor MCP documentation:
- Open Cursor
- Add a new MCP service from settings
- Enter the following command:
npx tsx "/path/to/index.ts"
- Give your service a name like “Logseq Tools”
安装
npx tsx /path/to/your/index.ts配置
{
"mcpServers": {
"logseq": {
"command": "npx",
"args": [
"tsx",
"/path/to/your/index.ts"
]
}
}
}