markdown-to-excel-mcp
v2.1.1
Published
Markdown to Excel MCP Server - Convert Markdown tables to Excel files with auto-upload
Maintainers
Readme
Markdown to Excel - MCP Server
Markdown 表格转 Excel 文件的 MCP 工具,自动上传并返回下载链接。
安装配置
Windsurf
编辑 ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"markdown-to-excel": {
"command": "npx",
"args": ["-y", "markdown-to-excel-mcp"]
}
}
}Claude Desktop
编辑 ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"markdown-to-excel": {
"command": "npx",
"args": ["-y", "markdown-to-excel-mcp"]
}
}
}配置完成后,重启 Windsurf 或 Claude Desktop。
使用方法
在 AI 对话中说:
把这个 Markdown 表格转换成 Excel:
| 姓名 | 年龄 | 城市 |
|------|------|------|
| 张三 | 25 | 北京 |
| 李四 | 30 | 上海 |会自动生成 Excel 文件并返回下载链接:
✅ 成功将 1 个表格转换为 Excel 文件
�� 下载链接: https://d.tmpfile.link/public/2024-11-27/xxx/output.xlsx
⏰ 文件将在 7 天后自动删除
📊 文件大小: 8.5 KB特性
- 🌐 自动上传到 tmpfile.link
- 📥 返回可下载链接
- 🚀 全球 CDN 加速
- ✅ 支持多次下载
- ⏰ 7 天后自动删除
- 💾 最大支持 100MB
- 🔧 支持自定义上传服务器
自定义上传服务器
如果你想使用自己的服务器,需要实现一个符合以下规范的 API:
API 规范
请求:
- Method:
POST - Content-Type:
multipart/form-data - Body: 包含一个名为
file的文件字段
响应:
- Content-Type:
application/json - Body:
{ "downloadLink": "https://your-domain.com/files/xxx.xlsx", "size": 12345 }
示例实现(Node.js + Express)
import express from 'express';
import multer from 'multer';
import path from 'path';
const app = express();
// 配置 multer 保留文件扩展名
const storage = multer.diskStorage({
destination: 'uploads/',
filename: (req, file, cb) => {
const uniqueSuffix = Date.now() + '-' + Math.round(Math.random() * 1E9);
const ext = path.extname(file.originalname);
const basename = path.basename(file.originalname, ext);
cb(null, `${basename}-${uniqueSuffix}${ext}`);
}
});
const upload = multer({ storage });
app.post('/api/upload', upload.single('file'), (req, res) => {
const fileUrl = `https://your-domain.com/files/${req.file.filename}`;
res.json({
downloadLink: fileUrl,
size: req.file.size
});
});
app.use('/files', express.static('uploads'));
app.listen(3000);使用自定义服务器
在 AI 对话中指定你的服务器地址:
把这个表格转成 Excel,上传到 https://your-domain.com/api/uploadLicense
MIT
