Logseq MCP Tools Server

mcp server for logseq graph
  • typescript

66

GitHub Stars

typescript

Language

6 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": {
    "joelhooks-logseq-mcp-tools": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "--network=host",
        "-e",
        "LOGSEQ_TOKEN=<Your Token>",
        "-e",
        "LOGSEQ_HOST=host.docker.internal",
        "logseq-mcp"
      ],
      "env": {
        "LOGSEQ_HOST": "host.docker.internal",
        "LOGSEQ_TOKEN": "YOUR_LOGSEQ_TOKEN"
      }
    }
  }
}

You deploy a Logseq MCP Tools server to give AI assistants structured, rule-based access to your Logseq knowledge graph. It enables actions like listing pages, reading page content, generating journal summaries, and exploring page connections, all through MCP clients like Claude or Cursor. This guide shows you how to install, configure, run, and connect to the server so you can ask your AI to work with your Logseq data.

How to use

You run the MCP server locally and connect an MCP client to it. After starting the server, you can prompt your AI to interact with your Logseq graph, for example: show my recent journal entries, summarize notes from a date range, find pages related to a topic, or analyze the structure of your graph. The server exposes tools that let the AI fetch pages, search content, analyze pages and connections, and generate insights from your Logseq knowledge graph.

To connect from a client, configure the MCP connection to point at the server. Use the provided command and arguments to run the local MCP service, then point your client to that local service. The client will send your natural language requests and receive structured results from the server.

How to install

Prerequisites: you need Node.js installed on your system. You will also need npm, yarn, or pnpm to install dependencies. Prepare a Logseq authentication token to enable the HTTP API.

  1. Install the MCP server client via the package manager you prefer. The process shown installs the server tooling and dependencies from within the project. Then you will run the server locally.

  2. Install dependencies for the project using your package manager.

  3. Copy the environment template and configure your Logseq token.

  4. Start the MCP server.

Configuration and running notes

Configure your Logseq token by creating an environment file based on the template and setting the token that Logseq provides for HTTP API access.

To run the server, use the npm script or start the TypeScript entry point directly.

# Using the npm script
npm start

# Or directly with tsx
npx tsx index.ts
```}]}]},{

Configure client connections for MCP in your preferred client. The JSON example shows a standard stdio configuration where the client launches the MCP server using npx tsx and an index.ts path. The client will then communicate with the server over a local process I/O channel.

For Claude Desktop, you can wire the client like this: use npx to start the server and point it at your index.ts file.

Security and environment

Keep your Logseq HTTP API token secure. Do not expose it in logs or share it publicly. Store tokens in a protected environment file and load them at runtime.

If you are running the server inside a container or on a separate host, ensure network access between your client and the Logseq API and that the token is accessible to the server process.

Troubleshooting

Common issues include the client not finding the Node.js binaries, the Logseq HTTP API not being enabled, or an incorrect path to the index.ts file. Ensure Logseq is running with HTTP API enabled and the token in your environment matches the Logseq configuration. You can also run the server directly in your terminal to verify it starts correctly.

To view logs during development, monitor the MCP logs from the client or terminal where you started the server. Review logs for startup errors, missing environment variables, or path issues.

Available tools

getAllPages

Retrieves a list of all pages in your Logseq graph.

getPage

Gets the content of a specific page.

getJournalSummary

Generates a summary of journal entries for a specified date range.

createPage

Creates a new page in your Logseq graph.

searchPages

Searches for pages by name.

getBacklinks

Finds all pages that reference a specific page.

analyzeGraph

Performs a comprehensive analysis of your knowledge graph.

findKnowledgeGaps

Identifies potential gaps and areas for improvement in your knowledge graph.

analyzeJournalPatterns

Analyzes patterns in your journal entries over time.

smartQuery

Executes natural language queries using Logseq's DataScript capabilities.

suggestConnections

Suggests interesting connections across your graph.

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