HackMD MCP server

Integrates with HackMD API to enable document creation, reading, updating, and deletion within collaborative markdown environments through authentication-secured personal and team workflows.
Back to servers
Setup instructions
Provider
yuna0x0
Release date
Mar 19, 2025
Language
TypeScript
Package
Stats
5.8K downloads
32 stars

The HackMD MCP Server provides a Model Context Protocol interface for interacting with the HackMD API. It enables AI assistants to manage your HackMD notes and team content, including creating, reading, updating, and deleting notes, viewing history, and working with team notes.

Requirements

  • Node.js 18+

Installation Options

Setting up Environment Variables

Before using the server, you'll need to configure these environment variables:

  • HACKMD_API_TOKEN: Required - Your HackMD API token
  • HACKMD_API_URL: Optional - HackMD API Endpoint URL (Default: https://api.hackmd.io/v1)

You can get an API token from HackMD settings.

Installing via Smithery

For automatic installation with Claude Desktop using Smithery:

npx -y @smithery/cli install @yuna0x0/hackmd-mcp --client claude

# For other MCP clients:
# List available clients
npx -y @smithery/cli list clients
# Install to other clients
npx -y @smithery/cli install @yuna0x0/hackmd-mcp --client <client_name>

Installing via mcp-get

npx @michaellatman/mcp-get@latest install hackmd-mcp

Manual Installation

  1. Add this server to your claude_desktop_config.json:
{
  "mcpServers": {
    "hackmd": {
      "command": "npx",
      "args": ["-y", "hackmd-mcp"],
      "env": {
        "HACKMD_API_TOKEN": "your_api_token"
      }
    }
  }
}
  1. Restart Claude Desktop
  2. You can now use the tools to interact with your HackMD account

Available Tools

User API

  • get_user_info: Get information about the authenticated user

User Notes API

  • list_user_notes: List all notes owned by the user
  • get_note: Get a note by its ID
  • create_note: Create a new note
  • update_note: Update an existing note
  • delete_note: Delete a note
  • get_history: Get user's reading history

Teams API

  • list_teams: List all teams accessible to the user

Team Notes API

  • list_team_notes: List all notes in a team
  • create_team_note: Create a new note in a team
  • update_team_note: Update an existing note in a team
  • delete_team_note: Delete a note in a team

Using with Claude

Start by asking Claude to help you manage your HackMD notes. For example:

Can you help me manage my HackMD notes?

Claude can then perform actions like:

  • Listing your notes
  • Creating new notes
  • Reading note content
  • Updating notes
  • Managing team notes

Simply describe what you want to do in natural language, such as:

Please list all my notes.

Debugging with MCP Inspector

If you encounter any issues, you can use the MCP Inspector to test the server:

npx @modelcontextprotocol/inspector -e HACKMD_API_TOKEN=your_api_token npx hackmd-mcp

Then open your browser to the provided URL (usually http://127.0.0.1:6274) to access the inspector interface where you can browse available tools and test them with custom parameters.

Docker Support

You can also run the server using Docker:

docker pull yuna0x0/hackmd-mcp

Security Considerations

This MCP server requires your HackMD API token to function. Keep this token secure and never share it or include it in any public repositories.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "hackmd" '{"command":"npx","args":["-y","hackmd-mcp"],"env":{"HACKMD_API_TOKEN":"your_api_token"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "hackmd": {
            "command": "npx",
            "args": [
                "-y",
                "hackmd-mcp"
            ],
            "env": {
                "HACKMD_API_TOKEN": "your_api_token"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "hackmd": {
            "command": "npx",
            "args": [
                "-y",
                "hackmd-mcp"
            ],
            "env": {
                "HACKMD_API_TOKEN": "your_api_token"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later