
Product
Reachability for Ruby Now in Beta
Reachability analysis for Ruby is now in beta, helping teams identify which vulnerabilities are truly exploitable in their applications.
@iflow-mcp/aigroup-aliyunoss-mcp
Advanced tools
阿里云OSS MCP服务器 - 为阿里云对象存储服务提供的MCP (Model Context Protocol) 服务器
🚀 为阿里云OSS (Object Storage Service) 提供的MCP (Model Context Protocol) 服务器,支持完整的云存储操作功能。
# 全局安装
npm install -g aigroup-aliyunoss-mcp
# 或者使用 npx 临时运行
npx aigroup-aliyunoss-mcp --help
创建 .env 文件或设置环境变量:
# 阿里云OSS配置
OSS_ACCESS_KEY_ID=your_access_key_id
OSS_ACCESS_KEY_SECRET=your_access_key_secret
OSS_BUCKET=your_bucket_name
OSS_REGION=oss-cn-beijing
# 可选配置
OSS_SECURE=true
OSS_TIMEOUT=300
FILE_EXPIRY_HOURS=1
编辑MCP设置文件 (如 Claude Desktop):
{
"mcpServers": {
"aigroup-aliyunoss-mcp": {
"command": "npx",
"args": ["aigroup-aliyunoss-mcp", "--stdio"],
"env": {
"OSS_ACCESS_KEY_ID": "your_access_key_id",
"OSS_ACCESS_KEY_SECRET": "your_access_key_secret",
"OSS_BUCKET": "your_bucket_name",
"OSS_REGION": "oss-cn-beijing"
}
}
}
}
# 健康检查
npx aigroup-aliyunoss-mcp --health
# 查看帮助
npx aigroup-aliyunoss-mcp --help
# 验证配置
npx aigroup-aliyunoss-mcp --validate-config
| 变量名 | 必需 | 默认值 | 说明 |
|---|---|---|---|
OSS_ACCESS_KEY_ID | ✅ | - | 阿里云访问密钥ID |
OSS_ACCESS_KEY_SECRET | ✅ | - | 阿里云访问密钥Secret |
OSS_BUCKET | ✅ | - | OSS存储桶名称 |
OSS_REGION | ✅ | - | OSS地域 (如: oss-cn-beijing) |
OSS_SECURE | ❌ | true | 是否使用HTTPS |
OSS_TIMEOUT | ❌ | 300 | 请求超时时间(秒) |
FILE_EXPIRY_HOURS | ❌ | 1 | 临时链接有效期(小时) |
MCP_LOG_LEVEL | ❌ | info | 日志级别 (debug/info/warn/error) |
MCP_MAX_FILE_SIZE | ❌ | 100 | 最大文件大小(MB) |
MULTIPART_THRESHOLD | ❌ | 10 | 分片上传阈值(MB) |
| 工具名称 | 功能描述 | 主要参数 |
|---|---|---|
uploadFile | 上传文件到OSS | fileName, file, contentType |
downloadFile | 从OSS下载文件 | fileName, localPath |
deleteObject | 删除OSS文件 | fileName |
deleteMultipleObjects | 批量删除文件 | fileNames[] |
listObjects | 列出OSS文件 | prefix, maxKeys, marker |
getObjectUrl | 生成临时访问链接 | fileName, expires |
copyObject | 复制OSS文件 | source, target |
getObjectMeta | 获取文件元数据 | fileName |
putObjectACL | 设置文件权限 | fileName, acl |
getObjectACL | 获取文件权限 | fileName |
multipartUpload | 分片上传大文件 | fileName, filePath, partSize |
initMultipartUpload | 初始化分片上传 | fileName |
uploadPart | 上传文件分片 | fileName, uploadId, partNo, data |
completeMultipartUpload | 完成分片上传 | fileName, uploadId, parts |
abortMultipartUpload | 取消分片上传 | fileName, uploadId |
listUploads | 列出进行中的分片上传 | prefix, maxUploads |
// 上传文件
{
"tool": "uploadFile",
"arguments": {
"fileName": "documents/report.pdf",
"file": "/local/path/to/report.pdf",
"contentType": "application/pdf"
}
}
// 生成临时下载链接
{
"tool": "getObjectUrl",
"arguments": {
"fileName": "documents/report.pdf",
"expires": 3600
}
}
// 列出文件
{
"tool": "listObjects",
"arguments": {
"prefix": "documents/",
"maxKeys": 50
}
}
// 批量删除文件
{
"tool": "deleteMultipleObjects",
"arguments": {
"fileNames": [
"temp/file1.txt",
"temp/file2.txt",
"temp/file3.txt"
]
}
}
// 自动分片上传
{
"tool": "multipartUpload",
"arguments": {
"fileName": "videos/large-video.mp4",
"filePath": "/local/path/to/large-video.mp4",
"partSize": 5242880
}
}
# 完整健康检查
npx aigroup-aliyunoss-mcp --health
# JSON格式输出
npx aigroup-aliyunoss-mcp --health --json
健康检查包括:
服务支持结构化JSON日志,输出到stderr:
{
"timestamp": "2025-08-18T12:00:00.000Z",
"level": "info",
"component": "UploadTool",
"message": "文件上传成功",
"fileName": "test.jpg",
"size": 102400,
"duration": 1250,
"traceId": "abc123def456"
}
# 克隆项目
git clone https://github.com/your-org/aigroup-aliyunoss-mcp.git
cd aigroup-aliyunoss-mcp
# 安装依赖
npm install
# 配置环境
cp .env.example .env
# 编辑 .env 文件
# 开发模式运行
npm run dev
创建自定义插件扩展功能:
// plugins/my-plugin/index.ts
import { Plugin, PluginContext } from 'aigroup-aliyunoss-mcp';
export default class MyPlugin implements Plugin {
metadata = {
name: 'my-plugin',
version: '1.0.0',
description: '自定义插件',
author: 'Your Name'
};
async onLoad(context: PluginContext) {
context.logger.info('插件加载成功');
}
getTools() {
return [{
name: 'myCustomTool',
description: '自定义工具',
inputSchema: { /* zod schema */ },
handler: async (args, context) => {
// 工具逻辑
return { success: true };
}
}];
}
}
// 自定义中间件
const customMiddleware: MiddlewareDefinition = {
name: 'custom-middleware',
priority: 500,
handler: async (context, next) => {
// 前置处理
console.log(`调用工具: ${context.toolName}`);
await next();
// 后置处理
console.log(`工具执行完成`);
}
};
错误: OSS_CONNECTION_ERROR
解决方案:
错误: OSS_PERMISSION_ERROR
解决方案:
错误: FILE_UPLOAD_FAILED
解决方案:
错误: CONFIG_INVALID
解决方案:
npx aigroup-aliyunoss-mcp --validate-config# 启用调试日志
MCP_LOG_LEVEL=debug npx aigroup-aliyunoss-mcp --stdio
# 查看详细错误信息
npx aigroup-aliyunoss-mcp --health --verbose
欢迎贡献代码!请阅读 贡献指南 了解详情。
git checkout -b feature/amazing-feature)git commit -m 'feat: 添加新功能')git push origin feature/amazing-feature)本项目使用 MIT 许可证。
Made with ❤️ by the aigroup-aliyunoss-mcp team
FAQs
阿里云OSS MCP服务器 - 为阿里云对象存储服务提供的MCP (Model Context Protocol) 服务器
We found that @iflow-mcp/aigroup-aliyunoss-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Reachability analysis for Ruby is now in beta, helping teams identify which vulnerabilities are truly exploitable in their applications.

Research
/Security News
Malicious npm packages use Adspect cloaking and fake CAPTCHAs to fingerprint visitors and redirect victims to crypto-themed scam sites.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.