npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

tal-oss-mcp

v1.0.7

Published

## 简介

Readme

@xes/tal-oss-mcp

简介

@xes/tal-oss-mcp 是一个基于 MCP(Model Context Protocol)的文件上传工具,可以帮助你在其他项目中实现 OSS(对象存储服务)的文件上传功能。它基于 @xes/tal-oss 封装,并实现了 MCP 服务器功能。

安装

在你的项目中安装 @xes/tal-oss-mcp

npm install @xes/tal-oss-mcp --save

在 Cursor 中配置 MCP Server

要在 Cursor 中使用 @xes/tal-oss-mcp,你需要创建一个配置文件。在你的项目根目录下创建 cursor-mcp-config.json 文件,内容如下:

{
  "mcpServers": {
    "talOssServer": {
      "command": "npx",
      "args": ["tal-oss-mcp"],
      "description": "TAL OSS file upload MCP server",
      "parameters": {
        "uploadTo": "your/upload/path",
        "bucket": "your-bucket-name",
        "limit": 100,
        "accessKeyId": "your-access-key-id",
        "accessKeySecret": "your-access-key-secret"
      }
    }
  }
}

参数说明

  • uploadTo: 文件上传的目标路径,必填。
  • bucket: OSS 的 bucket 名称,必填。
  • limit: 上传限制,默认为 100。
  • accessKeyId: OSS 的访问密钥 ID,必填。
  • accessKeySecret: OSS 的访问密钥 Secret,必填。

使用方法

通过 Cursor 使用

  1. 在你的项目中安装好 @xes/tal-oss-mcp
  2. 创建好 cursor-mcp-config.json 配置文件。
  3. 在 Cursor 中打开你的项目,它会自动识别并启动 MCP Server。
  4. 使用 Cursor 提供的 MCP 客户端工具发送文件上传请求。

通过命令行直接使用

你也可以在命令行中直接使用 @xes/tal-oss-mcp

npx @xes/tal-oss-mcp

通过 API 使用

你也可以在你的代码中直接使用 @xes/tal-oss-mcp 提供的 API:

const TalOssMcp = require("@xes/tal-oss-mcp");

// 初始化 MCP 服务器
const server = new TalOssMcp({
  port: 3000, // 可选,默认为 3000
});

// 启动服务器
server.start();

// 停止服务器
server.stop();

发送上传请求

通过 HTTP 请求发送文件上传请求:

curl -X POST http://localhost:3000/upload -H "Content-Type: application/json" -d '{
  "filePath": "path/to/your/file",
  "uploadTo": "your/upload/path",
  "bucket": "your-bucket-name",
  "limit": 100,
  "accessKeyId": "your-access-key-id",
  "accessKeySecret": "your-access-key-secret"
}'

示例

基本使用

// 安装依赖
// npm install @xes/tal-oss-mcp --save

// 创建配置文件 cursor-mcp-config.json

// 启动 MCP 服务器
// npx @xes/tal-oss-mcp

// 发送上传请求
// curl -X POST http://localhost:3000/upload -H "Content-Type: application/json" -d '...'

常见问题

  • 问题:上传失败,出现 "文件上传失败" 的错误信息。 解决方案:检查你的 accessKeyIdaccessKeySecret 是否正确。

  • 问题:测试环境上传失败。 解决方案:检查是否绑定测试环境 hosts: 120.52.32.211 upload.xueersi.com

许可证

MIT