Logseq

Provides an MCP-enabled interface to query and manage a Logseq knowledge base with AI assistants.
  • typescript

5

GitHub Stars

typescript

Language

5 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "eugeneyvt-logseq-mcp-server": {
      "command": "npx",
      "args": [
        "logseq-mcp-server"
      ],
      "env": {
        "NODE_ENV": "production",
        "LOG_LEVEL": "info",
        "LOGSEQ_API_URL": "http://127.0.0.1:12315",
        "LOGSEQ_TIMEOUT": "30000",
        "LOGSEQ_API_TOKEN": "your-api-token-here",
        "LOGSEQ_MAX_RETRIES": "5"
      }
    }
  }
}

You run a Model Context Protocol (MCP) server locally to connect AI assistants to your Logseq knowledge base. This server exposes a simple, unified interface for searching, retrieving, editing, and deleting content within Logseq, while keeping all processing under your control on your machine.

How to use

You connect an MCP-compatible AI client to your Logseq graph and start issuing the four core actions: search, get, edit, and delete. Use the search tool to perform multi-modal queries across pages, blocks, templates, and properties, then retrieve complete pages or blocks with the get tool. Use edit to create or modify content with safety features like dry-run and confirmations, and finish with delete to remove content while tracking dependencies and offering an optional soft delete. The server keeps all data local, so nothing leaves your machine.

How to install

Prerequisites: Node.js 18 or newer, and Logseq with HTTP API enabled. You also need an MCP-compatible AI client such as Claude Desktop, VS Code, or Cursor.

Step 1 — Install the MCP server globally on your system.

npm install -g logseq-mcp-server

Step 2 — Start Logseq with the HTTP API enabled, then run the MCP server configuration in your client.

Configuration and running notes

The MCP server uses environment variables and a local API URL to connect with Logseq. Commonly you will provide the API URL and a token in your client configuration.

Troubleshooting

If you encounter connection issues, verify that Logseq is running with HTTP API enabled and that your API token is correct. For slow performance, adjust timeouts and check network connectivity. If template handling fails, ensure templates follow the single-block Logseq standard. If the server won’t start, reinstall the latest version and try starting again from a clean state.

Security and data privacy

All operations are designed to be local-only, with API tokens never logged. Input and error sanitization help prevent unsafe content and leakage of sensitive data. The server supports rate limiting and other protective measures by default.

Available tools

search

Advanced multi-modal discovery to find content across pages, blocks, templates, properties, and relations with support for complex filters and date ranges.

get

Unified content retrieval to fetch pages, blocks, templates, properties, and graph context with backlinks and metrics.

edit

Comprehensive content management to create, update, insert, and relocate pages, blocks, templates, properties, and relations with safety checks like dry-run, validation, and optional destructive-operation confirmation.

delete

Safe content removal with impact analysis, confirmation prompts, and soft-delete options to recover from accidental deletions and manage dependencies.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational