MCP cover image
See in Github
2025-03-20

简单的logseq MCP服务器

1

Github Watches

2

Github Forks

16

Github Stars

Logseq MCP Server

A Model Context Protocol server that provides direct integration with Logseq's knowledge base. This server enables LLMs to interact with Logseq graphs, create pages, manage blocks, and organize information programmatically.

Usage with Claude Desktop

{
  "mcpServers": {
    "logseq": {
      "command": "uvx",
      "args": ["mcp-server-logseq"],
      "env": {
        "LOGSEQ_API_TOKEN": "<YOUR_KEY>",
        "LOGSEQ_API_URL": "http://127.0.0.1:12315"
      }
    }
  }
}

Available Tools

Block Operations

  • logseq_insert_block - Create new blocks in Logseq Parameters:

    • parent_block (string): Parent block UUID or page name
    • content (string, required): Block content
    • is_page_block (boolean): Create as page-level block
    • before (boolean): Insert before parent block
    • custom_uuid (string): Custom UUIDv4 for block
  • logseq_edit_block - Enter block editing mode Parameters:

    • src_block (string, required): Block UUID
    • pos (number): Cursor position
  • logseq_exit_editing_mode - Exit editing mode Parameters:

    • select_block (boolean): Keep block selected

Page Operations

  • logseq_create_page - Create new pages Parameters:

    • page_name (string, required): Page name
    • properties (object): Page properties
    • journal (boolean): Create as journal page
    • format (string): Page format (markdown/org)
  • logseq_get_page - Get page details Parameters:

    • src_page (string, required): Page identifier
    • include_children (boolean): Include child blocks
  • logseq_get_all_pages - List all pages Parameters:

    • repo (string): Repository name

Content Retrieval

  • logseq_get_current_page - Get active page/block Parameters: None

  • logseq_get_current_blocks_tree - Current page's block hierarchy Parameters: None

  • logseq_get_editing_block_content - Get content of active block Parameters: None

  • logseq_get_page_blocks_tree - Get page's block structure Parameters:

    • src_page (string, required): Page identifier

Prompts

logseq_insert_block

Create a new block in Logseq Arguments:

  • parent_block: Parent block reference (page name or UUID)
  • content: Block content
  • is_page_block: Set true for page-level blocks

logseq_create_page

Create a new Logseq page Arguments:

  • page_name: Name of the page
  • properties: Page properties as JSON
  • journal: Set true for journal pages

Installation

Using pip

pip install mcp-server-logseq

From source

git clone https://github.com/dailydaniel/logseq-mcp.git
cd logseq-mcp
cp .env.example .env
uv sync

Run the server:

python -m mcp_server_logseq

Configuration

API Key

  1. Generate API token in Logseq: API → Authorization tokens
  2. Set environment variable:
export LOGSEQ_API_TOKEN=your_token_here

Or pass via command line:

python -m mcp_server_logseq --api-key=your_token_here

Graph Configuration

Default URL: http://localhost:12315 To customize:

python -m mcp_server_logseq --url=http://your-logseq-instance:port

Examples

Create meeting notes page

Create new page "Team Meeting 2024-03-15" with properties:
- Tags: #meeting #engineering
- Participants: Alice, Bob, Charlie
- Status: pending

Add task block to existing page

Add task to [[Project Roadmap]]:
- [ ] Finalize API documentation
- Due: 2024-03-20
- Priority: high

Create journal entry with first block

Create journal entry for today with initial content:
- Morning standup completed
- Started work on new authentication system

Debugging

npx @modelcontextprotocol/inspector uv --directory . run mcp-server-logseq

Contributing

We welcome contributions to enhance Logseq integration:

  • Add new API endpoints (page linking, query support)
  • Improve block manipulation capabilities
  • Add template support
  • Enhance error handling

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Bora Yalcin
  • Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.

  • https://jgadvisorycpa.com
  • This GPT assists in finding a top-rated business CPA - local or virtual. We account for their qualifications, experience, testimonials and reviews. Business operators provide a short description of your business, services wanted, and city or state.

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • OffchainLabs
  • 进行以太坊的实施

  • modelcontextprotocol
  • 模型上下文协议服务器

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • Mintplex-Labs
  • 带有内置抹布,AI代理,无代理构建器,MCP兼容性等的多合一桌面和Docker AI应用程序。

    Reviews

    2 (1)
    Avatar
    user_PKbVveMM
    2025-04-15

    I've been using Qweather1 by overstarry, and it has been a game-changer for my daily weather updates. The interface is user-friendly, and the forecasts are incredibly accurate. I love how everything is well-organized and easy to navigate. Highly recommend it to anyone who needs reliable weather information! Check it out here: https://mcp.so/server/qweather1/overstarry.