hedgedoc-mcp-server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@hedgedoc-mcp-server Create a note with a Mermaid flowchart of a login process"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
HedgeDoc MCP Server
MCP server for HedgeDoc 1.x — the open-source collaborative markdown editor. Create notes and Mermaid diagrams from OpenCode and other MCP-compatible AI agents.
Note: This is built for HedgeDoc 1.x (formerly CodiMD). It uses the HedgeDoc 1.x API, which differs from HedgeDoc 2.
Tools
Tool | Description |
| Create a blank note with the instance's default template |
| Create a new note with a random ID |
| Create a new note with a custom URL alias (requires FreeURL mode) |
| Create a note with a Mermaid diagram |
| Read the raw markdown content of a note |
| Get note metadata (title, description, timestamps, viewcount) |
| List all available revisions of a note |
| Get the full content of a specific revision |
| Get the published (read-only) URL of a note |
| Get the slide presentation URL of a note |
| Get the current status of the HedgeDoc instance |
Related MCP server: hedgedoc-mcp
Usage
export HEDGEDOC_URL="https://hedgedoc.your-instance.com"
uvx hedgedoc-mcp-server stdioHedgeDoc 1.x does not use API tokens for note operations. Authentication is handled via session cookies (browser) or instance configuration (see Production Ready guide).
OpenCode config
{
"mcp": {
"hedgedoc": {
"type": "local",
"enabled": true,
"command": ["uvx", "hedgedoc-mcp-server", "stdio"],
"environment": {
"HEDGEDOC_URL": "https://hedgedoc.your-instance.com"
}
}
}
}Requirements
Requirement | Notes |
HedgeDoc 1.x instance | Tested on 1.x. Not compatible with HedgeDoc 2. |
Python 3.11+ | |
| Or |
API Endpoints Used
This server uses the following HedgeDoc 1.x API endpoints:
Method | Endpoint | Used by |
|
| Create a blank note |
|
| Create a note (random ID) |
|
| Create a note (custom alias) |
|
| Read raw markdown |
|
| Read metadata |
|
| List revisions |
|
| Get specific revision |
|
| Published URL |
|
| Slide URL |
|
| Instance status |
For more details, see the official API docs.
Instance Configuration
Your HedgeDoc administrator may need to configure these settings:
Setting | Impact | Docs |
| Allows note creation without login | |
| Enables custom URL aliases | |
| Max new notes per 5 minutes (default: 20) | |
| Max note length in chars (default: 100k) | |
| If true, no notes can be created |
Development
git clone https://github.com/Jyzus/kaymer-hedgedoc-mcp
cd kaymer-hedgedoc-mcp
uv venv && uv pip install -e .
HEDGEDOC_URL="https://hedgedoc.your-instance.com" uv run hedgedoc-mcp-serverLicense
MIT
Available Tools
11 toolshedgedoc_createA
Create a new HedgeDoc note with a random ID.
title: The title of the note (will be added as level-1 heading)
content: The markdown body content Returns the note ID and URL. Note: HedgeDoc 1.x does not use API tokens. This tool works anonymously if the instance allows it (CMD_ALLOW_ANONYMOUS).
Inputs: title (required), content (required). Returns: result
hedgedoc_create_blankA
Create a blank HedgeDoc note with the instance's default template content.
Useful for quickly starting a new note without providing content upfront. Returns the note ID and URL.
Inputs: no named parameters. Returns: result
hedgedoc_create_diagramA
Create a HedgeDoc note with a Mermaid diagram.
HedgeDoc 1.x renders Mermaid natively in the editor.
title: The title of the diagram note
diagram_type: The Mermaid diagram type (e.g. 'graph TD', 'sequenceDiagram', 'flowchart LR', 'classDiagram', 'gantt', 'pie')
diagram_code: The Mermaid diagram body (without the type header)
description: Optional explanatory text before the diagram Returns the note ID and URL.
Inputs: title (required), diagram_code (required), diagram_type (required), description. Returns: result
hedgedoc_create_with_aliasA
Create a new HedgeDoc note with a custom URL alias.
Requires HedgeDoc's FreeURL mode to be enabled on the instance (CMD_ALLOW_FREEURL=true).
alias: The custom URL slug (e.g. 'my-diagram')
title: The title of the note (will be added as level-1 heading)
content: The markdown body content Returns the note ID and URL.
Inputs: alias (required), title (required), content (required). Returns: result
hedgedoc_get_revisionA
Get the full content and authorship of a specific revision.
note_id: The note ID or alias (the slug from the URL)
revision_id: The revision ID (Unix timestamp from hedgedoc_list_revisions) Returns JSON with the note content and authorship data at that revision.
Inputs: note_id (required), revision_id (required). Returns: result
hedgedoc_infoA
Get metadata of a HedgeDoc note (title, description, timestamps, viewcount).
note_id: The note ID or alias (the slug from the URL)
Inputs: note_id (required). Returns: result
hedgedoc_list_revisionsA
List all available revisions of a HedgeDoc note.
Each revision entry has an id (Unix timestamp) and a length (chars). The revision-id can be used with hedgedoc_get_revision to retrieve the full content of a specific revision.
note_id: The note ID or alias (the slug from the URL) Returns a JSON array of revisions.
Inputs: note_id (required). Returns: result
hedgedoc_publish_urlA
Get the published (read-only) URL of a HedgeDoc note.
HedgeDoc's publish mode renders the note without the editor UI — ideal for sharing with viewers who should not edit the content.
note_id: The note ID or alias (the slug from the URL) Returns the published URL.
Inputs: note_id (required). Returns: result
hedgedoc_readA
Read the raw markdown content of a HedgeDoc note.
note_id: The note ID or alias (the slug from the URL)
Inputs: note_id (required). Returns: result
hedgedoc_slide_urlA
Get the slide presentation URL of a HedgeDoc note.
HedgeDoc can render notes designed as slides (using slide breaks) into a full-screen presentation — useful for diagrams in meetings.
note_id: The note ID or alias (the slug from the URL) Returns the slide URL.
Inputs: note_id (required). Returns: result
hedgedoc_statusA
Get the current status of the HedgeDoc instance.
Returns JSON with:
note_count: Number of notes stored on the server
online_users: Number of (distinct) online users
Other instance metrics
Inputs: no named parameters. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
The four create variants are distinct in their parameters (blank, content, alias, diagram), but create and create_with_alias are nearly identical except for the alias parameter, which could cause confusion. The remaining tools (read, info, status, revisions, URLs) are clearly differentiated by action.
All tools share the hedgedoc_ prefix, and most follow a verb-based pattern. However, there is inconsistency: some are plain verbs (create, read), some are nouns (info, status), some are verb_noun (publish_url, list_revisions), and the create variants use a create_<variant> pattern. This is mostly predictable but not perfectly uniform.
With 11 tools, the server is well-scoped for its purpose. Each tool covers a distinct aspect of note management, and the count is within the ideal range for a domain-specific MCP server.
The server provides strong coverage for creating and reading notes, but lacks update and delete operations, making it impossible to modify or remove notes. Additionally, there is no list-notes tool, so agents must know note IDs in advance, leaving significant gaps in the note lifecycle.
Maintenance
Related MCP Connectors
Linked markdown notes as memory for AI apps: search, read, save and link notes over MCP.
1Create and manage Mermaid.js flowcharts and diagrams with AI agents via MCP.
Markdown-based note-taking with a hosted MCP server. Your notes serve you and your AI.
Shared Markdown notes for MCP-compatible AI tools.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with a local Mermaid diagram editor via MCP, allowing them to get and set diagrams programmatically.13Apache 2.0
- AlicenseAqualityBmaintenanceMCP server for interacting with self-hosted HedgeDoc 1.x, enabling AI agents to create, read, update, and manage notes via session-cookie authentication with automatic re-login.51MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to list, read, search, create, update, rename, and delete markdown notes in a local Obsidian vault via an HTTP MCP endpoint.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP-compatible clients to create, list, search, and delete notes, read all notes as markdown, and use prompts to summarize or clean up notes.MIT