Skip to main content

MCP server for HedgeDoc 1.x — create collaborative markdown notes with Mermaid diagrams

Project description

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 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_read Read the raw markdown content of a note
hedgedoc_info Get note metadata (title, description, timestamps)
hedgedoc_create_diagram Create a note with a Mermaid diagram

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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hedgedoc_mcp_server-0.2.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hedgedoc_mcp_server-0.2.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file hedgedoc_mcp_server-0.2.0.tar.gz.

File metadata

  • Download URL: hedgedoc_mcp_server-0.2.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for hedgedoc_mcp_server-0.2.0.tar.gz
Algorithm Hash digest
SHA256 106c2b0d08cd364e8eb966af58875e8fb5fa4d3ac81f8406d3029f1581097499
MD5 cec6684dff172dfed3cbb37703961eff
BLAKE2b-256 5f32cb2c194b409ae284e7a2a22ec61fdfac6d70a6c0d3b5b180ac9ab5334d3d

See more details on using hashes here.

File details

Details for the file hedgedoc_mcp_server-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: hedgedoc_mcp_server-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for hedgedoc_mcp_server-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 656fe429f024d5fbcb12e15f762a7206ff599024c2e1b48d278d7a5afa0ebb62
MD5 5a2ec8524a7676ebfd3b6d2fde493bd7
BLAKE2b-256 57bf9efdbfe9d828ca98109c9d4cea1b4884a37e369dcd286eaebf61a53393e7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page