Get the FREE Ultimate OpenClaw Setup Guide →

logseq

Model Context Protocol (MCP) server for LogSeq

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio jimsynz-logseq-mcp-server cargo install --locked --git https://harton.dev/james/logseq-mcp-server.git logseq-mcp-server

How to use

The LogSeq MCP Server exposes LogSeq's HTTP API as a collection of MCP tools, enabling AI assistants to read, search, and manipulate your LogSeq graph. It provides pages and blocks management (listing, retrieving, creating, updating, and getting current items), search capabilities across the knowledge graph, datascript querying, and access to graph metadata and user configurations. With Claude or other MCP clients, you can call these tools to inspect your LogSeq data, compose new content, and run powerful queries against your local graph. The server acts as a bridge between LogSeqs HTTP API and MCP tooling, translating MCP tool calls into LogSeq API requests and returning structured results.

To use it, install the server, ensure the LogSeq HTTP API is enabled in LogSeq, and configure the client with the correct endpoint and token. You can test the connection with the provided --check command, then invoke tools like list_pages, get_page, search, datascript_query, or get_current_graph through your MCP client. Examples include creating a page for new ideas, retrieving the content of a page in markdown, or running a Datascript query to analyze your notes. The server supports a suite of 13 tools organized into pages, blocks, search, datascript, and app information categories, each mapped to the corresponding LogSeq HTTP API methods.

Typical workflows involve: listing and browsing pages, fetching specific page content, inserting or updating blocks, performing cross-page searches, and running advanced Datascript queries to extract insights from your notes.

How to install

Prerequisites:

  • Rust toolchain with cargo
  • Internet access to fetch the MCP server from Git
  1. Install Rust and Cargo (if not already installed):
# macOS (via Homebrew)
brew install rust

# Windows (via Rust installer) or Linux: follow https://www.rust-lang.org/tools/install
  1. Install the MCP server from the Git repository:
cargo install --locked --git https://harton.dev/james/logseq-mcp-server.git logseq-mcp-server
  1. Run or verify installation (optional):
logseq-mcp-server --check
  1. Start the server (when needed):
logseq-mcp-server

Note: Ensure LogSeq is running with the HTTP API server enabled and that you’ve configured an authorization token in LogSeq as described in the setup guide. The server will communicate with LogSeq at the default local endpoint (http://localhost:12315).

Additional notes

Tips and common considerations:

  • Ensure your LogSeq HTTP API is enabled and that your API token is kept secure; the MCP server will use this token to authenticate requests.
  • If you encounter connection errors, verify that LogSeq is running and that the API URL matches the environment variable you configure in your MCP client.
  • The MCP inspector (npx @modelcontextprotocol/inspector) can be used to validate tool calls against the logseq-mcp-server configuration.
  • When configuring Claude Desktop, point it to the logseq-mcp-server binary and supply LOGSEQ_API_URL and LOGSEQ_API_TOKEN in your claude_desktop_config.json as shown in the docs.
  • If you update LogSeq or the MCP server, restart Claude Desktop or your MCP client to ensure the new tools and endpoints are loaded.

Related MCP Servers

Sponsor this space

Reach thousands of developers