# Logseq MCP server

> Lets an AI client read, create, search, and manage pages and blocks in a Logseq knowledge graph through its local HTTP API.

- Repository: https://github.com/ergut/mcp-logseq
- Page: https://hostedmcp.org/servers/ergut/mcp-logseq
- Transport: —
- Stars: 351
- License: MIT

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `LOGSEQ_API_TOKEN` | no | no |  |
| `LOGSEQ_API_URL` | no | no |  |
| `LOGSEQ_EXCLUDE_NAMESPACES` | no | no |  |
| `LOGSEQ_EXCLUDE_TAGS` | no | no |  |
| `LOGSEQ_INCLUDE_NAMESPACES` | no | no |  |
| `LOGSEQ_WRITE_NAMESPACES` | no | no |  |

## FAQ

### How do I connect Claude to my Logseq graph?

Enable Logseq's HTTP APIs server, start it from the API panel, generate an API token, then add the MCP server to your client with LOGSEQ_API_TOKEN and LOGSEQ_API_URL set.

### Does the Logseq MCP server support semantic vector search?

Yes, optionally. It offers vector_search, sync_vector_db, and vector_db_status tools using configurable embeddings, with LanceDB kept local.

### Can it create and update Logseq pages from markdown?

Yes. create_page and update_page convert markdown headings, lists, code blocks, checkboxes, and YAML frontmatter into properly nested Logseq blocks, with append or replace update modes.

### What happens if I create a page that already exists?

create_page returns a clear error instead of letting Logseq create numbered duplicates, so retries after a timeout are safe.

### How can I hide certain pages from the AI?

Use LOGSEQ_EXCLUDE_TAGS, LOGSEQ_INCLUDE_NAMESPACES, LOGSEQ_EXCLUDE_NAMESPACES, and LOGSEQ_WRITE_NAMESPACES to control which pages are readable or writable.
