The MCP server for LogSeq enables Claude to programmatically interact with LogSeq graphs via its API, providing comprehensive knowledge management and automation capabilities.
Core Functions:
Create Pages: Generate new pages by specifying title and content
List Pages: Retrieve all pages in your graph, with optional inclusion of journal/daily notes
Read Page Content: Access and read content from specific pages
Update Pages: Modify existing page content
Delete Pages: Remove unwanted pages from your graph
Search Content: Find specific content across your entire LogSeq graph
AI-Powered Workflows: Automate tasks like summarizing notes, organizing content, and generating new pages based on existing data for enhanced knowledge management.
Allows interaction with LogSeq via its API, including listing graphs and pages, getting, creating, updating, and deleting pages, and searching content across all pages
✨ What You Can Do
Transform your LogSeq knowledge base into an AI-powered workspace! This MCP server enables Claude to seamlessly interact with your LogSeq graphs.
🎯 Real-World Examples
📊 Intelligent Knowledge Management
📝 Automated Content Creation
🔍 Smart Research & Analysis
🤝 Meeting & Documentation Workflow
💡 Key Benefits
- Zero Context Switching: Claude works directly with your LogSeq data
- Preserve Your Workflow: No need to export or copy content manually
- Intelligent Organization: AI-powered page creation, linking, and search
- Enhanced Productivity: Automate repetitive knowledge work
🚀 Quick Start
Step 1: Enable LogSeq API
- Settings → Features → Check "Enable HTTP APIs server"
- Click the API button (🔌) in LogSeq → "Start server"
- Generate API token: API panel → "Authorization tokens" → Create new
Step 2: Add to Claude (No Installation Required!)
Claude Code
Claude Desktop
Add to your config file (Settings → Developer → Edit Config
):
Step 3: Start Using!
🛠️ Available Tools
The server provides 6 comprehensive tools:
Tool | Purpose | Example Use |
---|---|---|
list_pages | Browse your graph | "Show me all my pages" |
get_page_content | Read page content | "Get my project notes" |
create_page | Add new pages | "Create a meeting notes page" |
update_page | Modify existing pages | "Update my task list" |
delete_page | Remove pages | "Delete the old draft page" |
search | Find content across graph | "Search for 'productivity tips'" |
⚙️ Prerequisites
LogSeq Setup
- LogSeq installed and running
- HTTP APIs server enabled (Settings → Features)
- API server started (🔌 button → "Start server")
- API token generated (API panel → Authorization tokens)
System Requirements
- uv Python package manager
- MCP-compatible client (Claude Code, Claude Desktop, etc.)
🔧 Configuration
Environment Variables
LOGSEQ_API_TOKEN
(required): Your LogSeq API tokenLOGSEQ_API_URL
(optional): Server URL (default:http://localhost:12315
)
Alternative Setup Methods
Using .env file
System environment variables
🔍 Verification & Testing
Test LogSeq Connection
Verify MCP Registration
Debug with MCP Inspector
🐛 Troubleshooting
Common Issues
"LOGSEQ_API_TOKEN environment variable required"
- ✅ Enable HTTP APIs in Settings → Features
- ✅ Click 🔌 button → "Start server" in LogSeq
- ✅ Generate token in API panel → Authorization tokens
- ✅ Verify token in your configuration
"spawn uv ENOENT" (Claude Desktop)
Claude Desktop can't find uv
. Use the full path:
Update config with full path:
Common uv locations:
- Curl install:
~/.local/bin/uv
- Homebrew:
/opt/homebrew/bin/uv
- Pip install: Check with
which uv
Connection Issues
- ✅ Confirm LogSeq is running
- ✅ Verify API server is started (not just enabled)
- ✅ Check port 12315 is accessible
- ✅ Test with verification command above
👩💻 Development
For local development, testing, and contributing, see DEVELOPMENT.md.
local-only server
The server can only run on the client's local machine because it depends on local resources.
Interacts with LogSeq via its API.
Related MCP Servers
- AsecurityAlicenseAqualityA server that enables LLMs to programmatically interact with Logseq knowledge graphs, allowing creation and management of pages and blocks.Last updated -1024MIT License
- -securityFlicense-qualityEnables querying log data stored in SQLite databases through the Model Context Protocol, allowing natural language interactions with log analysis.Last updated -
- -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 -48
- AsecurityAlicenseAqualityEnables interaction with Datadog's monitoring platform to search logs, search trace spans, and perform trace span aggregation for analysis.Last updated -3MIT License