本项目是一个实现Markdown到HTML转换的模型上下文协议(Model Context Protocol)服务器,能够高效地将Markdown内容转换为HTML格式,为相关开发和应用提供便利。
本服务器可实现Markdown到HTML的转换,为后续开发和使用提供便利。以下是使用前的相关操作。
markdown_to_html - 将Markdown转换为HTML
mdContent作为必需参数安装项目所需的依赖:
npm install
构建服务端:
npm run build
开发过程中使用自动重建功能:
npm run watch
要在Claude Desktop上使用,需要添加服务器配置:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%/Claude/claude_desktop_config.json配置内容如下:
{
"mcpServers": {
"markdown-to-html": {
"command": "node",
"args": [
"/path/to/markdown-to-html/build/index.js"
]
}
}
}
由于MCP服务器通过标准输入输出进行通信,调试可能较为困难。我们推荐使用MCP Inspector,该工具可以通过包脚本运行:
npm run inspector
Inspector将提供一个访问调试工具的URL,在您的浏览器中打开即可进行调试。