The HackMD MCP Server allows AI assistants to manage HackMD notes and teams via the HackMD API. Key capabilities include:
User management: Retrieve authenticated user information
Personal notes: List, create, read, update, and delete your notes
History: Access your reading history
Team features: List accessible teams and manage team notes (list, create, update, delete)
Provides access to the HackMD API, enabling note management capabilities including creating, reading, updating, and deleting notes, viewing read history, and working with team notes on the HackMD collaborative markdown platform.
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
Related MCP server: Appwrite MCP Server
Requirements
Node.js 18+
Local Installation (STDIO Transport)
Add this server to your
mcp.json/claude_desktop_config.json:
You may also optionally set the HACKMD_API_URL environment variable if you need to use a different HackMD API endpoint.
Restart your MCP client (e.g., Claude Desktop)
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:
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.
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:
Go to HackMD settings.
Click on "Create API Token".
Copy the generated token and use it in your
.envfile 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
List Notes
Create a New Note
Team Collaboration
Local Development
This project uses pnpm as its package manager.
Clone the repository and install dependencies:
Configuration
Create a
.envfile by copying the example:
Edit the
.envfile and add your HackMD API token:
Debugging with MCP Inspector
You can use the MCP Inspector to test and debug the HackMD MCP server:
Then open your browser to the provided URL (usually http://localhost:6274) to access the MCP Inspector interface. From there, you can:
Connect to your running HackMD MCP server
Browse available tools
Run tools with custom parameters
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:
Docker build (Local Development):
Docker multi-platform build (Local Development):
MCP Bundles (MCPB)
To create an MCP Bundle for this server, run:
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.