LogSeq

v1.0.0Knowledge & Memorystable

MCP server to interact with LogSeq via its Local HTTP API - enabling AI assistants like Claude to seamlessly read, write, and manage your LogSeq graph.

knowledge-baseknowledge-managementlogseqmcpmcp-server
Share:
272
Stars
0
Downloads
0
Weekly
0/5

What is LogSeq?

LogSeq is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp server to interact with logseq via its local http api - enabling ai assistants like claude to seamlessly read, write, and manage your logseq graph.

MCP server to interact with LogSeq via its Local HTTP API - enabling AI assistants like Claude to seamlessly read, write, and manage your LogSeq graph.

This server falls under the Knowledge & Memory category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • MCP server to interact with LogSeq via its Local HTTP API -

Use Cases

Read, write, and manage your LogSeq knowledge graph.
Organize and retrieve information from your second brain.
Enhance note-taking with AI-powered assistance.
ergut

Maintainer

LicenseMIT License
Languagepython
Versionv1.0.0
UpdatedMay 21, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-server-for-logseq

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use LogSeq

The MCP server for LogSeq connects AI assistants like Claude to your LogSeq knowledge graph via LogSeq's Local HTTP API, enabling seamless reading, writing, and management of pages, blocks, and metadata without leaving your AI client. It exposes 16 core tools for content management, navigation, search, DSL queries, and backlink traversal, plus an optional set of 3 vector search tools using local Ollama embeddings and LanceDB for semantic memory retrieval. Knowledge workers use it to let AI assistants actively maintain and query their second brain rather than just viewing exported notes.

Prerequisites

  • LogSeq installed and running on your machine with the Local HTTP API plugin enabled
  • A LogSeq API token generated from the Local HTTP API plugin settings (default port 12315)
  • Python 3.10+ and uv package manager installed
  • An MCP-compatible client such as Claude Desktop or Claude Code
  • Ollama installed locally (optional, only needed for semantic vector search tools)
1

Enable LogSeq's Local HTTP API plugin

In LogSeq, go to Settings → Plugins and enable the Local HTTP API plugin. Note the API token it generates and confirm it is listening on port 12315.

2

Install the MCP server via Claude Code

The easiest install method for Claude Code users is the claude mcp add command which installs the package and registers it in one step.

claude mcp add mcp-logseq \
  --env LOGSEQ_API_TOKEN=your_token_here \
  --env LOGSEQ_API_URL=http://localhost:12315 \
  -- uv run --with mcp-logseq mcp-logseq
3

Or add manually to Claude Desktop config

For Claude Desktop, open Settings → Developer → Edit Config and add the server entry with your LogSeq credentials.

{
  "mcpServers": {
    "mcp-logseq": {
      "command": "uv",
      "args": ["run", "--with", "mcp-logseq", "mcp-logseq"],
      "env": {
        "LOGSEQ_API_TOKEN": "your_token_here",
        "LOGSEQ_API_URL": "http://localhost:12315"
      }
    }
  }
}
4

Configure optional settings

Set additional environment variables to customize behavior: hide specific tags from AI, enable DB-mode property support, or point to a JSON config file.

# Optional env vars:
# LOGSEQ_DB_MODE=true          # Enable DB-mode graph property support
# LOGSEQ_EXCLUDE_TAGS=private,personal  # Comma-separated tags to hide from AI
# LOGSEQ_CONFIG_FILE=/path/to/config.json
5

Restart your MCP client and verify

Restart Claude Desktop or your MCP client. The LogSeq tools should appear. Ask Claude to list your pages to confirm the connection is working.

LogSeq Examples

Client configuration

Complete claude_desktop_config.json entry for the LogSeq MCP server with API token authentication.

{
  "mcpServers": {
    "mcp-logseq": {
      "command": "uv",
      "args": ["run", "--with", "mcp-logseq", "mcp-logseq"],
      "env": {
        "LOGSEQ_API_TOKEN": "your_logseq_api_token",
        "LOGSEQ_API_URL": "http://localhost:12315",
        "LOGSEQ_DB_MODE": "false",
        "LOGSEQ_EXCLUDE_TAGS": "private"
      }
    }
  }
}

Prompts to try

Example prompts to work with your LogSeq knowledge graph through Claude.

- "Show me all my LogSeq pages"
- "Create a new page called 'Meeting Notes 2026-06-13' with bullet points for agenda, attendees, and action items"
- "Search my graph for notes about burnout and summarize the key themes"
- "Find all pages in the Projects namespace and list their most recent updates"
- "Run a DSL query to find all TODO items across my graph"
- "What pages link back to my 'Productivity Systems' page?"

Troubleshooting LogSeq

Connection refused or 'API not reachable' error

Confirm LogSeq is running and the Local HTTP API plugin is enabled and started. The default port is 12315—check the plugin settings to confirm it matches LOGSEQ_API_URL. Some macOS systems require the full URL http://127.0.0.1:12315 rather than localhost.

401 Unauthorized when connecting

The LOGSEQ_API_TOKEN must match the token shown in LogSeq's Local HTTP API plugin settings exactly. If you regenerated the token in LogSeq, update the env value in your MCP config and restart the client.

Semantic search tools not available or returning no results

Semantic vector search requires Ollama running locally with an embedding model pulled (e.g. `ollama pull nomic-embed-text`). Ensure Ollama is running and the embedding endpoint is reachable before expecting the vector search tools to appear.

Frequently Asked Questions about LogSeq

What is LogSeq?

LogSeq is a Model Context Protocol (MCP) server that mcp server to interact with logseq via its local http api - enabling ai assistants like claude to seamlessly read, write, and manage your logseq graph. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install LogSeq?

Follow the installation instructions on the LogSeq GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with LogSeq?

LogSeq works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is LogSeq free to use?

Yes, LogSeq is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Knowledge & Memory MCP Servers

Explore all knowledge & memory servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "mcp-server-for-logseq": { "command": "npx", "args": ["-y", "mcp-server-for-logseq"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use LogSeq?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides