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— defaultagents/docs. Must start withagents/. No...- Return value:
{ status, file_size, key, url }(file_sizeis decoded bytes).
Decoded size cap is 100MB. Large files: pass local_file_path. Do not send huge base64 over stdio.
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)
- GitHub — push to
https://github.com/kinginsun/mcp-aliyun-oss(public). - PyPI — bump
versioninpyproject.tomlandserver.json, then either:- GitHub Release with tag
v0.1.0(workflow.github/workflows/publish-pypi.ymluses secretPYPI_API_TOKEN), or - Local:
uv build && uv publishwith a PyPI API token.
- GitHub Release with tag
- 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 rootserver.json).
Registry server name: io.github.kinginsun/mcp-aliyun-oss.
License
MIT
Release files for mcp-aliyun-oss 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mcp_aliyun_oss-0.1.0.tar.gz | 92.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcp_aliyun_oss-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 99.9 kB
Release files / mcp_aliyun_oss-0.1.0.tar.gz
| Download URL | mcp_aliyun_oss-0.1.0.tar.gz |
|---|---|
| Size | 92.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7fb27de7be96ff84dea44f3aff33b4cd505e791a5c526d85b089414f419cd45d
|
|
BLAKE2b-256 checksum How to use checksums |
4019b677bbc985661e013f4c0f75fdeef39d39f80ab7d3d4cf42d4805c6acae1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / mcp_aliyun_oss-0.1.0-py3-none-any.whl
| Download URL | mcp_aliyun_oss-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a3d0e15a42f832dd3bdade90d3145c3a113c0350aa63ed0a86443bef630d6290
|
|
BLAKE2b-256 checksum How to use checksums |
d7dd88399972fcd2f8acd84f07b19a44c01906859ac041904582b6e3f2374bed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|