MCP-Logseq
Provides deep integration with Logseq graphs, enabling block-first operations such as reading, appending, and referencing blocks, as well as context graph features like resolving block references and backlinks for AI-assisted knowledge management.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP-LogseqSearch for blocks about machine learning"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP-Logseq
An AI bridge for Logseq graphs using the Model Context Protocol (MCP). Connect any MCP-compatible AI assistant (Claude, Cursor, Windsurf, etc.) to your Logseq knowledge base with deep integration for blocks and block references.
Ported from mcp-obsidian with Logseq-specific features:
Block-first operations — Read, append, and reference individual blocks
Block references — Create
((block-uuid))links between blocksContext graph — Resolve refs for AI context, get backlinks, build knowledge graphs over time
Quick Start
Install Node.js (v18+)
Configure your MCP client (e.g. Cursor):
Add to your MCP config (e.g.
~/.cursor/mcp.jsonor Cursor Settings → MCP):{ "mcpServers": { "logseq": { "command": "npx", "args": ["mcp-logseq", "/path/to/your/logseq/graph"] } } }Replace
/path/to/your/logseq/graphwith your actual Logseq graph directory (the folder containingjournals/,pages/,.logseq/).Test — Ask your AI:
"List files in my Logseq graph"
"Read the page journals/2024_01_15.md"
"Search for blocks containing 'machine learning'"
"Get block abc-123-def and show what references it"
Related MCP server: Logseq MCP Server
Logseq Concepts
Blocks
Logseq content is organized in blocks — each bullet (-) is a block. Blocks have:
UUID — stable ID (
id:: uuidin markdown)Content — main text
Properties —
key:: valuemetadataHierarchy — indentation = parent/child
Block References
Reference:
((block-uuid))— links to a blockEmbed:
{{embed ((block-uuid))}}— renders block content inline
Use create_block_ref to add refs and read_page with resolveBlockRefs: true to expand them for AI context.
MCP Tools
Page Operations
Tool | Description |
| Read page with blocks; optional |
| Write page (overwrite/append/prepend) |
| List files and folders |
| Search block content and properties |
| Batch read (max 10) |
| Get frontmatter only |
| Update frontmatter |
| Delete page (requires confirmation) |
| Move/rename page |
| Replace string in page |
| Add/remove/list tags |
| Metadata without content |
| Notes, folders, size, recent files |
Block Operations (Logseq-specific)
Tool | Description |
| Get block by UUID (searches entire graph) |
| Add block to page (optionally under parent) |
| Get blocks that reference a given block (backlinks) |
| Insert |
Example: Building a Context Graph
Search for relevant blocks:
search_blockswith query "project ideas"Read a block:
read_blockwith UUID from resultsGet backlinks:
get_block_refsto see what links to itCreate links:
create_block_refto connect related blocksRead with context:
read_pagewithresolveBlockRefs: trueto expand refs for AI
Over time, the AI can build a map of your knowledge graph by following block references.
Development
npm install
npm run build
npm start /path/to/graph # Run with tsxLicense
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- 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/varunity/mcp-logseq'
If you have feedback or need assistance with the MCP directory API, please join our Discord server