Skip to main content

COS (Cloud Object Storage & Cloud Infinite) MCP Integration

An MCP server that exposes COS/CI API capabilities, supporting operations such as uploading/downloading objects, listing objects, document-to-PDF conversion, image text watermarking, image QR code recognition, image quality scoring, image super-resolution, image matting, intelligent image cropping, intelligent search MetaInsight (text-to-image, image-to-image), and video intelligent cover generation.

Deploy MCP Server


Environment Variables

  • Set SECRET_ID and SECRET_KEY to your credentials from the API Key Management page
  • Set BUCKET to your bucket name
  • Set REGION to the region where your bucket is located
  • Set DATASET_NAME to the dataset name for intelligent search (optional)

🗺️ Feature List

Tool IdentifierFunction DescriptionCore Parameters
putObjectUpload a local file to the bucket (server-local files only)filePath, fileName, targetDir
putObjectSourceUrlDownload a file via URL and upload it to the bucketsourceUrl, fileName, targetDir
getObjectDownload a file from the bucketobjectKey
getBucketList files in the specified bucketPrefix
imageInfoGet image informationobjectKey
assessQualityImage quality assessmentobjectKey
aiSuperResolutionImage super-resolution processingobjectKey
aiPicMattingImage matting processingobjectKey, width, height
aiQrcodeQR code recognitionobjectKey
waterMarkFontGenerate an image with text watermarkobjectKey, text
createMediaSmartCoverJobCreate a media intelligent cover taskobjectKey
describeMediaJobQuery media intelligent cover task resultjobId
imageSearchPicSearch for similar images by imageuri
imageSearchTextSearch for similar images by texttext
createDocToPdfJobCreate a document-to-PDF processing taskobjectKey
describeDocProcessJobQuery document transcoding task resultjobId

🔌 Usage


CloudBase MCP Console

Parameter Reference

putObject

Upload a file to the bucket.

Input ParameterTypeDescription
filePathstringFile path (including filename)
fileNameoptional stringFilename (as stored in the bucket)
targetDiroptional stringTarget directory (directory inside the bucket)

Returns: Object URL

putObjectSourceUrl

Download a file via URL and upload it to the bucket.

Input ParameterTypeDescription
sourceUrlstringDownloadable file URL
fileNameoptional stringFilename (as stored in the bucket)
targetDiroptional stringTarget directory (directory inside the bucket)

Returns: Object URL

getObject

Download a file from the bucket.

Input ParameterTypeDescription
objectKeystringFile path

Returns: File content

getBucket

Get information about a specified bucket.

Input ParameterTypeDescription
Prefixoptional stringPath prefix for the file list; defaults to the root path

Returns: List of files in the bucket

imageInfo

Image processing — get image information.

Input ParameterTypeDescription
objectKeystringPath of the image in the bucket

Returns:

Output ParameterDescription
formatImage type, e.g. png, gif
widthImage width in pixels (px)
heightImage height in pixels (px)
sizeImage size in bytes
md5MD5 value of the image
frame_countNumber of frames; 1 for static images, actual frame count for animated images
bit_depthBit depth of the image
vertical_dpiVertical DPI of the image
horizontal_dpiHorizontal DPI of the image

assessQuality

Image processing — image quality assessment.

Input ParameterTypeDescription
objectKeystringPath of the image in the bucket

Returns:

Output ParameterDescription
LongImageLong image (aspect ratio ≥3 or ≤1/3); TRUE = yes, FALSE = no
BlackAndWhiteBlack and white image (grayscale, all RGB channels are gray); TRUE = yes, FALSE = no
SmallImageSmall image (longest side <179 px); TRUE = yes, other fields output 0 or FALSE
BigImageLarge image (shortest side >1000 px); TRUE = yes, FALSE = no
PureImageSolid-color/pure-text image (no content or simple content); TRUE = yes, FALSE = no
ClarityScoreClarity score (0–100; composite of noise/exposure/blur/compression; ≥50 is relatively clear)
AestheticScoreAesthetic score (0–100; artistic evaluation of composition/color; ≥50 is relatively aesthetic)
LowQualityScoreContent quality score (0–100; quality evaluation of background/content; ≥50 is relatively good quality)
RequestIdUnique request ID for troubleshooting

aiSuperResolution

Image processing — super-resolution.

Input ParameterTypeDescription
objectKeystringPath of the image in the bucket

Returns:

Output Parameter NodeParent NodeDescription
UploadResultNoneRequest result container
OriginalInfoUploadResultOriginal image information container
KeyOriginalInfoOriginal image filename (e.g. example.jpg)
LocationOriginalInfoOriginal image storage path
ETagOriginalInfoUnique identifier of the original image file
ProcessResultsUploadResultImage processing result container
ObjectProcessResultsSingle image processing result container
KeyObjectSuper-resolution output image filename (e.g. output.jpg)
LocationObjectAccess URL for the super-resolution output image
ETagObjectUnique identifier of the super-resolution output image
SizeObjectSize of the super-resolution output image (in bytes)

aiPicMatting

Image processing — matting.

Input ParameterTypeDescription
objectKeystringPath of the image in the bucket
widthoptional stringWidth
heightoptional stringHeight

Returns:

Output Parameter NodeParent NodeDescription
UploadResultNoneRequest result container
OriginalInfoUploadResultOriginal image information container
KeyOriginalInfoOriginal image filename (e.g. example.jpg)
LocationOriginalInfoOriginal image storage path
ETagOriginalInfoOriginal image ETag value
ProcessResultsUploadResultImage processing result container
ObjectProcessResultsSingle image processing result container
KeyObjectMatted image filename (e.g. output.jpg)
LocationObjectMatted image URL
ETagObjectMatted image ETag value
SizeObjectMatted image size (in bytes)

aiQrcode

Image processing — QR code recognition for images in the bucket.

Input ParameterTypeDescription
objectKeystringCOS object key (full path), e.g. images/qrcode.jpg

Returns:

Output Parameter NodeParent NodeDescription
UploadResultNoneOriginal image information container
OriginalInfoUploadResultOriginal image information container
KeyOriginalInfoOriginal image filename
LocationOriginalInfoImage path
ImageInfoOriginalInfoOriginal image info container
FormatImageInfoImage format
WidthImageInfoImage width
HeightImageInfoImage height
QualityImageInfoImage quality
AveImageInfoImage dominant color
OrientationImageInfoImage rotation angle
ProcessResultsUploadResultImage processing result container
ObjectProcessResultsSingle processing result container
KeyObjectProcessed filename
LocationObjectProcessed image path
FormatObjectProcessed image format
WidthObjectProcessed image width
HeightObjectProcessed image height
SizeObjectProcessed image size
QualityObjectProcessed image quality
codeStatusObjectQR code recognition status (0 = none, 1 = found)
QRcodeInfoObjectQR code recognition result container
codeUrlQRcodeInfoDecoded QR code content
codelocationQRcodeInfoQR code coordinate container
pointcodelocationCoordinate points (format: x1,y1;x2,y2;...)

waterMarkFont

Generate an image with a text watermark.

Input ParameterTypeDescription
objectKeystringCOS object key (full path), e.g. images/photo.jpg
textstringWatermark text content (supports Chinese)

Returns:

Output Parameter NodeParent NodeDescription
UploadResultNoneOriginal image info (request result container)
OriginalInfoUploadResultOriginal image information container
KeyOriginalInfoOriginal image filename
LocationOriginalInfoImage path
ImageInfoOriginalInfoOriginal image info container
ETagOriginalInfoETag of original/result image (updated on overwrite)
FormatImageInfoImage format
WidthImageInfoImage width (in pixels)
HeightImageInfoImage height (in pixels)
QualityImageInfoImage quality (numeric)
AveImageInfoImage dominant color (hex format 0xRRGGBB)
OrientationImageInfoImage rotation angle (1–8 correspond to different rotation/flip modes)
FrameCountImageInfoNumber of frames (1 for static images, actual count for animated images)
ProcessResultsUploadResultImage processing result container
ObjectProcessResultsSingle image processing result container
KeyObjectResult image filename
LocationObjectResult image path
FormatObjectResult image format
WidthObjectResult image width (in pixels)
HeightObjectResult image height (in pixels)
SizeObjectResult image size (in bytes)
QualityObjectResult image quality (numeric)
ETagObjectETag of the processing result image
FrameCountObjectNumber of frames in result image (1 for static, actual count for animated)

createMediaSmartCoverJob

Create a media intelligent cover task.

Input ParameterTypeDescription
objectKeystringPath of the object in the bucket

Returns:

Output Parameter NodeParent NodeDescription
ResponseNoneResult container
JobsDetailResponseDetailed task information
CodeResponse.JobsDetailError code; only meaningful when State is Failed
MessageResponse.JobsDetailError description; only meaningful when State is Failed
JobIdResponse.JobsDetailID of the newly created task
TagResponse.JobsDetailTag of the newly created task: SmartCover
StateResponse.JobsDetailTask status
CreationTimeResponse.JobsDetailTask creation time
EndTimeResponse.JobsDetailTask end time
QueueIdResponse.JobsDetailQueue ID the task belongs to
InputResponse.JobsDetailInput resource address for this task
OperationResponse.JobsDetailRules for this task
RegionResponse.JobsDetail.InputRegion of the bucket
BucketResponse.JobsDetail.InputBucket where results are stored
ObjectResponse.JobsDetail.InputOutput result filename
SmartCoverResponse.JobsDetail.OperationSame as Request.Operation.SmartCover in the request
OutputResponse.JobsDetail.OperationSame as Request.Operation.Output in the request
MediaResultResponse.JobsDetail.OperationBasic information about the output file; not returned until the task is complete. See MediaResult
UserDataResponse.JobsDetail.OperationPassthrough user information
JobLevelResponse.JobsDetail.OperationTask priority
OutputFileResponse.JobsDetail.Operation.MediaResultBasic information about the output file
Bucket_OutputFileResponse.JobsDetail.Operation.MediaResult.OutputFileBucket where the output file is stored
Region_OutputFileResponse.JobsDetail.Operation.MediaResult.OutputFileRegion of the bucket where the output file is stored
ObjectNameResponse.JobsDetail.Operation.MediaResult.OutputFileOutput filename(s); may have multiple
Md5InfoResponse.JobsDetail.Operation.MediaResult.OutputFileMD5 information of the output file
ObjectName_MD5Response.JobsDetail.Operation.MediaResult.OutputFile.Md5InfoOutput filename (with MD5 suffix)
Md5Response.JobsDetail.Operation.MediaResult.OutputFile.Md5InfoMD5 value of the output file

describeMediaJob

Query the result of a specified media intelligent cover task by job ID.

Input ParameterTypeDescription
jobIdstringID of the task to query; available from the response when the intelligent cover task was submitted

Returns:

Output Parameter NodeParent NodeDescription
ResponseNoneResult container
JobsDetailResponseDetailed task information
CodeResponse.JobsDetailError code; only meaningful when State is Failed
MessageResponse.JobsDetailError description; only meaningful when State is Failed
JobIdResponse.JobsDetailID of the newly created task
TagResponse.JobsDetailTag of the newly created task: SmartCover
StateResponse.JobsDetailTask status
CreationTimeResponse.JobsDetailTask creation time
EndTimeResponse.JobsDetailTask end time
QueueIdResponse.JobsDetailQueue ID the task belongs to
InputResponse.JobsDetailInput resource address for this task
OperationResponse.JobsDetailRules for this task
RegionResponse.JobsDetail.InputRegion of the bucket
BucketResponse.JobsDetail.InputBucket where results are stored
ObjectResponse.JobsDetail.InputOutput result filename
SmartCoverResponse.JobsDetail.OperationSame as Request.Operation.SmartCover in the request
OutputResponse.JobsDetail.OperationSame as Request.Operation.Output in the request
MediaResultResponse.JobsDetail.OperationBasic information about the output file; not returned until the task is complete. See MediaResult
UserDataResponse.JobsDetail.OperationPassthrough user information
JobLevelResponse.JobsDetail.OperationTask priority
OutputFileResponse.JobsDetail.Operation.MediaResultBasic information about the output file
Bucket_OutputFileResponse.JobsDetail.Operation.MediaResult.OutputFileBucket where the output file is stored
Region_OutputFileResponse.JobsDetail.Operation.MediaResult.OutputFileRegion of the bucket where the output file is stored
ObjectNameResponse.JobsDetail.Operation.MediaResult.OutputFileOutput filename(s); may have multiple
Md5InfoResponse.JobsDetail.Operation.MediaResult.OutputFileMD5 information of the output file
ObjectName_InfoResponse.JobsDetail.Operation.MediaResult.OutputFile.Md5InfoOutput filename (with MD5 suffix)
Md5_ValueResponse.JobsDetail.Operation.MediaResult.OutputFile.Md5InfoMD5 value of the output file

imageSearchPic

Search for images with similar content to the input image from the dataset.

Input ParameterTypeDescription
uristringURI of the input image; retrieves images with similar content from the dataset

Returns:

Output Parameter NodeParent NodeDescription
ImageResultNoneList of image search recognition results
RequestIdNoneRequest ID
URIImageResultURL of the similar image
ScoreImageResultImage relevance score; higher score means more similar to the search criteria

imageSearchText

Search for images that match the input text content from the dataset.

Input ParameterTypeDescription
textstringSearch text

Returns:

Output Parameter NodeParent NodeDescription
ImageResultNoneList of image search recognition results
RequestIdNoneRequest ID
URIImageResultURL of the matching image
ScoreImageResultImage relevance score; higher score means more similar to the search criteria

createDocToPdfJob

Create a document-to-PDF processing task.

Input ParameterTypeDescription
objectKeystringPath of the object in the bucket

Returns:

Output Parameter NodeParent NodeDescription
ResponseNoneResult container
JobsDetailResponseDetailed task information; same as the Response.JobsDetail node in the CreateDocProcessJobs API
NonExistJobIdsResponseIDs in the query that do not exist; not returned if all tasks exist
DocProcessResponse.JobsDetail.OperationDocument preview task parameters
DocProcessResultResponse.JobsDetail.OperationDocument preview task result details; returned when job type is DocProcess and status is success
OutputResponse.JobsDetail.OperationResult output address; same as the Request.Operation.Output node in the CreateDocProcessJobs API
PageInfoResponse.JobsDetail.Operation.DocProcessResultDetails about preview task output
TgtTypeResponse.JobsDetail.Operation.DocProcessResultTarget format of the preview output
TotalPageCountResponse.JobsDetail.Operation.DocProcessResultTotal number of preview task outputs
SuccPageCountResponse.JobsDetail.Operation.DocProcessResultNumber of successful preview task outputs
FailPageCountResponse.JobsDetail.Operation.DocProcessResultNumber of failed preview task outputs
TotalSheetCountResponse.JobsDetail.Operation.DocProcessResultTotal number of sheets in the preview task (Excel-specific parameter)
PageNoResponse.JobsDetail.Operation.DocProcessResult.PageInfoPreview output page number / SheetId (for Excel format)
TgtUriResponse.JobsDetail.Operation.DocProcessResult.PageInfoCOS bucket path of the generated preview output
X-SheetPicsResponse.JobsDetail.Operation.DocProcessResult.PageInfoTotal number of images generated for the current sheet (Excel-specific parameter)
PicIndexResponse.JobsDetail.Operation.DocProcessResult.PageInfoSequence number of the current preview output in the entire source file (Excel-specific parameter)
PicNumResponse.JobsDetail.Operation.DocProcessResult.PageInfoSequence number of the current preview output within the sheet (Excel-specific parameter)

describeDocProcessJob

Query the result of a specified document transcoding task by job ID.

Input ParameterTypeDescription
jobIdstringID of the task to query; available from the response when the document task was submitted

Returns:

Output Parameter NodeParent NodeDescription
ResponseNoneResult container
JobsDetailResponseDetailed task information; same as the Response.JobsDetail node in the CreateDocProcessJobs API
NonExistJobIdsResponseIDs in the query that do not exist; not returned if all tasks exist
DocProcessResponse.JobsDetail.OperationDocument preview task parameters
DocProcessResultResponse.JobsDetail.OperationDocument preview task result details; returned when job type is DocProcess and status is success
OutputResponse.JobsDetail.OperationResult output address; same as the Request.Operation.Output node in the CreateDocProcessJobs API
PageInfoResponse.JobsDetail.Operation.DocProcessResultDetails about preview task output
TgtTypeResponse.JobsDetail.Operation.DocProcessResultTarget format of the preview output
TotalPageCountResponse.JobsDetail.Operation.DocProcessResultTotal number of preview task outputs
SuccPageCountResponse.JobsDetail.Operation.DocProcessResultNumber of successful preview task outputs
FailPageCountResponse.JobsDetail.Operation.DocProcessResultNumber of failed preview task outputs
TotalSheetCountResponse.JobsDetail.Operation.DocProcessResultTotal number of sheets in the preview task (Excel-specific parameter)
PageNoResponse.JobsDetail.Operation.DocProcessResult.PageInfoPreview output page number / SheetId (for Excel format)
TgtUriResponse.JobsDetail.Operation.DocProcessResult.PageInfoCOS bucket path of the generated preview output
X-SheetPicsResponse.JobsDetail.Operation.DocProcessResult.PageInfoTotal number of images generated for the current sheet (Excel-specific parameter)
PicIndexResponse.JobsDetail.Operation.DocProcessResult.PageInfoSequence number of the current preview output in the entire source file (Excel-specific parameter)
PicNumResponse.JobsDetail.Operation.DocProcessResult.PageInfoSequence number of the current preview output within the sheet (Excel-specific parameter)