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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@keshengyang/mcp-oss-upload

v1.0.4

Published

MCP Server for uploading markdown files to Aliyun OSS

Readme

MCP OSS Upload Server

MCP服务器,提供上传Markdown文件和Word文档到阿里云OSS的功能。

功能

  • upload_markdown_file: 上传本地Markdown文件到OSS
  • upload_markdown_content: 上传Markdown内容字符串到OSS(无需先保存为文件)
  • upload_docx_file: 上传本地Word文档(.docx)到OSS

OSS配置

OSS配置从以下优先级获取(从高到低):

  1. 环境变量
  2. 配置文件(可选)
  3. 代码默认值

环境变量

OSS_ACCESS_KEY_ID=your-access-key-id
OSS_ACCESS_KEY_SECRET=your-access-key-secret
OSS_ENDPOINT=oss-cn-beijing.aliyuncs.com
OSS_BUCKET_NAME=your-bucket-name

当前配置

  • Endpoint: oss-cn-beijing.aliyuncs.com
  • Bucket: spider-flow-redis
  • Region: 北京

安装

cd mcp-oss-upload
npm install

测试

npm test

使用方式

1. 作为MCP服务使用

已在 .kilocode/mcp.json 中配置,启动Cursor后自动加载。

可用工具:

  • upload_markdown_file: 上传本地文件
  • upload_markdown_content: 上传内容字符串

2. 作为命令行工具使用

# 上传Markdown文件
python upload_md_to_oss.py /path/to/file.md

# 上传Word文档
python upload_md_to_oss.py /path/to/document.docx --docx

# 上传并指定OSS路径
python upload_md_to_oss.py /path/to/file.md --object-key markdown/custom/path.md

# 输出JSON格式
python upload_md_to_oss.py /path/to/file.md --json

3. 作为Python模块导入

from upload_md_to_oss import upload_markdown, upload_markdown_content

# 上传文件
result = upload_markdown('/path/to/file.md')
print(result['url'])  # 获取OSS URL

# 上传内容
content = "# Hello\n\nThis is markdown content."
result = upload_markdown_content(content, 'hello.md')
print(result['url'])

上传路径规则

  • Markdown文件: 如果未指定 object_key,自动生成路径:markdown/{timestamp}_{filename}.md
  • Word文档: 如果未指定 object_key,自动生成路径:word/{timestamp}_{filename}.docx
  • 如果指定了路径但不以对应前缀(markdown/word/upload/)开头,会自动添加相应前缀

返回结果

成功时返回:

{
  "success": true,
  "url": "https://bucket.endpoint/markdown/filename.md",
  "object_key": "markdown/filename.md",
  "bucket": "spider-flow-redis",
  "endpoint": "oss-cn-beijing.aliyuncs.com",
  "file_size": 1234,
  "message": "上传成功"
}

失败时返回:

{
  "success": false,
  "error": "错误信息"
}