Navigation
HackMD: AI Collaboration & ContextSync for Seamless Notes - MCP Implementation

HackMD: AI Collaboration & ContextSync for Seamless Notes

HackMD’s Model Context Protocol Server: Where your notes and AI assistants finally stop arguing and start co-writing. 🤝🤖✨" )

Developer Tools
4.7(54 reviews)
81 saves
37 comments

Ranked in the top 9% of all AI tools in its category

About HackMD

What is HackMD: AI Collaboration & ContextSync for Seamless Notes?

HackMD is an AI-powered collaboration platform designed to streamline note-taking and teamwork through its Model Context Protocol (MCP) server. By integrating AI capabilities, it enables assistants to interact with notes, manage user data, and synchronize content across teams in real time. The ContextSync feature ensures all notes and updates are instantly available, making collaboration seamless and efficient.

How to Use HackMD: AI Collaboration & ContextSync for Seamless Notes?

Getting started with HackMD involves a few straightforward steps:

  1. Install Dependencies: Ensure Node.js 18+ is installed, then clone the repository and run bun install.
  2. Configure API Token: Set your HackMD API token via a .env file or environment variables.
  3. Launch the Server: Use bun start for local setups or bunx hackmd-mcp for quickstarts.
  4. Test with MCP Inspector: Access the debug interface at http://localhost:5173 to test tools and parameters.
  5. Integrate with AI Assistants: Configure claude_desktop_config.json to link with tools like Claude Desktop.

HackMD Features

Key Features of HackMD: AI Collaboration & ContextSync for Seamless Notes?

  • User & Team Management: Retrieve user details, list notes, and manage team access.
  • Full Note Control: Create, edit, delete, and view notes with real-time updates via ContextSync.
  • History Tracking: Monitor read history to understand user engagement patterns.
  • AI-Driven Actions: Leverage tools like list_user_notes or create_team_note through AI assistants.
  • Secure Integration: Environment-based API token handling ensures sensitive data stays protected.

Use Cases of HackMD: AI Collaboration & ContextSync for Seamless Notes?

Whether you're a developer, team lead, or content creator, HackMD fits scenarios such as:

  • Automated Note Management: Let AI assistants organize or search through your notes library.
  • Team Collaboration: Sync notes across teams, track updates, and maintain version history effortlessly.
  • Knowledge Bases: Build centralized repositories for documentation or project plans using ContextSync.
  • Debugging Workflows: Use the MCP Inspector to troubleshoot API interactions before scaling.

HackMD FAQ

FAQ from HackMD: AI Collaboration & ContextSync for Seamless Notes?

Q: Is my API token secure?
A: Yes. Tokens are stored in environment variables or encrypted .env files—never commit them to repositories.

Q: Can I use HackMD with non-AI tools?
A: Absolutely. The MCP server works with any compatible client, including manual API calls for custom workflows.

Q: How do I fix "API token missing" errors?
A: Double-check your environment variables or .env file. Ensure the token is correctly formatted and not expired.

Q: Does HackMD support multi-team projects?
A: Yes. The list_teams and create_team_note tools let you manage notes across multiple teams in one workspace.

Content

HackMD MCP Server

This is a Model Context Protocol (MCP) server for interacting with the HackMD API. It allows AI assistants to perform operations such as:

  • Get user information
  • List user's notes
  • Create, read, update, and delete notes
  • View read history
  • Work with team notes

Requirements

  • Node.js 18+
  • HackMD API token

Installation

Clone the repository and install dependencies:

git clone https://github.com/yuna0x0/hackmd-mcp.git
cd hackmd-mcp
bun install  # or use npm, yarn, pnpm

Configuration

Option 1: Using a .env file

  1. Create a .env file by copying the example:

    cp .env.example .env

  2. Edit the .env file and add your HackMD API token:

    HACKMD_API_TOKEN=your_api_token

Option 2: Using environment variables inline

You can also provide the API token directly when running the server:

HACKMD_API_TOKEN=your_api_token bun start

You can get an API token from HackMD settings.

Usage

Start the MCP server

Local installation:

bun start  # or use npm, yarn, pnpm

Using bunx (without cloning):

HACKMD_API_TOKEN=your_api_token bunx hackmd-mcp

Debugging with MCP Inspector

You can use the MCP Inspector to test and debug the HackMD MCP server:

# Using the package.json script
bun run inspector  # or use npm, yarn, pnpm

# Alternative: Direct use with bunx (or npx)
bunx @modelcontextprotocol/inspector -e HACKMD_API_TOKEN=your_api_token bunx hackmd-mcp

Then open your browser to the provided URL (usually http://localhost:5173) to access the MCP Inspector interface. From there, you can:

  1. Connect to your running HackMD MCP server
  2. Browse available tools
  3. Run tools with custom parameters
  4. View the responses

This is particularly useful for testing your setup before connecting it to Claude or another AI assistant.

Using with Claude Desktop or other MCP clients

  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. Use the tools to interact with your HackMD account

Available Tools

  • get_user_info : Get information about the authenticated user
  • 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
  • list_teams : List all teams accessible to the user
  • 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

Example Usage in Claude

Can you help me manage my HackMD notes?

Then use commands like:

Please list all my notes.

Security Notice

This MCP server requires your HackMD API token in the .env file or as an environment variable. Keep this information secure and never commit it to version control.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Related MCP Servers & Clients