
MCP Server for interacting with LogSeq graph
MCP Server for interacting with LogSeq graph
·
This project provides a set of Model Context Protocol (MCP) tools that enable AI agents to interact with your local Logseq instance.
pip install -e .Make sure your Logseq has the API enabled.
Configure the MCP server in your Cursor MCP configuration file (typically at ~/.cursor/mcp.json):
{
"mcpServers": {
"logseq": {
"command": "/opt/homebrew/bin/uvx",
"args": ["logseq-mcp"],
"env": {
"LOGSEQ_API_URL": "http://localhost:12315",
"LOGSEQ_TOKEN": "your-token-here"
}
}
}
}OR
claude mcp addLOGSEQ_API_URL=http://localhost:12315 LOGSEQ_TOKEN=your-token-here /opt/homebrew/bin/uvx logseq-mcpConfigure the MCP server as shown above in the Setup section
Open Cursor and go to the MCP panel (sidebar)
The Logseq tool should appear in your list of available tools
When using Claude in Cursor, you'll need to inform it that you have Logseq tools available with a prompt similar to:
"You have access to Logseq tools that can help you interact with my Logseq graph. You can use functions like logseq.get_all_pages(), logseq.get_page(name), logseq.create_page(name), etc."
All tools are available under the logseq namespace:
logseq.get_all_pages: Get a list of all pages in the Logseq graphlogseq.get_page: Get a specific page by namelogseq.create_page: Create a new pagelogseq.delete_page: Delete a page and all its blockslogseq.get_page_blocks: Get all blocks from a specific pagelogseq.get_block: Get a specific block by IDlogseq.create_block: Create a new block on a pagelogseq.insert_block: Insert a block as a child of another blocklogseq.update_block: Update an existing blocklogseq.move_block: Move a block to a different locationlogseq.remove_block: Remove a block and all its childrenlogseq.search_blocks: Search for blocks matching a queryJournal pages in Logseq have a specific format and attributes:
journal?: true - Indicates this is a journal pagejournalDay: YYYYMMDD - The date in numeric format (e.g., 20250404 for April 4, 2025)await logseq.create_page("Apr 4th, 2025")Important: You do not need to manually set the journal? or journalDay attributes. Simply creating a page with the proper date format (e.g., "Apr 4th, 2025") will automatically configure it as a journal page with the appropriate attributes.
Blocks in Logseq have some important characteristics to understand:
Automatic Bullets: All blocks are automatically rendered as bullet points in the Logseq UI
Page Links: Create links using double brackets: [[Page Name]]
Hierarchical Blocks:
parent: The parent block's IDlevel: The indentation level (1 for top-level, 2+ for indented blocks)left: The block to the left (typically the parent for indented blocks)Block Content: When creating blocks, you can include text formatting:
Journal Blocks: Blocks created in journal pages inherit special attributes:
journal?: truejournalDay: YYYYMMDD - Same as the journal pageNote: Like journal pages, these block attributes are automatically handled by Logseq. You don't need to manually set the journal? or journalDay attributes when creating blocks on journal pages.
Working with the Cursor agent: When you have Logseq MCP tools configured in Cursor, you can give the agent prompts like:
The agent will use the appropriate Logseq tools to carry out these operations on your graph.
Pick your client and paste the snippet. Each one is the same server, written the way that client expects it.
claude mcp add logseq -- /opt/homebrew/bin/uvx logseq-mcp{
"mcpServers": {
"logseq": {
"env": {
"LOGSEQ_TOKEN": "",
"LOGSEQ_API_URL": ""
},
"args": [
"logseq-mcp"
],
"command": "/opt/homebrew/bin/uvx"
}
}
}code --add-mcp '{"name":"logseq","env":{"LOGSEQ_TOKEN":"","LOGSEQ_API_URL":""},"args":["logseq-mcp"],"command":"/opt/homebrew/bin/uvx"}'[mcp_servers.logseq]
command = "/opt/homebrew/bin/uvx"
args = ["logseq-mcp"]Runs locally on your device. Your client starts the server itself, so nothing has to be hosted.
Paste this prompt into your agent. It reads this page and does the setup for you.
Read https://aiagentslisting.com/mcp/logseq-mcp-tools to learn what the "Logseq MCP Tools" MCP server does and how to install it. Add it to my coding agent's MCP configuration as documented on that page, then confirm the server connects and list the tools it exposes.Agents can also browse this directory over MCP at https://aiagentslisting.com/api/mcp
This server runs locally, so we can't read its tool list over the web yet.
We could not run this server: it ships no npx package for our sandbox and no public endpoint. The four checks that need a live server are left out, and the grade tops out at B until one exists.
Maintain this server? Claiming proves you own the listing and earns the last 4 points.
Claim this listingPaste this line near the top of your repository's README. The badge always renders the current score.
[](https://aiagentslisting.com/mcp/logseq-mcp-tools)Nothing comparable is listed yet.
No tagged releases on record.
Connect to the AI Agents Listing MCP server at https://aiagentslisting.com/api/mcp using the HTTP transport and complete the sign-in when it asks. Then call the submit_review tool for the listing "logseq-mcp-tools" with a rating from 1 to 5 and a short note on what worked and what did not.No reviews yet
Be the first to share your experience with this tool.
One email a week. New agents, MCP servers and skills, and what is actually getting traction.