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. - 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 t
Add this skill
npx mdskills install yuna0x0/hackmd-mcpComprehensive MCP server with clear tool descriptions and excellent deployment options
1# HackMD MCP Server23A Model Context Protocol (MCP) server that interfaces with the [HackMD API](https://hackmd.io/@hackmd-api/developer-portal), allowing LLM clients to access and interact with HackMD notes, teams, user profiles, and history data.45## Features67- Get user profile information8- Create, read, update, and delete notes9- Manage team notes and collaborate with team members10- Access reading history11- List and manage teams12- **Dual transport support**: Both HTTP and STDIO transports13- **Cloud deployment ready**: Support Smithery and other platforms1415## Requirements1617- Node.js 18+1819## Local Installation (STDIO Transport)20211. Add this server to your `mcp.json` / `claude_desktop_config.json`:2223```json24{25 "mcpServers": {26 "hackmd": {27 "command": "npx",28 "args": ["-y", "hackmd-mcp"],29 "env": {30 "HACKMD_API_TOKEN": "your_api_token"31 }32 }33 }34}35```3637You may also optionally set the `HACKMD_API_URL` environment variable if you need to use a different HackMD API endpoint.38392. Restart your MCP client (e.g., Claude Desktop)403. Use the tools to interact with HackMD4142## Server Deployment (HTTP Transport)4344### Self-Hosting45Follow the [Local Development](#local-development) instructions to set up the project locally, then run:46```bash47pnpm run start:http48```49This will start the server on port 8081 by default. You can change the port by setting the `PORT` environment variable.5051### Cloud Deployment5253You can deploy this MCP server to any cloud platform that supports Node.js server applications.5455You can also deploy via MCP platforms like [Smithery](https://smithery.ai/server/@yuna0x0/hackmd-mcp).5657## Configuration58### Environment Variables (STDIO Transport and HTTP Transport server where host provides the config)5960When using the STDIO transport or hosting the HTTP transport server, you can pass configuration via environment variables:61- `HACKMD_API_TOKEN`: HackMD API Token (Required for all operations)62- `HACKMD_API_URL`: (Optional) HackMD API URL (Defaults to https://api.hackmd.io/v1)6364Environment variables applied only for the HTTP transport server:65- `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.6667> [!CAUTION]68> 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.6970### HTTP Headers (HTTP Transport where user provides the config)7172When using the HTTP transport, user can pass configuration via HTTP headers:73- `Hackmd-Api-Token`: HackMD API Token (Required for all operations)74- `Hackmd-Api-Url`: (Optional) HackMD API URL (Defaults to https://api.hackmd.io/v1)7576If the user provides the token in the header, while the server also has `HACKMD_API_TOKEN` set, the header value will take precedence.7778### Get a HackMD API Token7980To get an API token, follow these steps:81821. Go to [HackMD settings](https://hackmd.io/settings#api).832. Click on "Create API Token".843. Copy the generated token and use it in your `.env` file or environment variables.8586## Available Tools8788### Profile Tools89- **get_user_info**: Get information about the authenticated user9091### Teams Tools92- **list_teams**: List all teams accessible to the user9394### History Tools95- **get_history**: Get user's reading history9697### Team Notes Tools98- **list_team_notes**: List all notes in a team99- **create_team_note**: Create a new note in a team100- **update_team_note**: Update an existing note in a team101- **delete_team_note**: Delete a note in a team102103### User Notes Tools104- **list_user_notes**: List all notes owned by the user105- **get_note**: Get a note by its ID106- **create_note**: Create a new note107- **update_note**: Update an existing note108- **delete_note**: Delete a note109110## Example Usage111112### Basic Note Management113114```115Can you help me manage my HackMD notes?116```117118### List Notes119120```121Please list all my notes.122```123124### Create a New Note125126````127Create a new note with the title "Meeting Notes" and content:128```129# Meeting Notes130131Discussion points:132- Item 1133- Item 2134```135````136137### Team Collaboration138139```140Show me all the teams I'm part of and list the notes in the first team.141```142143## Local Development144145This project uses [pnpm](https://pnpm.io) as its package manager.146147Clone the repository and install dependencies:148149```bash150git clone https://github.com/yuna0x0/hackmd-mcp.git151cd hackmd-mcp152pnpm install153```154155### Configuration1561571. Create a `.env` file by copying the example:158```bash159cp env.example .env160```1611622. Edit the `.env` file and add your HackMD API token:163```164HACKMD_API_TOKEN=your_api_token165```166167## Debugging with MCP Inspector168169You can use the MCP Inspector to test and debug the HackMD MCP server:170171```bash172npx @modelcontextprotocol/inspector -e HACKMD_API_TOKEN=your_api_token npx hackmd-mcp173174# Use this instead when Local Development175pnpm run inspector176```177178Then open your browser to the provided URL (usually http://localhost:6274) to access the MCP Inspector interface. From there, you can:1791801. Connect to your running HackMD MCP server1812. Browse available tools1823. Run tools with custom parameters1834. View the responses184185This is particularly useful for testing your setup before connecting it to MCP clients like Claude Desktop.186187## Docker188189Pull from GitHub Container Registry:190```bash191docker pull ghcr.io/yuna0x0/hackmd-mcp192```193194Docker build (Local Development):195```bash196docker build -t ghcr.io/yuna0x0/hackmd-mcp .197```198199Docker multi-platform build (Local Development):200```bash201docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/yuna0x0/hackmd-mcp .202```203204## MCP Bundles (MCPB)205206To create an MCP Bundle for this server, run:207```bash208pnpm run pack:mcpb209```210211## Security Notice212213This 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.214215## License216217This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.218
Full transparency — inspect the skill content before installing.