CloudBase MCP

repository·main·Indexed 21 days ago

https://github.com/tencentcloudbase/cloudbase-mcp

An integration layer using the Model Context Protocol (MCP) that connects AI coding assistants to Tencent Cloud's CloudBase backend. It enables AI agents to manage databases (PostgreSQL, document DB), cloud functions, storage, authentication, and deployment. The toolkit includes the @cloudbase/cloudbase-mcp package, a cloudbase-lint code quality tool, and support for both local npx and hosted HTTP connection modes.

Tokens
406.6K
Snippets
929
Records
1.6K
Agent score
76%

What's inside cloudbase-mcp

  1. Overview of CloudBase AI ToolKit capabilities

    main

    CloudBase AI ToolKit is an AI-powered development platform that integrates AI code generation with Tencent Cloud's serverless infrastructure. It allows developers to describe application ideas in natural language and automatically generates and deploys full-stack applications.

    Key Capabilities

    • AI-First Development: Generates production-ready code via natural language prompts.
    • One-Click Deployment: Automates deployment to Tencent Cloud's serverless platform.
    • Full-Stack Support: Supports building web apps, mini-programs, and backend services.
    • Smart Debugging: Provides AI-powered error detection and automatic fixes.
    • Optimized Performance: Optimized for China's network with local CDN support.
  2. Overview of CloudBase WeChat Integration

    main

    The CloudBase WeChat Integration skill manages WeChat payment and official-account workflows through the CloudBase Integration Center. It provides a stable execution contract for implementing various WeChat-related features without manual, error-prone API implementations.

    Supported Capabilities

    • WeChat Pay Scenarios: Mini Program Pay (小程序支付), JSAPI Pay (公众号支付), and Native QR-code Pay (二维码支付).
    • Official Account Workflows: Official Account OAuth, openid handling, and user information retrieval.
    • Integration Center Features: Handling payment callbacks, refund callbacks, and using generated functions like pay-common or offiaccount-common.

    Core Operating Rules

    • Console-First Workflow: Integration Center creation and credential management should be done via the CloudBase console. Do not attempt to manage Integration Center instances through guessed MCP tools or undocumented SDK methods.
    • Security: Never store merchant secrets, private keys, APIv3 keys, AppSecret values, or certificates in application source code, README files, or chat prompts. Configure these in the CloudBase console Integration Center form.
    • Authoritative State: Treat frontend payment success as UI feedback only. The authoritative payment state must be derived from server-side query results or payment callbacks.
    • Function Naming: Do not assume generated function names are fixed (e.g., pay-common is just an example). Always verify the actual function name in your environment before writing code.
  3. Overview of the mcp-attribution-worktree skill

    main

    The mcp-attribution-worktree skill is an internal maintenance skill designed to guide Agents in automatically handling MCP attribution issues within the evaluation system.

    Its primary workflow involves:

    1. Fetching issues: Pulling tool-related attribution issues via the report-api.
    2. Evidence collection: Running investigations using result, trace, and evaluation-trace to find root causes.
    3. Value triage: Analyzing mcp/src code to determine if an issue is a genuine MCP tool defect, a mismatch in return structures, or an environmental false positive.
    4. Resolution: Updating issue statuses via report-api and, if a fix is required, using an isolated worktree to implement the fix and submit a GitHub PR to TencentCloudBase/CloudBase-MCP.
  4. Overview of Cloudbase Agent (TypeScript)

    main

    Cloudbase Agent (TypeScript) is a TypeScript SDK designed for deploying AI agents as HTTP services using the AG-UI protocol. It provides specialized adapters for popular agent frameworks and tools for building both web and WeChat Mini Program UIs.

    Use Cases

    • Deploying agent servers: Expose AI agents via HTTP using @cloudbase/agent-server.
    • Framework Integration: Use LangGraph or LangChain adapters to bridge existing agent logic to the AG-UI protocol.
    • Custom Adapters: Implement the AbstractAgent interface for specialized logic.
    • UI Development: Build clients using @ag-ui/client (Web) or @cloudbase/agent-ui-miniprogram (WeChat Mini Program).

    When NOT to use

    • For simple AI model calls without agentic capabilities (use ai-model-* skills).
    • For standard CloudBase cloud functions (use cloud-functions skill).
    • For CloudRun services lacking agent features (use cloudrun-development skill).
  5. Overview of CloudBase WeChat Integration

    main

    CloudBase Integration Center is a console-driven capability that connects third-party services (like WeChat) to CloudBase. It automates the creation of HTTP cloud functions, manages environment variables, and handles platform-specific tasks like callback verification and decryption.

    When using the CloudBase WeChat Integration skill, you are responsible for the application-side logic surrounding these integrations, including:

    • Generating client calls to the automatically generated functions.
    • Implementing order persistence, idempotency, and fulfillment logic.
    • Diagnosing issues related to callbacks, credentials, and routing.
    • Guiding users through the CloudBase console setup (without collecting their secrets).
  6. Use the WeChat Mini Program Development skill

    main

    The miniprogram-development skill is designed for building, debugging, previewing, testing, publishing, and optimizing WeChat Mini Programs.

    Use this skill when:

    • Creating or modifying mini program pages, components, or project structure.
    • Managing project.config.json, appid setup, or tabBar configurations.
    • Handling routing, navigation, or icon assets.
    • Working with WeChat Developer Tools workflows, including wechatide CLI or Nightly workflows.
    • Integrating CloudBase (wx.cloud, Tencent CloudBase, 腾讯云开发, etc.) into a mini program project.

    Do NOT use this skill for:

    • Web frontend development (use web-development).
    • Pure backend service development (use cloudrun-development or cloud-functions).
    • UI design-only tasks (use ui-design).
    • Web auth flows or Web SDK-specific implementations.
    • WeChat Pay, payment callbacks, or Official Account OAuth (use cloudbase-wechat-integration).
  7. When to use the ai-model-wechat skill

    main

    Use this skill when you need to integrate AI text generation into a WeChat Mini Program, Enterprise WeChat Mini Program, or wx.cloud apps using the wx.cloud.extend.AI SDK.

    Capabilities:

    • Integrate AI text generation.
    • Stream AI responses with callback support (onText, onEvent, onFinish).
    • Call Hunyuan models directly from the WeChat environment.

    Do NOT use this skill for:

    • Browser/Web apps: Use ai-model-web.
    • Node.js backend or Cloud Functions: Use ai-model-nodejs.
    • Image generation: Use ai-model-nodejs (image generation is not supported in Mini Programs).
    • Non-CloudBase runtimes (Python, native apps, etc.): Use http-api-cloudbase to access the ai_model OpenAPI spec.
  8. Use the Cloudbase Agent (TypeScript) skill

    main

    The cloudbase-agent skill is a TypeScript SDK designed for deploying AI agents as HTTP services using the AG-UI protocol. It is specifically intended for TypeScript/JavaScript projects.

    Use Cases

    • Deploying agent servers with @cloudbase/agent-server.
    • Using LangGraph adapters with ClientStateAnnotation.
    • Using LangChain adapters with clientTools().
    • Building custom adapters that implement the AbstractAgent interface.
    • Building web UI clients with @ag-ui/client or WeChat Mini Program UIs with @cloudbase/agent-ui-miniprogram.

    When NOT to use this skill

    • For simple AI model calls without agent capabilities (use ai-model-* skills).
    • For standard CloudBase cloud functions (use cloud-functions skill).
    • For CloudRun backend services lacking agent features (use cloudrun-development skill).
  9. Use the CloudBase Agent SDK for AI Agents

    main

    The CloudBase Agent SDK allows you to build and deploy AI agents using either TypeScript or Python. It implements the AG-UI protocol for streaming agent-to-UI communication.

    Use this SDK when you need to:

    • Deploy agent servers.
    • Use LangGraph, LangChain, or CrewAI adapters.
    • Build custom adapters.
    • Understand AG-UI protocol events.
    • Build web or mini-program UI clients.

    Supported Runtimes:

    • TypeScript: via @cloudbase/agent-server.
    • Python: via cloudbase-agent-server (built on FastAPI).
  10. Use the ops-inspector skill for CloudBase resource diagnosis

    main

    The ops-inspector skill is an AIOps-style diagnostic tool used to check the health, status, and error logs of CloudBase resources (Cloud Functions, CloudRun, databases, etc.).

    When to use this skill

    • To check the health or status of CloudBase resources.
    • To diagnose reported errors, failures, or abnormal behavior.
    • When performing a general environment "inspection" (巡检, 诊断, or troubleshooting).
    • To review recent error logs across multiple services.

    When NOT to use this skill

    • Do not use it for deploying new resources or writing application code; it is a read-only diagnostic tool.
    • Do not use it as a replacement for continuous monitoring/alerting infrastructure; it provides point-in-time inspection.
    • Do not use it to directly fix problems; it diagnoses and recommends, but you must use the appropriate implementation skill (e.g., cloud-functions) to apply fixes.
  11. CloudBase AI Toolkit Capabilities

    main

    Once integrated, the AI can perform the following backend tasks in your CloudBase environment (subject to your confirmation of sensitive operations):

    • Database: Manage PostgreSQL and document-based databases, data models, CRUD operations, and security rules/permissions.
    • Compute: Write, deploy, call, and debug Cloud Functions and Cloud Hosting.
    • Identity & Storage: Set up authentication methods and object storage, including permission linking with business data.
    • Deployment & Troubleshooting: Handle static hosting and Mini-program publishing; use logs to locate issues and trigger redeployments.
  12. Identify CloudBase Use Cases

    main

    AI assistants use these prompts to detect if CloudBase is a fit for a developer's project. Common use cases include:

    • Mini Programs: WeChat, QQ, and other mini-program platforms.
    • Web Full-stack Applications: Building complete web stacks.
    • Database-driven Applications: Projects requiring managed database services.
    • Cloud Function Applications: Serverless logic execution.
    • UniApp: Cross-platform application development.
    • Real-time Applications: Apps requiring real-time data synchronization.
    • Authentication: Applications requiring managed user authentication services.