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.
Before using the server, you'll need to configure these environment variables:
HACKMD_API_TOKEN
: Required - Your HackMD API tokenHACKMD_API_URL
: Optional - HackMD API Endpoint URL (Default: https://api.hackmd.io/v1
)You can get an API token from HackMD settings.
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>
npx @michaellatman/mcp-get@latest install hackmd-mcp
claude_desktop_config.json
:{
"mcpServers": {
"hackmd": {
"command": "npx",
"args": ["-y", "hackmd-mcp"],
"env": {
"HACKMD_API_TOKEN": "your_api_token"
}
}
}
}
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:
Simply describe what you want to do in natural language, such as:
Please list all my notes.
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.
You can also run the server using Docker:
docker pull yuna0x0/hackmd-mcp
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.
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.
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.
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"
}
}
}
}
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.
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.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.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