Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Connects MCP-compatible AI assistants to Logseq graphs, enabling block-first operations, block references, and context graph building.

README.md

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 blocks
  • Context graph — Resolve refs for AI context, get backlinks, build knowledge graphs over time

Quick Start

  1. Install Node.js (v18+)
  1. Configure your MCP client (e.g. Cursor):

Add to your MCP config (e.g. ~/.cursor/mcp.json or Cursor Settings → MCP):

   {
     "mcpServers": {
       "logseq": {
         "command": "npx",
         "args": ["mcp-logseq", "/path/to/your/logseq/graph"]
       }
     }
   }

Replace /path/to/your/logseq/graph with your actual Logseq graph directory (the folder containing journals/, pages/, .logseq/).

  1. 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"

Logseq Concepts

Blocks

Logseq content is organized in blocks — each bullet (-) is a block. Blocks have:

  • UUID — stable ID (id:: uuid in markdown)
  • Content — main text
  • Propertieskey:: value metadata
  • Hierarchy — indentation = parent/child

Block References

  • Reference: ((block-uuid)) — links to a block
  • Embed: {{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 | Read page with blocks; optional resolveBlockRefs for AI context | | write_page | Write page (overwrite/append/prepend) | | list_directory | List files and folders | | search_blocks | Search block content and properties | | read_multiple_pages | Batch read (max 10) | | get_frontmatter | Get frontmatter only | | update_frontmatter | Update frontmatter | | delete_note | Delete page (requires confirmation) | | move_note | Move/rename page | | patch_note | Replace string in page | | manage_tags | Add/remove/list tags | | get_notes_info | Metadata without content | | get_graph_stats | Notes, folders, size, recent files |

Block Operations (Logseq-specific)

| Tool | Description | |------|-------------| | read_block | Get block by UUID (searches entire graph) | | append_block | Add block to page (optionally under parent) | | get_block_refs | Get blocks that reference a given block (backlinks) | | create_block_ref | Insert ((uuid)) into a block |

Example: Building a Context Graph

  1. Search for relevant blocks: search_blocks with query "project ideas"
  2. Read a block: read_block with UUID from results
  3. Get backlinks: get_block_refs to see what links to it
  4. Create links: create_block_ref to connect related blocks
  5. Read with context: read_page with resolveBlockRefs: true to 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 tsx

License

MIT

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Observability servers.