HackMD

io.github.yuna0x0由 GitHub 账号 yuna0x0 发布v1.5.7更新于 Oct 24, 2026

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

概览

AI 生成的概览

让助手通过 HackMD API 读取和管理 HackMD 笔记、团队、个人资料与阅读历史。

可以做什么
该 MCP 服务器将 AI 助手连接到协作笔记平台 HackMD。它提供获取已认证用户资料、列出团队以及读取阅读历史的工具。它可以列出、创建、更新和删除个人笔记与团队笔记,因此助手可以代为起草、编辑或删除内容。
适用场景
适合在 HackMD 中保存笔记或团队文档,并希望助手在对话中直接查找、总结、起草或整理这些内容的场景。也适用于需要在共享工作区中创建或更新笔记的团队协作流程。
运行要求
通过 npx(需 Node.js 18+)或 Docker 以 stdio 方式在本地运行,也可自托管为 HTTP 服务器。需要 HackMD API 令牌,通过 HACKMD_API_TOKEN 环境变量或 Hackmd-Api-Token 请求头提供。可选 HACKMD_API_URL 用于覆盖默认 API 地址。
安装前请注意
HackMD API 令牌可访问账户的笔记和团队,请妥善保管,切勿提交到版本控制。该服务器可以创建、更新和删除笔记(包括团队笔记),存在破坏性操作的可能。若自托管 HTTP 传输并预配置令牌,任何能访问该端点的人都可能使用你的令牌,除非自行添加身份验证。

安装

在 SourceWeft 中

  1. 打开 控制台中的 HackMD,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

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.gitcd hackmd-mcppnpm 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 Developmentpnpm 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.

来源:README.md,提交 38f6a4b

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.5.7最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分