CloudBase basic capabilities MCP access
Supports managing CloudBase basic capabilities via the MCP protocol, including CloudBase environment management, static website deployment, database collection management, and database document operations.
Go to CloudBase Platform to run MCP Server
🚀 Optimized for AI Programming Assistants: Introducing CloudBase-AI-ToolKit
If you are using AI programming tools such as Cursor, VSCode GitHub Copilot, Claude Code, etc., we highly recommend that you directly use CloudBase-AI-ToolKit!
CloudBase-AI-ToolKit
is an upper-layer application specifically designed for local IDE development workflows. It encapsulates the underlying capabilities of this project, providing you with a seamless intelligent development experience:
- 🤖 AI-Powered Instant Deployment: Enable your AI programming assistant not only to write code, but also to directly generate deployable full-stack applications and mini program projects.
- ☁️ One-Click Cloud Deployment: After developing through conversations with AI in the IDE, deploy applications to Tencent CloudBase with one click, eliminating all tedious configurations.
Simply put, CloudBase-AI-ToolKit
is your best choice for local IDE-based AI-driven cloud development. This project (cloudbase-mcp
) serves as its core engine.
👉 Go to CloudBase-AI-ToolKit and start your AI cloud development journey!
Features
- ☁️ CloudBase Environment Management: Provides capabilities such as retrieving all CloudBase environment information, obtaining valid domain name lists for environments, adding and deleting secure domains, as well as retrieving and modifying current environment information.
- 💻 Database Collection Management: Supports database collection operations such as creating collections, checking existence, updating, retrieving details, listing collections, checking index existence, and querying data distribution.
- 📒 Database Document Operations: Supports inserting documents into collections, querying documents, updating documents, and deleting documents.
- 🌍 Static Hosting Management: Enables uploading files to static website hosting, retrieving file lists, deleting files or folders, searching files, binding and unbinding custom domains, obtaining static website configurations, checking domain configurations, and modifying domain configurations.
- 💻 Temporary File Management: Enables creating files in temporary directories, supporting text content or base64-encoded binary content; reading files from temporary directories, supporting both text and binary files.
Usage Example
Usage Instructions
Remote MCP
This project supports One-Click Deployment to Tencent CloudBase Platform, providing remote SSE access.
☁️ Go to CloudBase Platform to deploy MCP Server
After deployment is complete, refer to the instructions on using MCP in the page to access the MCP Server via remote SSE.
Local MCP
When running in a local client environment that supports MCP, you can also use npx
to invoke the cloudbase-mcp
tool.
{
"mcpServers": {
"cloudbase-mcp": {
"command": "npx",
"args": ["@cloudbase/cloudbase-mcp"],
"env": {
"TENCENTCLOUD_SECRETID": "Tencent Cloud SecretId",
"TENCENTCLOUD_SECRETKEY": "Tencent Cloud SecretKey",
"TENCENTCLOUD_SESSIONTOKEN": "Tencent Cloud session Token, required only when using temporary keys",
"CLOUDBASE_ENV_ID": "CloudBase environment ID"
}
}
}
}
Environment Variables
TENCENTCLOUD_SECRETID
andTENCENTCLOUD_SECRETKEY
/TENCENTCLOUD_SESSIONTOKEN
need to be configured as your SecretId and SecretKey obtained from the Tencent Cloud console (Obtain Tencent Cloud API keys)- You need to configure
CLOUDBASE_ENV_ID
as the environment ID obtained from the CloudBase console. Obtain CloudBase environment ID
🗺️ Feature List
Cloud Development Environment Management
Tool Identifier | Function Description | Core Parameters |
---|---|---|
listEnvs | Get all CloudBase environment information | None |
getEnvAuthDomains | Get the list of authorized domains for the CloudBase environment | None |
createEnvDomain | Add secure domains to the CloudBase environment | domains (required, array of secure domains) |
deleteEnvDomain | Delete specified secure domains for the CloudBase environment | domains (required, array of secure domains) |
getEnvInfo | Get current CloudBase environment information | None |
updateEnvInfo | Update the CloudBase environment alias | alias (required, environment alias) |
Database Collection Management
Tool Identifier | Function Description | Core Parameters |
---|---|---|
createCollection | Create a new CloudBase database collection | collectionName (required, collection name) |
checkCollectionExists | Check if the CloudBase database collection exists | collectionName (required, collection name) |
updateCollection | Update CloudBase database collection configuration (create or delete indexes) | collectionName (required, collection name), options (required, update options, supports creating and deleting indexes) |
describeCollection | Describe the details of the CloudBase database collection | collectionName (required, collection name) |
listCollections | List CloudBase database collections | offset (optional, offset), limit (optional, maximum number of records to return) |
checkIndexExists | Check if the index exists | collectionName (required, collection name), indexName (required, index name) |
distribution | Query the data distribution of collections in the database | None |
Database Document Operations
Tool Identifier | Function Description | Core Parameters |
---|---|---|
insertDocuments | Insert one or more documents into a collection | collectionName (required, collection name), documents (required, an array of documents to insert, each as a JSON string) |
queryDocuments | Query documents in a collection | collectionName (required, collection name), query (optional, query conditions, JSON string), projection (optional, field projection for returned results, JSON string), sort (optional, sort conditions, JSON string), limit (optional, maximum number of records to return), offset (optional, number of records to skip) |
updateDocuments | Update documents in a collection | collectionName (required, collection name), query (required, query conditions, JSON string), update (required, update content, JSON string), isMulti (optional, whether to update multiple records), upsert (optional, whether to insert if not exists) |
deleteDocuments | Delete documents in a collection | collectionName (required, collection name), query (required, query conditions, JSON string), isMulti (optional, whether to delete multiple records) |
Static Hosting Management
Tool Identifier | Function Description | Core Parameters |
---|---|---|
uploadFiles | Upload files to static website hosting | localPath (optional, local file or folder path), cloudPath (optional, cloud file or folder path), files (optional, multi-file upload configuration), ignore (optional, file ignore pattern) |
listFiles | List files in static website hosting | None |
deleteFiles | Delete files or folders in static website hosting | cloudPath (required, cloud file or folder path), isDir (optional, whether it is a folder, default is false ) |
findFiles | Find files in static website hosting | prefix (required, matching prefix), marker (optional, starting object key marker), maxKeys (optional, maximum number of entries to return per request) |
createHostingDomain | Bind a custom domain | domain (required, custom domain), certId (required, certificate ID) |
deleteHostingDomain | Unbind a custom domain | domain (required, custom domain) |
getWebsiteConfig | Get static website configuration | None |
tcbCheckResource | Check domain configuration | domains (required, domain list) |
tcbModifyAttribute | Modify domain configuration | domain (required, domain), domainId (required, domain ID), domainConfig (required, domain configuration) |
Temporary File Management
Tool Identifier | Function Description | Core Parameters |
---|---|---|
createTempFile | Create a file in the temporary directory, supporting text content or base64-encoded binary content | content (required, file content, which can be plain text or base64-encoded binary content), isBase64 (optional, whether the content is base64-encoded, default is false ), extension (optional, file extension, such as .txt , .png , etc.) |
readTempFile | Read files in the temporary directory, supporting both text and binary files | filePath (required, file path), asBase64 (optional, whether to return the content in base64 format, default is false ) |