Alioss Mcp Server — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Alioss Mcp Server (Agent Skill) and scored it 45/100 (orange). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 1 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 1 flagged
A base64 string of 128+ characters appears in a documentation file. Encoded prompt injection hides the hostile instruction in base64 — invisible to keyword filters — and relies on the agent's ability to decode it at runtime. There is no normal authoring reason to embed a multi-hundred-byte base64 blob in skill docs.
*.sig, SIGNATURES) outside the documentation.Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
一个基于Model Context Protocol (MCP)的服务器,支持两种模式将图片URL转存到阿里云OSS并返回CDN访问地址。
架构特点: 支持OSS直传和HOOK代理两种模式,使用STS临时凭证确保安全,提供完整的图片上传和管理功能。
将指定URL的图片转存到阿里云OSS,并返回新的CDN访问地址。
参数:
imageURL (string): 要转存的图片URL地址返回结果:
{
"structuredContent": {
"success": true,
"data": {
"cdnUrl": "https://cdn.example.com/images/photo_123.jpg",
"fileName": "images/photo_123.jpg",
"originalUrl": "https://source.example.com/photo.jpg"
},
"message": "Image successfully transferred to OSS"
},
"content": [{
"type": "text",
"text": "{\"success\":true,\"data\":{\"cdnUrl\":\"https://cdn.example.com/images/photo_123.jpg\",\"fileName\":\"images/photo_123.jpg\",\"originalUrl\":\"https://source.example.com/photo.jpg\"},\"message\":\"Image successfully transferred to OSS\"}"
}]
}错误返回格式:
{
"isError": true,
"structuredContent": {
"success": false,
"data": null,
"error": "Invalid URL format",
"message": "Failed to transfer image to OSS"
},
"content": [{
"type": "text",
"text": "Error: Invalid URL format"
}]
}功能特性:
项目支持两种上传模式:OSS模式(直接上传到阿里云OSS)和 HOOK模式(通过API接口上传)。
# MCP服务端口
PORT=3004
# 上传模式 (OSS 或 HOOK)
UPLOAD_MODE=OSS当 UPLOAD_MODE=OSS 时,需要配置以下环境变量:
# STS临时凭证配置
STS_ACCESS_KEY_ID=your_sts_access_key_id
STS_ACCESS_KEY_SECRET=your_sts_access_key_secret
STS_ROLE_ARN=acs:ram::your_account_id:role/your_role_name
STS_ENDPOINT=sts.cn-hangzhou.aliyuncs.com
# OSS存储配置
OSS_ENDPOINT=oss-cn-hangzhou.aliyuncs.com
OSS_BUCKET=your_bucket_name
# CDN配置
CDN_ENDPOINT=https://your-cdn-domain.comOSS模式说明:
当 UPLOAD_MODE=HOOK 时,需要配置以下环境变量:
# HOOK上传接口URL
UPLOAD_HOOK_URL=http://your-api-server:3001/api/resources/transfer-image-to-ossHOOK模式说明:
本MCP服务器支持两种通信模式:
OSS模式配置:
{
"mcpServers": {
"alioss-mcp-server": {
"command": "npx",
"args": ["-y","alioss-mcp-server@latest"],
"env": {
"UPLOAD_MODE": "OSS",
"STS_ACCESS_KEY_ID": "your_sts_access_key_id",
"STS_ACCESS_KEY_SECRET": "your_sts_access_key_secret",
"STS_ROLE_ARN": "acs:ram::your_account_id:role/your_role_name",
"OSS_ENDPOINT": "oss-cn-hangzhou.aliyuncs.com",
"OSS_BUCKET": "your_bucket_name",
"CDN_ENDPOINT": "https://your-cdn-domain.com"
}
}
}
}HOOK模式配置:
{
"mcpServers": {
"alioss-mcp-server": {
"command": "npx",
"args": ["-y","alioss-mcp-server@latest"],
"env": {
"UPLOAD_MODE": "HOOK",
"UPLOAD_HOOK_URL": "http://your-api-server:3001/api/resources/transfer-image-to-oss"
}
}
}
}🔧 自动模式检测:
PORT环境变量或使用--http参数时,自动切换到HTTP模式(适合Docker部署)MCP_TRANSPORT=http环境变量强制指定HTTP模式复制配置模板:
cp env.example .env编辑 .env 文件,根据选择的模式填写配置:
# OSS模式配置示例
UPLOAD_MODE=OSS
STS_ACCESS_KEY_ID=your_sts_access_key_id
STS_ACCESS_KEY_SECRET=your_sts_access_key_secret
STS_ROLE_ARN=acs:ram::your_account_id:role/your_role_name
OSS_ENDPOINT=oss-cn-hangzhou.aliyuncs.com
OSS_BUCKET=your_bucket_name
CDN_ENDPOINT=https://your-cdn-domain.com
# 或者 HOOK模式配置示例
# UPLOAD_MODE=HOOK
# UPLOAD_HOOK_URL=http://your-api-server:3001/api/resources/transfer-image-to-oss# 启动服务
docker-compose up -d
# 查看日志
docker-compose logs -f alioss-mcp-server
# 停止服务
docker-compose downOSS模式:
docker build -t alioss-mcp-server .
docker run -d \
--name alioss-mcp-server \
-p 3004:3004 \
-e UPLOAD_MODE=OSS \
-e STS_ACCESS_KEY_ID=your_sts_access_key_id \
-e STS_ACCESS_KEY_SECRET=your_sts_access_key_secret \
-e STS_ROLE_ARN=your_role_arn \
-e OSS_ENDPOINT=oss-cn-hangzhou.aliyuncs.com \
-e OSS_BUCKET=your_bucket_name \
-e CDN_ENDPOINT=https://your-cdn-domain.com \
alioss-mcp-serverHOOK模式:
docker run -d \
--name alioss-mcp-server \
-p 3004:3004 \
-e UPLOAD_MODE=HOOK \
-e UPLOAD_HOOK_URL=http://your-api-server:3001/api/resources/transfer-image-to-oss \
alioss-mcp-server#### 服务端点
Docker容器启动后,MCP服务将在以下端点可用:
http://localhost:3004/messageshttp://localhost:3004/health#### 验证服务状态
# 检查容器状态
docker ps | grep alioss-mcp-server
# 查看服务日志
docker logs alioss-mcp-server
# 健康检查
curl http://localhost:3004/health#### MCP客户端连接Docker服务
{
"mcpServers": {
"alioss-mcp-server": {
"command": "curl",
"args": [
"-X", "POST",
"http://localhost:3004/messages",
"-H", "Content-Type: application/json",
"--data-raw"
]
}
}
}# 安装依赖
pnpm install
# 开发模式启动
pnpm dev
# 构建
pnpm build
# 生产模式启动
pnpm startDocker服务启动后,可以在N8N中使用:
#### 前置要求
n8n-nodes-mcp 社区节点N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true#### 配置MCP Client节点
HTTP Streamablehttp://localhost:3004/messages(本地Docker)或 http://your-server-ip:3004/messages(远程Docker)None#### 使用transfer_image_to_oss工具
在N8N工作流中添加MCP Client节点,执行工具时传入:
{
"imageURL": "https://example.com/image.jpg"
}本MCP服务器支持两种架构模式:
Claude/Cursor → MCP Server → 阿里云OSS
(端口3004) (直接SDK调用)
↓
STS临时凭证服务Claude/Cursor → MCP Server → API Server → 阿里云OSS
(端口3004) (HOOK URL)OSS模式:
HOOK模式:
通用优势:
配置完成后,您可以在对话中直接使用:
请帮我将这个图片转存到OSS:https://example.com/image.jpgClaude 会自动调用 MCP 服务将图片上传到阿里云OSS并返回CDN地址。
在代码编辑器中,您可以通过AI助手上传图片:
@alioss-mcp-server 请将这个截图上传到OSS: https://screenshot.example.com/img.png访问健康检查端点查看服务状态:
curl http://localhost:3004/health返回示例:
{
"status": "ok",
"service": "alioss-mcp-server",
"initialized": true,
"tools": 1,
"uploadMode": "OSS",
"configured": true
}状态说明:
status: 服务状态 (ok 或 warning)service: 服务名称initialized: MCP服务器是否已初始化tools: 可用工具数量uploadMode: 当前上传模式configured: 配置是否完整missingConfig: 缺失的配置项(如果有)如果您有任何问题:
env.example 配置模板如发现安全问题,请通过 GitHub Issues 报告,并在标题中标注 [SECURITY]。
本项目基于 MIT 许可证 开源。
欢迎贡献代码、报告问题或提出建议!请查看 CONTRIBUTING.md 了解详细信息。
感谢您的关注和支持!
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.