HackMD

v1.5.7
io.github.yuna0x0/hackmd-mcp Checked 10 hours ago Published 1 year ago

A Model Context Protocol server for integrating HackMD's note-taking platform with AI assistants.

Values you need

VariableWhat it is
HACKMD_API_TOKENrequired secret Your HackMD API token for API authentication
HACKMD_API_URLoptional Optional HackMD API URL, defaults to https://api.hackmd.io/v1 Default: https://api.hackmd.io/v1

npm (npx) verified

Requires Node.js 18+

Run in a terminal
claude mcp add hackmd-mcp -e 'HACKMD_API_TOKEN=<HACKMD_API_TOKEN>' -- npx -y hackmd-mcp@1.5.7
Add to claude_desktop_config.json
{
  "mcpServers": {
    "hackmd-mcp": {
      "args": [
        "-y",
        "hackmd-mcp@1.5.7"
      ],
      "command": "npx",
      "env": {
        "HACKMD_API_TOKEN": "<HACKMD_API_TOKEN>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "hackmd-mcp": {
      "args": [
        "-y",
        "hackmd-mcp@1.5.7"
      ],
      "command": "npx",
      "env": {
        "HACKMD_API_TOKEN": "<HACKMD_API_TOKEN>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "HACKMD_API_TOKEN",
      "id": "hackmd-api-token",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "hackmd-mcp": {
      "args": [
        "-y",
        "hackmd-mcp@1.5.7"
      ],
      "command": "npx",
      "env": {
        "HACKMD_API_TOKEN": "${input:hackmd-api-token}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.hackmd-mcp]
command = "npx"
args = ["-y", "hackmd-mcp@1.5.7"]
env = { "HACKMD_API_TOKEN" = "<HACKMD_API_TOKEN>" }

Docker

Requires Docker

Run in a terminal
claude mcp add hackmd-mcp -e 'HACKMD_API_TOKEN=<HACKMD_API_TOKEN>' -- docker run -i --rm -e HACKMD_API_TOKEN ghcr.io/yuna0x0/hackmd-mcp:1.5.7
Add to claude_desktop_config.json
{
  "mcpServers": {
    "hackmd-mcp": {
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "HACKMD_API_TOKEN",
        "ghcr.io/yuna0x0/hackmd-mcp:1.5.7"
      ],
      "command": "docker",
      "env": {
        "HACKMD_API_TOKEN": "<HACKMD_API_TOKEN>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "hackmd-mcp": {
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "HACKMD_API_TOKEN",
        "ghcr.io/yuna0x0/hackmd-mcp:1.5.7"
      ],
      "command": "docker",
      "env": {
        "HACKMD_API_TOKEN": "<HACKMD_API_TOKEN>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "HACKMD_API_TOKEN",
      "id": "hackmd-api-token",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "hackmd-mcp": {
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "HACKMD_API_TOKEN",
        "ghcr.io/yuna0x0/hackmd-mcp:1.5.7"
      ],
      "command": "docker",
      "env": {
        "HACKMD_API_TOKEN": "${input:hackmd-api-token}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.hackmd-mcp]
command = "docker"
args = ["run", "-i", "--rm", "-e", "HACKMD_API_TOKEN", "ghcr.io/yuna0x0/hackmd-mcp:1.5.7"]
env = { "HACKMD_API_TOKEN" = "<HACKMD_API_TOKEN>" }

For AI agents

  1. Ask the user for: HACKMD_API_TOKEN. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: get_user_info, list_teams, get_history, list_team_notes, create_team_note, update_team_note, delete_team_note, list_user_notes, ….
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json