Skip to main content

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
hedgedoc_create_blank Create a blank note with the instance's default template
hedgedoc_create Create a new note with a random ID
hedgedoc_create_with_alias Create a new note with a custom URL alias (requires FreeURL mode)
hedgedoc_create_diagram Create a note with a Mermaid diagram
hedgedoc_read Read the raw markdown content of a note
hedgedoc_info Get note metadata (title, description, timestamps, viewcount)
hedgedoc_list_revisions List all available revisions of a note
hedgedoc_get_revision Get the full content of a specific revision
hedgedoc_publish_url Get the published (read-only) URL of a note
hedgedoc_slide_url Get the slide presentation URL of a note
hedgedoc_status Get the current status of the HedgeDoc instance

Usage

export HEDGEDOC_URL="https://hedgedoc.your-instance.com"
uvx hedgedoc-mcp-server stdio

HedgeDoc 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+
uv (recommended) Or pip install hedgedoc-mcp-server

API Endpoints Used

This server uses the following HedgeDoc 1.x API endpoints:

Method Endpoint Used by
GET /new Create a blank note
POST /new Create a note (random ID)
POST /new/{alias} Create a note (custom alias)
GET /{id}/download Read raw markdown
GET /{id}/info Read metadata
GET /{id}/revision List revisions
GET /{id}/revision/{rev} Get specific revision
GET /{id}/publish Published URL
GET /{id}/slide Slide URL
GET /status Instance status

For more details, see the official API docs.

Instance Configuration

Your HedgeDoc administrator may need to configure these settings:

Setting Impact Docs
CMD_ALLOW_ANONYMOUS=true Allows note creation without login Users and Privileges
CMD_ALLOW_FREEURL=true Enables custom URL aliases Users and Privileges
CMD_RATE_LIMIT_NEW_NOTES=20 Max new notes per 5 minutes (default: 20) Web Security
CMD_DOCUMENT_MAX_LENGTH=100000 Max note length in chars (default: 100k) HedgeDoc basics
CMD_DISABLE_NOTE_CREATION=false If true, no notes can be created Users and Privileges

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-server

License

MIT

Metadata

Release files for hedgedoc-mcp-server 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hedgedoc-mcp-server 0.3.0
File Size Uploaded
hedgedoc_mcp_server-0.3.0.tar.gz 46.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hedgedoc-mcp-server 0.3.0
File Interpreter ABI Platform
hedgedoc_mcp_server-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 52.0 kB

Release files / hedgedoc_mcp_server-0.3.0.tar.gz

Download URL hedgedoc_mcp_server-0.3.0.tar.gz
Size 46.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f2c808c87adddd6a69996dc34866b076ecbddd77741560f2cd250331ccd89dad
BLAKE2b-256 checksum
How to use checksums
816ce29f7191d36ae7d2379cb53d712a107a18f3be3fdbabcdf2ba4055b22447
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / hedgedoc_mcp_server-0.3.0-py3-none-any.whl

Download URL hedgedoc_mcp_server-0.3.0-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1e3c51a7731c8ffe03891dc1ccef6d3615804578aa15cfc0ca558ef709a9551a
BLAKE2b-256 checksum
How to use checksums
f7c975200d9d01ce28167d600982160003135f68b519d8c44acc6aca0ff48531
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page