HackMD MCP Server

HackMD MCP Server

MCP server connecting LLM clients to the HackMD collaborative note platform.

43
Stars
7
Forks
43
Watchers
0
Issues
HackMD MCP Server implements the Model Context Protocol (MCP) to provide a standardized interface between large language model (LLM) clients and the HackMD collaborative note service. Through HTTP and STDIO transports, it enables creation, retrieval, update, and deletion of notes, along with management of teams, user profiles, and history data. It supports deployment in both local and cloud environments, with secure API token-based authentication and configuration via environment variables or HTTP headers.

Key Features

Supports both HTTP and STDIO transports for flexible integration
Enables secure access to HackMD via API token authentication
CRUD operations for both user and team notes
Retrieves user profile and reading history
Lists and manages teams and team notes
Configurable via environment variables or HTTP headers
Cloud deployment ready, including Smithery support
Protects endpoints using allowed API URL lists and authentication recommendations
Allows dynamic server port configuration
Designed for seamless LLM/client interaction with HackMD

Use Cases

Integrating LLMs and chat clients with HackMD for knowledge management
Automating collaborative note-taking and editing in team environments
Enabling AI assistants to create and fetch team or user notes
Synchronizing HackMD content with other productivity platforms
Building knowledge retrieval tools for organizations using HackMD
Automated reporting or summarization based on HackMD note history
Team coordination and collaborative documentation through API-driven workflows
Centralizing team note access for research or project management
Securing and streamlining HackMD access in multi-client environments
Deploying in cloud environments to offer shared LLM plugin capabilities for HackMD

README

HackMD MCP Server

A Model Context Protocol (MCP) server that interfaces with the HackMD API, allowing LLM clients to access and interact with HackMD notes, teams, user profiles, and history data.

Features

  • Get user profile information
  • Create, read, update, and delete notes
  • Manage team notes and collaborate with team members
  • Access reading history
  • List and manage teams
  • Dual transport support: Both HTTP and STDIO transports
  • Cloud deployment ready: Support Smithery and other platforms

Requirements

  • Node.js 18+

Local Installation (STDIO Transport)

  1. Add this server to your mcp.json / claude_desktop_config.json:
json
{
  "mcpServers": {
    "hackmd": {
      "command": "npx",
      "args": ["-y", "hackmd-mcp"],
      "env": {
        "HACKMD_API_TOKEN": "your_api_token"
      }
    }
  }
}

You may also optionally set the HACKMD_API_URL environment variable if you need to use a different HackMD API endpoint.

  1. Restart your MCP client (e.g., Claude Desktop)
  2. Use the tools to interact with HackMD

Server Deployment (HTTP Transport)

Self-Hosting

Follow the Local Development instructions to set up the project locally, then run:

bash
pnpm run start:http

This will start the server on port 8081 by default. You can change the port by setting the PORT environment variable.

Cloud Deployment

You can deploy this MCP server to any cloud platform that supports Node.js server applications.

You can also deploy via MCP platforms like Smithery.

Configuration

Environment Variables (STDIO Transport and HTTP Transport server where host provides the config)

When using the STDIO transport or hosting the HTTP transport server, you can pass configuration via environment variables:

  • HACKMD_API_TOKEN: HackMD API Token (Required for all operations)
  • HACKMD_API_URL: (Optional) HackMD API URL (Defaults to https://api.hackmd.io/v1)

Environment variables applied only for the HTTP transport server:

  • ALLOWED_HACKMD_API_URLS: (Optional) A comma-separated list of allowed HackMD API URLs. The server will reject requests if the provide HackMD API URL is not in this list. If not set, only the default URL (https://api.hackmd.io/v1) is allowed.

[!CAUTION] If you are hosting the HTTP transport server with token pre-configured, you should protect your endpoint and implement authentication before allowing users to access it. Otherwise, anyone can access your MCP server while using your HackMD token.

HTTP Headers (HTTP Transport where user provides the config)

When using the HTTP transport, user can pass configuration via HTTP headers:

  • Hackmd-Api-Token: HackMD API Token (Required for all operations)
  • Hackmd-Api-Url: (Optional) HackMD API URL (Defaults to https://api.hackmd.io/v1)

If the user provides the token in the header, while the server also has HACKMD_API_TOKEN set, the header value will take precedence.

Get a HackMD API Token

To get an API token, follow these steps:

  1. Go to HackMD settings.
  2. Click on "Create API Token".
  3. Copy the generated token and use it in your .env file or environment variables.

Available Tools

Profile Tools

  • get_user_info: Get information about the authenticated user

Teams Tools

  • list_teams: List all teams accessible to the user

History Tools

  • get_history: Get user's reading history

Team Notes Tools

  • 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

User Notes Tools

  • 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

Example Usage

Basic Note Management

Can you help me manage my HackMD notes?

List Notes

Please list all my notes.

Create a New Note

Create a new note with the title "Meeting Notes" and content:
```
# Meeting Notes

Discussion points:
- Item 1
- Item 2
```

Team Collaboration

Show me all the teams I'm part of and list the notes in the first team.

Local Development

This project uses pnpm as its package manager.

Clone the repository and install dependencies:

bash
git clone https://github.com/yuna0x0/hackmd-mcp.git
cd hackmd-mcp
pnpm install

Configuration

  1. Create a .env file by copying the example:
bash
cp env.example .env
  1. Edit the .env file and add your HackMD API token:
HACKMD_API_TOKEN=your_api_token

Debugging with MCP Inspector

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

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

# Use this instead when Local Development
pnpm run inspector

Then open your browser to the provided URL (usually http://localhost:6274) 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 MCP clients like Claude Desktop.

Docker

Pull from GitHub Container Registry:

bash
docker pull ghcr.io/yuna0x0/hackmd-mcp

Docker build (Local Development):

bash
docker build -t ghcr.io/yuna0x0/hackmd-mcp .

Docker multi-platform build (Local Development):

bash
docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/yuna0x0/hackmd-mcp .

MCP Bundles (MCPB)

To create an MCP Bundle for this server, run:

bash
pnpm run pack:mcpb

Security Notice

This MCP server accepts your HackMD API token in the .env file, environment variable or HTTP header. 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.

Star History

Star History Chart

Repository Owner

yuna0x0
yuna0x0

User

Repository Details

Language TypeScript
Default Branch main
Size 208 KB
Contributors 2
License MIT License
MCP Verified Nov 12, 2025

Programming Languages

TypeScript
60.17%
JavaScript
32.07%
Dockerfile
7.76%

Tags

Topics

ai api hackmd llm mcp mcp-server

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • MCP Manager for Claude Desktop

    MCP Manager for Claude Desktop

    A desktop app to manage Model Context Protocol (MCP) servers for Claude Desktop on MacOS.

    MCP Manager for Claude Desktop provides a user-friendly interface to manage Model Context Protocol (MCP) servers, enabling Claude to access private data, APIs, and local or remote services securely from a MacOS desktop. It facilitates rapid configuration and integration with a wide variety of MCP servers, including productivity tools, databases, and web APIs. The app runs locally to ensure data privacy and streamlines connecting Claude to new sources through simple environment and server settings management.

    • 270
    • MCP
    • zueai/mcp-manager
  • Teamwork MCP Server

    Teamwork MCP Server

    Seamless Teamwork.com integration for Large Language Models via the Model Context Protocol

    Teamwork MCP Server is an implementation of the Model Context Protocol (MCP) that enables Large Language Models to interact securely and programmatically with Teamwork.com. It offers standardized interfaces, including HTTP and STDIO, allowing AI agents to perform various project management operations. The server supports multiple authentication methods, an extensible toolset architecture, and is designed for production deployments. It provides read-only capability for safe integrations and robust observability features.

    • 11
    • MCP
    • Teamwork/mcp
  • mcp-kibela

    mcp-kibela

    MCP server for secure, AI-assisted access to Kibela notes.

    mcp-kibela is a Model Context Protocol (MCP) server implementation that enables AI assistants to search, retrieve, create, and update content from Kibela, a team knowledge-sharing platform. It provides standardized endpoints for note search, fetching individual or recent notes, and managing note content. Integrating with tools like Claude, Cursor, and VSCode, it allows seamless, secure access to organizational knowledge through MCP-enabled clients. Authentication via environment variables ensures secure connections to Kibela APIs.

    • 12
    • MCP
    • kj455/mcp-kibela
  • liveblocks-mcp-server

    liveblocks-mcp-server

    Enable AI models to interact with Liveblocks via standardized MCP server endpoints.

    liveblocks-mcp-server provides a Model Context Protocol (MCP) server allowing AI clients to access, create, modify, and delete resources within Liveblocks such as rooms, threads, comments, and notifications. The server also offers read access to Liveblocks Storage and Yjs, making it easier for AI interfaces to manage collaborative features through Liveblocks’ REST API. Integration is supported for various clients including Cursor, Claude Desktop, and VS Code. Secure authentication is handled via project-specific secret keys.

    • 11
    • MCP
    • liveblocks/liveblocks-mcp-server
  • MCP Obsidian Server

    MCP Obsidian Server

    Integrate Obsidian note management with AI models via the Model Context Protocol.

    MCP Obsidian Server acts as a bridge between Obsidian and AI models by providing an MCP-compatible server interface. It enables programmatic access to Obsidian vaults through a local REST API, allowing operations like listing files, searching, reading, editing, and deleting notes. Designed to work with Claude Desktop and other MCP-enabled clients, it exposes a set of tools for efficient note and content management within Obsidian.

    • 2,394
    • MCP
    • MarkusPfundstein/mcp-obsidian
  • Kibela MCP Server

    Kibela MCP Server

    MCP server for seamless LLM integration with Kibela knowledge management.

    Kibela MCP Server enables integration of Large Language Models (LLMs) with the Kibela note-sharing platform via the Model Context Protocol. It provides search, retrieval, and management of Kibela notes, users, groups, and folders, exposing these capabilities in a standardized MCP interface. The implementation utilizes Kibela's GraphQL API and supports configuration through environment variables and Docker. Designed for interoperability with tools like Cursor, it streamlines access and manipulation of organizational knowledge by AI systems.

    • 7
    • MCP
    • kiwamizamurai/mcp-kibela-server
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results