使用 hackmd-mcp
用于与HackMD API交互的模型上下文协议(MCP)服务器。
特性
- 获取工作区笔记(个人或团队)
- 获取单音符详细信息
- 创建/更新笔记
- 删除笔记
先决条件
- HackMD API密钥(从HackMD设置获取)
安装
使用npx(推荐)
无需安装!直接运行:
npx -y @stanley2058/hackmd-mcp为了发展
npm install
# or
bun install配置
环境变量
必修的:
HACKMD_API_KEY:您的HackMD API密钥(从HackMD设置获取)
可选:
PORT:HTTP服务器端口(默认值:3000,仅在HTTP模式下使用)
用法
此MCP服务器支持两种模式: stdio 和 http.
stdio模式(默认)
在stdio模式下运行服务器以直接集成MCP客户端:
使用npx:
HACKMD_API_KEY=your_api_key npx -y @stanley2058/hackmd-mcp或来源:
HACKMD_API_KEY=your_api_key node dist/index.js
# or
HACKMD_API_KEY=your_api_key bun run index.tsHTTP模式
在HTTP模式下运行服务器以暴露HTTP端点:
使用npx:
HACKMD_API_KEY=your_api_key npx -y @stanley2058/hackmd-mcp --http或来源:
HACKMD_API_KEY=your_api_key node dist/index.js --http
# or
HACKMD_API_KEY=your_api_key bun run index.ts --http服务器将于启动 http://localhost:3000/mcp 默认情况下。使用更改端口 PORT 环境变量:
HACKMD_API_KEY=your_api_key PORT=8080 npx -y @stanley2058/hackmd-mcp --http建筑
bun run build许可证
麻省理工学院
