- 新增飞书MCP服务,包含图片上传和消息卡片发送功能 - 新增文件工具MCP服务,提供文件转JSON和data URI功能 - 更新机器人MCP服务配置,移除环境变量硬编码 - 升级机器人版本至0.1.28并优化迎宾功能参数 - 添加.gitignore和项目配置文件
File Tools MCP 技能包
该技能包提供文件与 URL 的 Base64 处理能力,主要用于将文件内容转换为 JSON 字符串或 data URI,供 MCP Agent 直接调用。
功能
- 文件对象转 JSON 字符串
- 文件对象转 data URI(Base64)
- 文件路径转 data URI(Base64)
- 文件 URL 转 data URI(Base64)
工具列表
1. file_to_json
将文件对象转储为 JSON 字符串。
入参
{
"file": {
"name": "example.txt",
"type": "text/plain",
"size": 123,
"last_modified": 1700000000,
"content_base64": "SGVsbG8="
}
}
也可以使用 file_path:
{
"file_path": "e:\\lzwcai-mcp\\README.md"
}
2. file_to_data_uri
将文件对象转换为 data URI。
入参
{
"file": {
"name": "hello.txt",
"content_base64": "SGVsbG8="
},
"type": "text/plain"
}
3. file_path_to_data_uri
将本地文件路径转换为 data URI。
入参
{
"file_path": "e:\\lzwcai-mcp\\README.md",
"type": "text/plain"
}
4. url_to_data_uri
将文件 URL 转换为 data URI。
入参
{
"url": "https://example.com/image.png"
}
启动方式
uvx
{
"mcpServers": {
"file-tools-mcp": {
"command": "uvx",
"type": "stdio",
"args": [
"lzwcai-mcpskills-file-tools-mcp"
],
"env": {}
}
}
}
python
{
"mcpServers": {
"file-tools-mcp": {
"disabled": false,
"type": "stdio",
"timeout": 30,
"command": "python",
"args": [
"-m",
"file_tools.main"
]
}
}
}