# Logseq MCP for AI Agents AI Agent Connect

> Logseq (Knowledge Management) MCP. Connect your personal knowledge graph to your AI client to search, edit, and organize your notes. It gives your agent direct access to your local outliner data, letting you build out complex research projects or manage meeting notes through conversation rather than manual clicking.

## Overview
- **Category:** loved-by-devs
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_kMDKB03kxqJ9X26G0WlmNUknXtj6UN59p0KJSs7t/ai-agent-connect
- **Tags:** bi-directional-linking, markdown, knowledge-graph, privacy-first, outliner

## Description

You spend your day building a personal knowledge base in Logseq, but finding that one specific note or updating a nested block often feels like a chore. This Connector changes that by letting your AI agent actually see and interact with your local graph. Instead of copy-pasting your notes into a chat window, you can just ask your agent to find every mention of a specific project or to draft a new journal entry based on your existing research. It handles the heavy lifting of navigating your outliner structure, whether you are trying to audit your current notes or bulk-update information across multiple pages. It is a way to turn your static documentation into a dynamic workspace where you can talk to your data. By using this on the Vinkius marketplace, you get a reliable bridge that respects your privacy while making your personal knowledge graph much more reachable. You can finally stop hunting for information and start using it.

## Tools

### get_page_blocks
Extracts the hierarchical tree of blocks from a specific page. This lets the agent see how your ideas are nested.

### insert_block
Adds new outliner chunks to a page and updates the nodes. It allows for real-time content growth in your graph.

### update_block
Modifies the raw properties of a specific block while keeping links. This is the best way to edit existing data.

### delete_block
Erases a specific block and its child dependencies. Use this to remove specific points from an outliner.

### search_content
Runs local queries to find text across your entire graph. It is the primary way to retrieve specific information.

### get_current_graph
Verifies which graph and database directory your agent is currently using. This ensures your agent is in the right place.

### list_pages
Shows every page in your current Logseq graph. Use this to give your agent an overview of your content.

### get_page
Pulls specific metadata for a page using its name or unique ID. This helps the agent focus on one page at a time.

### create_page
Deploys a new page into your graph with native markdown content. It is perfect for starting new research threads.

### delete_page
Irreversibly removes a page and its associated metadata. Use this to clean up old or redundant notes.

## Prompt Examples

**Prompt:** 
```
Find all my notes about smart building research.
```

**Response:** 
```
I've scanned your graph and found 3 relevant matches:

*   **Page**: Smart-Buildings-Project
*   **Block**: Found in *Journal 2026-03-27* mentioning sensor setups
*   **Tag**: #research in multiple blocks

Would you like to see the specific blocks from the project page?
```

**Prompt:** 
```
Create a new page called 'Meeting Notes' with content '# Meetings 2026'.
```

**Response:** 
```
Page **Meeting Notes** created successfully in your graph. I've added the initial markdown header.

You can now use me to add specific meeting items or agenda points directly to this page.
```

**Prompt:** 
```
Add a block to the 'Project Alpha' page: 'Verify API endpoints for production'.
```

**Response:** 
```
Block added successfully to **Project Alpha**. It is now part of the outliner tree for that page.

Would you like me to add any specific child blocks or sub-tasks under this point?
```

## Capabilities

### Query your entire knowledge base
Search for specific text targets across your whole graph to find notes instantly.

### Create new pages and journal entries
Deploy new pages with native markdown content directly into your graph.

### Modify individual outliner blocks
Update specific block properties while keeping their unique IDs and links intact.

### Extract deeply nested hierarchies
Pull out complex block trees to understand the structure of your projects.

### Identify active graph paths
Verify which local database directory your agent is currently targeting.

## Use Cases

### Research Synthesis
A researcher asks the agent to find all notes on smart building research and summarize the key points from the graph.

### Meeting Management
A manager asks the agent to create a new Meeting Notes page and then adds specific agenda items using insert_block.

### Dev Docs
A developer asks the agent to update a specific technical block in their project documentation to reflect a new API change.

### Graph Cleanup
A PKM user asks the agent to find and delete old journal entries to clean up their graph and remove metadata loops.

## Benefits

- Stop manual searching with search_content to find specific notes instantly.
- Build your library faster by using create_page to generate new journal entries.
- Keep your notes organized by using insert_block to add content to specific pages.
- Maintain data integrity with update_block which preserves your unique block IDs.
- Understand complex projects by using get_page_blocks to see nested hierarchies.
- Verify your data source with get_current_graph to ensure your agent is looking at the right database.

## How It Works

The bottom line is it turns your local Logseq outliner into a searchable, editable database for your AI client.

1. Subscribe to the Connector and enable the HTTP API in your Logseq settings.
2. Provide your API token and the local host URL to your AI client.
3. Start asking your agent to find, create, or edit your notes.

## Frequently Asked Questions

**Can the Logseq MCP access my private notes?**
Yes, it accesses your local graph directly. Because it runs locally, your data stays on your machine rather than being uploaded to a third-party cloud.

**Does Logseq MCP work with Cursor?**
Yes, it works with Cursor and any other MCP-compatible client. You just need to provide your local API token and host URL in the settings.

**How do I set up Logseq MCP?**
First, enable the HTTP API in your Logseq settings. Then, copy your API token and host URL into your AI client's MCP configuration.

**Can the Logseq MCP delete my notes?**
Yes, it can delete pages and blocks. However, these actions are irreversible, so it is best to use it for intentional cleanup of your knowledge base.

**Is Logseq MCP better than just copy-pasting my notes?**
It is much more efficient. Instead of manual copying, the Connector allows your agent to interact with the actual structure of your graph, maintaining your links and hierarchy.

**Can I search across all my Logseq pages using my agent?**
Yes. Use the `search_content` tool to execute deep property searches across your graph indices. Your agent will filter titles, namespaces, and block scopes to find the exact information you need.

**How do I add a new note to a specific page?**
Use the `insert_block` tool and provide the target Page name or ID. Your agent will drive the Logseq editor to add a new outliner chunk with your markdown content immediately.

**Can my agent retrieve the hierarchical structure of a long page?**
Absolutely. The `get_page_blocks` tool extracts the full hierarchical tree from a page map. Your agent will return the nested arrays of outliner blocks, ensuring you have the complete structural context of your data.