Skip to main content
Glama
io.github.kinginsun/mcp-aliyun-oss

io.github.kinginsun/mcp-aliyun-oss

by kinginsun

mcp-aliyun-oss

Standalone MCP server (Python SDK 2.x MCPServer) with one tool, oss-upload: put an object on Aliyun OSS named {prefix}/{md5}{ext}.

Repository: github.com/kinginsun/mcp-aliyun-oss

Credentials are read from the environment only. Never put AccessKeys in this repo or in chat.

Tool: oss-upload

Provide exactly one source:

Argument

Use when

Bytes

Extension

local_file_path

File already on disk

Read the absolute path

Path suffix; optional filename overrides

content

Generated text (HTML / Markdown / JSON)

UTF-8

Required filename (e.g. report.html)

content_base64

Binary

base64 decode; strips a data:*;base64, prefix

Same as content

Other arguments:

  • oss_path_prefix — default agents/docs. Must start with agents/. No ...

  • Return value: { status, file_size, key, url } (file_size is decoded bytes).

Decoded size cap is 100MB. Large files: pass local_file_path. Do not send huge base64 over stdio.

Related MCP server: Tencent Cloud COS MCP Server

Environment

Required (or the OSS_TEST_* aliases):

Variable

Meaning

OSS_ACCESS_KEY_ID

AccessKey ID

OSS_ACCESS_KEY_SECRET

AccessKey Secret

OSS_BUCKET

Bucket name

OSS_ENDPOINT

Regional endpoint without https://, e.g. oss-cn-shenzhen.aliyuncs.com

Optional: OSS_PUBLIC_URL_BASE (CDN / custom domain), OSS_CONNECT_TIMEOUT (seconds, default 120).

If OSS_PUBLIC_URL_BASE is set, url is {base}/{key}; otherwise https://{bucket}.{endpoint}/{key}.

Copy .env.example to a local .env for development; do not commit .env.

Install

From PyPI (after release):

uv tool install mcp-aliyun-oss
# or: pip install mcp-aliyun-oss

From source:

git clone https://github.com/kinginsun/mcp-aliyun-oss.git
cd mcp-aliyun-oss
uv sync --extra dev

Cursor (~/.cursor/mcp.json)

PyPI / uvx (recommended for end users):

{
  "mcpServers": {
    "aliyun-oss": {
      "command": "uvx",
      "args": ["mcp-aliyun-oss"],
      "env": {
        "OSS_ACCESS_KEY_ID": "your-id",
        "OSS_ACCESS_KEY_SECRET": "your-secret",
        "OSS_BUCKET": "your-bucket",
        "OSS_ENDPOINT": "oss-cn-hangzhou.aliyuncs.com"
      }
    }
  }
}

Local checkout (development):

{
  "mcpServers": {
    "aliyun-oss": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/mcp-aliyun-oss", "mcp-aliyun-oss"],
      "env": {
        "OSS_ACCESS_KEY_ID": "your-id",
        "OSS_ACCESS_KEY_SECRET": "your-secret",
        "OSS_BUCKET": "your-bucket",
        "OSS_ENDPOINT": "oss-cn-hangzhou.aliyuncs.com"
      }
    }
  }
}

Tests

uv run pytest

OSS put_object is mocked; no live bucket is required.

Publish (maintainers)

  1. GitHub — push to https://github.com/kinginsun/mcp-aliyun-oss (public).

  2. PyPI — bump version in pyproject.toml and server.json, then either:

    • GitHub Release with tag v0.1.0 (workflow .github/workflows/publish-pypi.yml uses secret PYPI_API_TOKEN), or

    • Local: uv build && uv publish with a PyPI API token.

  3. MCP Registry — after the same version is on PyPI, install mcp-publisher, log in with GitHub, and from this repo run mcp-publisher publish (uses root server.json).

Registry server name: io.github.kinginsun/mcp-aliyun-oss.

License

MIT

Available Tools

1 tool
oss-uploadA

Upload a file to Aliyun OSS. Object name is MD5(content) + extension under an agents/ prefix.

Provide exactly one source:

  • local_file_path: absolute path on the machine running this MCP server

  • content: UTF-8 text (generated HTML/Markdown/JSON); requires filename

  • content_base64: binary (optional data:*;base64, prefix); requires filename

filename is required for content / content_base64 and may override the suffix when using a path. Example: report.html. Prefix default agents/docs; must start with agents/. Decoded size cap 100MB — large files use local_file_path. Credentials: OSS_ACCESS_KEY_ID, OSS_ACCESS_KEY_SECRET, OSS_BUCKET, OSS_ENDPOINT (or OSS_TEST_*). Returns {status, file_size, key, url}.

Inputs: content, filename, content_base64, local_file_path, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 1 tool

    Disambiguation5/5

    Only one tool exists, so there is no risk of an agent confusing it with another tool. The single oss-upload tool has a clear, singular purpose.

    Naming Consistency4/5

    The tool name oss-upload follows a clear verb_noun style and is internally consistent. However, with only one tool there is no broader set of names to compare against for a full consistency assessment.

    Tool Count2/5

    A single upload tool is far too narrow for a server named mcp-aliyun-oss, which implies broader object storage capabilities. Even if the intent is upload-only, one tool feels under-scoped for the apparent domain.

    Completeness2/5

    The server only supports uploading files and lacks common OSS operations such as listing, retrieving, deleting, or generating presigned URLs. This is a significant functional gap that would force agents to rely on external tooling for basic object lifecycle management.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol server that enables large language models to upload files directly to Alibaba Cloud Object Storage Service (OSS), supporting multiple OSS configurations and specified upload directories.
      15 npm
      7
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      Enables interaction with Tencent Cloud Object Storage (COS) through MCP protocol. Supports file upload, download, deletion, listing objects, and generating temporary signed URLs for cloud storage management.
      5
      35 npm
      MIT