OSS MCP 服务器 logo

OSS MCP 服务器

Community
1yhy

阿里云OSSMCP服务器,用于将文件上传到阿里云OSS,支持多配置和目录指定

Publisher1yhy
Repositoryoss-mcp
LanguageTypeScript
Forks
3
Stars
6
Available tools
2
Transport typestdio
Categories
Links
  • Connect tools to AI workflows

    OSS MCP 服务器 exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 2 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    6 stars and 3 forks from the linked repository.

OSS MCP 服务器 🚀

中文版 | English

oss-mcp

一个基于Model Context Protocol (MCP)的服务器,用于将文件上传到阿里云OSS。此服务器使大型语言模型能够直接将文件上传到阿里云对象存储服务。

💡 使用场景

OSS MCP服务器能够与其他MCP工具无缝集成,为您提供强大的工作流程:

  • 与Playwright MCP集成:可以先使用Playwright MCP抓取网页截图或下载网页资源,然后直接上传到阿里云OSS存储。
  • 与Figma MCP集成:下载图片资源到本地后直接上传OSS、或者Figma网络文件直接上传OSS。
  • 与Filesystem MCP集成:可以浏览和选择本地文件系统中的文件,然后一步上传到云存储。
  • 数据备份流程:将重要数据从本地或其他服务自动备份到OSS。
  • 媒体处理流程:结合其他处理工具,可以对图片、视频进行处理后直接上传并获取可访问的URL。
  • 多OSS账号管理:便捷地在多个OSS账号间切换上传目标。

✨ 功能特点

  • 📁 支持多个阿里云OSS配置
  • 🗂️ 可指定上传目录
  • 🔄 简单易用的接口

🔧 安装

您可以通过npm或从源码安装:

使用npm安装

bash
# 使用npm全局安装
npm install -g oss-mcp

# 或使用pnpm全局安装
pnpm add -g oss-mcp

使用示例

bash
# 直接启动 (stdio模式)
oss-mcp --oss-config='{\"default\":{\"region\":\"oss-cn-shenzhen\",\"accessKeyId\":\"YOUR_KEY\",\"accessKeySecret\":\"YOUR_SECRET\",\"bucket\":\"YOUR_BUCKET\",\"endpoint\":\"oss-cn-shenzhen.aliyuncs.com\"}}'


# 使用Inspector调试
oss-mcp --oss-config='{ "region": "oss-cn-shenzhen", "accessKeyId": "YOUR_KEY", "accessKeySecret": "YOUR_SECRET", "bucket": "BUCKET_NAME", "endpoint": "oss-cn-shenzhen.aliyuncs.com" }' --inspect

从源码安装

bash
# 克隆仓库
git clone https://github.com/1yhy/oss-mcp.git
cd oss-mcp

# 安装依赖
pnpm install

# 构建项目
pnpm build

⚙️ 配置

您可以通过以下方式配置阿里云OSS参数:

方式一:使用.env文件

在项目根目录创建.env文件,参考.env.example模板。您可以配置多个阿里云OSS服务:

ini
# 默认OSS配置
OSS_CONFIG_DEFAULT={"region":"oss-cn-hangzhou","accessKeyId":"your-access-key-id","accessKeySecret":"your-access-key-secret","bucket":"your-bucket-name","endpoint":"oss-cn-hangzhou.aliyuncs.com"}

# 其他OSS配置
OSS_CONFIG_TEST={"region":"oss-cn-beijing","accessKeyId":"your-access-key-id-2","accessKeySecret":"your-access-key-secret-2","bucket":"your-bucket-name-2","endpoint":"oss-cn-beijing.aliyuncs.com"}

方式二:直接设置环境变量

您也可以直接在系统中或启动命令中设置环境变量:

bash
# 设置环境变量并启动
pnpm dev --oss-config='{ "default": { "region": "oss-cn-shenzhen", "accessKeyId": "YOUR_KEY", "accessKeySecret": "YOUR_SECRET", "bucket": "BUCKET_NAME", "endpoint": "oss-cn-shenzhen.aliyuncs.com" }, "test": { "region": "oss-cn-beijing", "accessKeyId": "YOUR_KEY", "accessKeySecret": "YOUR_SECRET", "bucket": "BUCKET_NAME", "endpoint": "oss-cn-beijing.aliyuncs.com" } }'

🔍 参数说明

  • region: 阿里云OSS区域
  • accessKeyId: 阿里云访问密钥ID
  • accessKeySecret: 阿里云访问密钥Secret
  • bucket: OSS存储桶名称
  • endpoint: OSS终端节点

📋 使用方法

命令行选项

选项:
  -s, --stdio    使用stdio传输启动服务器
  -h, --http     使用HTTP传输启动服务器
  -p, --port     HTTP服务器端口 (默认: 3000)
  -i, --inspect  使用Inspector工具启动
  -?, --help     显示帮助信息

从源码启动

bash
# 开发模式
pnpm dev

# 启动服务 (stdio模式)
pnpm start

# 启动HTTP服务
pnpm start:http

# 使用Inspector调试
pnpm inspect

🛠️ 与Claude/Cursor配置集成

Cursor配置方法

  1. 在Cursor中打开设置(Settings)
  2. 转到MCP服务器(MCP Servers)部分
  3. 添加新服务器配置:
json
{
  "mcpServers": {
    "oss-mcp": {
      "command": "npx",
      "args": [
        "oss-mcp",
        "--oss-config='{\"default\":{\"region\":\"oss-cn-shenzhen\",\"accessKeyId\":\"YOUR_KEY\",\"accessKeySecret\":\"YOUR_SECRET\",\"bucket\":\"YOUR_BUCKET\",\"endpoint\":\"oss-cn-shenzhen.aliyuncs.com\"}}'",
        "--stdio"
      ]
    }
  }
}

配置多个OSS账号

使用环境变量方式可以轻松配置多个OSS账号:

json
{
  "mcpServers": {
    "oss-mcp": {
      "command": "npx",
      "args": [
        "oss-mcp",
        "--oss-config='{\"default\":{\"region\":\"oss-cn-shenzhen\",\"accessKeyId\":\"YOUR_KEY\",\"accessKeySecret\":\"YOUR_SECRET\",\"bucket\":\"YOUR_BUCKET\",\"endpoint\":\"oss-cn-shenzhen.aliyuncs.com\"}, \"test\":{\"region\":\"oss-cn-shenzhen\",\"accessKeyId\":\"YOUR_KEY\",\"accessKeySecret\":\"YOUR_SECRET\",\"bucket\":\"YOUR_BUCKET\",\"endpoint\":\"oss-cn-shenzhen.aliyuncs.com\"}}'",
        "--stdio"
      ]
    }
  }
}

🧰 可用工具

服务器提供以下工具:

1. 上传文件到OSS (upload_to_oss)

参数:

  • filePath: 本地文件路径(必需)
  • targetDir: 目标目录路径(可选)
  • fileName: 文件名(可选,默认使用原文件名)
  • configName: OSS配置名称(可选,默认使用'default')

2. 列出可用的OSS配置 (list_oss_configs)

无参数,返回所有可用的OSS配置名称。

📦 发布

bash
# 发布到npm
pnpm pub:release

# 本地打包测试
pnpm publish:local

📊 Star History

Star History Chart

📄 许可证

MIT

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "1yhy-oss-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "oss-mcp"
      ]
    }
  }
}

Available Tools

  • upload_to_oss

    将文件上传到阿里云OSS

  • list_oss_configs

    列出可用的阿里云OSS配置

Use OSS MCP 服务器 MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once OSS MCP 服务器 is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add OSS MCP 服务器 as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the OSS MCP 服务器 MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "1yhy-oss-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "oss-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the OSS MCP 服务器 MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the OSS MCP 服务器 MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use OSS MCP 服务器 to help me with this task?
OSS MCP 服务器
Sure. I read it.
Here is what I found using OSS MCP 服务器.

Frequently asked questions

What is the OSS MCP 服务器 MCP server used for?

OSS MCP 服务器 is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use OSS MCP 服务器 MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use OSS MCP 服务器 with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use OSS MCP 服务器 MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With OSS MCP 服务器 connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect OSS MCP 服务器 MCP to TypingMind?

OSS MCP 服务器 runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does OSS MCP 服务器 MCP provide in TypingMind?

OSS MCP 服务器 exposes 2 MCP tools that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use OSS MCP 服务器 MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If OSS MCP 服务器 requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇