A Model Context Protocol server for integrating HackMD's note-taking platform with AI assistants.
This is a Model Context Protocol (MCP) server for interacting with the HackMD API. It allows AI assistants to perform operations such as:
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
Create a .env
file by copying the example:
cp .env.example .env
Edit the .env
file and add your HackMD API token:
HACKMD_API_TOKEN=your_api_token
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.
bun start # or use npm, yarn, pnpm
HACKMD_API_TOKEN=your_api_token bunx hackmd-mcp
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:
This is particularly useful for testing your setup before connecting it to Claude or another AI assistant.
claude_desktop_config.json
:{
"mcpServers": {
"hackmd": {
"command": "npx",
"args": ["-y", "hackmd-mcp"],
"env": {
"HACKMD_API_TOKEN": "your_api_token"
}
}
}
}
Can you help me manage my HackMD notes?
Then use commands like:
Please list all my notes.
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.
This project is licensed under the MIT License - see the LICENSE file for details.