You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b4d2367
Browse filesBrowse the repository at this point in the historyBrowse files
-**Database** (schema design) → `data-model-creation` + `relational-database-mcp-cloudbase` or `postgresql-development-cloudbase`
19
19
20
+
## Two MCP servers are connected
21
+
22
+
The plugin wires both a hosted server (`cloudbase-remote`, OAuth over Streamable HTTP) and a local one (`cloudbase-local`, stdio via `npx`). They expose the same tool names, so pick one deliberately instead of mixing calls across them.
23
+
24
+
Use `cloudbase-remote` by default. Switch to `cloudbase-local` when any one of these applies:
25
+
26
+
- the account signs in with a CloudBase API key (`CLOUDBASE_API_KEY`) — the hosted endpoint accepts only OAuth or Tencent Cloud SecretId/SecretKey, it has no API-key path
27
+
- the session has to cover both the domestic and the international site — a hosted URL is bound to one site, the local server switches with `TCB_SITE`
28
+
- the task needs a tool the hosted server does not register: `manageStorage` for uploading or downloading local files, `downloadTemplate`, `manageCloudRun`, or the declarative `deployBuild` / `deployPlan` / `deployApply` set
29
+
-`cloudbase-remote` returns `401` and the user cannot finish a browser login
30
+
31
+
**Deploying functions or apps does not require the local server.** On the hosted one, deploy by two-step upload: `queryFunctions(action="getFunctionUploadUrl")` or `queryApps(action="getUploadUrl")` → `PUT` the zip → `manageFunctions` with the `code` triple or `manageApps(action="deployApp", cosTimestamp=…)`. What the hosted server lacks is the declarative `cloudbaserc` executor and a dry-run before applying.
32
+
33
+
`cloudbase-remote` has no `auth` tool: the browser OAuth flow (sign in → pick an environment → consent) *is* the login, so do not look for `auth` there and do not ask for API keys. `cloudbase-local` does expose `auth` — use it there.
34
+
20
35
## Mandatory first step
21
36
22
-
When CloudBase MCP tools are available in this session, resolve the session in this order — every management tool fails with `AUTH_REQUIRED` / `ENV_REQUIRED` until steps 1 and 2 are done:
37
+
When CloudBase MCP tools are available in this session, resolve the session in this order — management tools fail with `ENV_REQUIRED` until an environment is bound:
23
38
24
-
1.`auth({ action: "status" })` — confirm the login; if not logged in, complete `auth({ action: "start_auth" })` first.
25
-
2.`auth({ action: "set_env", envId: "<EnvId>" })` — bind the target environment when none is bound yet.
26
-
3.`queryEnv({ action: "info" })` — then resolve:
39
+
1.`queryEnv({ action: "info" })` on the server you are using — confirm the bound environment, then resolve:
27
40
-`envId` — use in all subsequent config files and code
28
41
-`RuntimeMode` — `"postgresql"` or `"nosql"` (determines database skill routing)
29
42
-`RuntimeModeHints.RecommendedSkills` — backend-recommended skills for this environment
Copy file name to clipboardExpand all lines: gemini-extension.json
+8-2Lines changed: 8 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,15 @@
4
4
"description": "Tencent CloudBase — AI models, auth, NoSQL/PostgreSQL databases, cloud functions, storage, CloudRun, and WeChat Mini Program integration.",
Copy file name to clipboardExpand all lines: kimi.plugin.json
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -30,17 +30,17 @@
30
30
"sessionStart": {
31
31
"skill": "cloudbase"
32
32
},
33
-
"skillInstructions": "Log in via the plugin's MCP `auth` tool (device-code flow) \u2014 no long-lived API keys are accepted. Prefer this plugin's MCP tools for all CloudBase operations. Domain knowledge is fetched on demand via the routing skill (searchKnowledgeBase mode=skill).",
33
+
"skillInstructions": "Two MCP servers are connected: `cloudbase-remote` (hosted, sign in through Kimi's MCP OAuth flow via `/mcp-config login`) and `cloudbase-local` (local stdio, use it when the account signs in with a CloudBase API key or the task needs local files). Prefer the remote one by default. Domain knowledge is fetched on demand via the routing skill (searchKnowledgeBase mode=skill).",
Copy file name to clipboardExpand all lines: skills/cloudbase-mcp/SKILL.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,17 @@ The hostname decides the site. Remote URLs do not take a `site` query parameter.
51
51
- CI: add `env_id` and headers `X-TencentCloud-SecretId` / `X-TencentCloud-SecretKey`.
52
52
- Local stdio for the international site: `TCB_SITE=intl` and `TCB_REGION=ap-singapore`.
53
53
54
-
Remote mode cannot upload local files or download templates. The international site does not expose NoSQL tools.
54
+
Pick the mode by these rules:
55
+
56
+
-**Remote** — the default. Interactive sign-in (browser OAuth) plus anything that runs entirely in the cloud.
57
+
-**Local** — when any one of these applies:
58
+
- the account signs in with a CloudBase API key (`CLOUDBASE_API_KEY`); remote has no API-key path, it accepts OAuth or Tencent Cloud SecretId/SecretKey only
59
+
- one session has to cover both the domestic and the international site; a remote URL is bound to a single site, while local switches with `TCB_SITE`
60
+
- the task needs a tool that remote does not register: `manageStorage` for uploading or downloading local files, `downloadTemplate`, `manageCloudRun`, or the declarative `deployBuild` / `deployPlan` / `deployApply` set
61
+
62
+
**Deploying functions or apps does not require local mode.** Remote deploys through the two-step upload: `queryFunctions(action="getFunctionUploadUrl")` or `queryApps(action="getUploadUrl")` → `PUT` the zip → `manageFunctions` with the `code` triple or `manageApps(action="deployApp", cosTimestamp=…)`. What remote lacks is the declarative `cloudbaserc` executor and a dry-run before applying.
63
+
64
+
The international site does not expose NoSQL tools in either mode.
| NoSQL / document DB tools | available |**not available**|
27
27
28
-
-**International users: connect the international remote MCP endpoint directly**— `https://tcb-api.tencentcloud.com/mcp/v1`. It is a first-class hosted endpoint; OAuth covers the login. The site is decided by the host, so there is no `site`query parameter to pass.
29
-
-Domestic remote MCP is the same shape at `https://tcb-api.cloud.tencent.com/mcp/v1` — that stays the default for domestic users.
28
+
-**Connect remote by default.**Both hosts are first-class endpoints: OAuth covers the login and the hostname decides the site, so there is no `site` parameter to pass. International: `https://tcb-api.tencentcloud.com/mcp/v1`; domestic: `https://tcb-api.cloud.tencent.com/mcp/v1`.
29
+
-**Use local stdio only when something requires it** — an account signing in with a CloudBase API key, one session that must cover both sites (a remote URL is bound to one), or a task that needs a tool the hosted endpoint does not register. Deploying functions or apps is not a reason: that works remotely through the two-step upload. Comparison: `references/mcp-setup.md`.
30
30
-`TCB_IS_INTL` (CLI) and `TCB_SITE` (MCP) are **different variable names for different tools**. Set the one matching the tool in use; setting the wrong one silently does nothing.
31
31
- On a first run, **settle the site once and persist it** — the CLI switch is machine-global, the MCP switch is per-client, and only `.cloudbase/project.json` is project-scoped and readable by MCP after a restart. Follow `references/site-onboarding.md`; do not re-ask on later sessions.
| Site selection | decided by the hostname |`TCB_SITE`, defaults to domestic |
16
+
| NoSQL tools on the international site | not available | available |
17
+
18
+
Pick remote by default. Switch to local when any one of these applies:
19
+
20
+
- the account signs in with a CloudBase API key (`CLOUDBASE_API_KEY`) — remote has no API-key path
21
+
- one session has to cover both the domestic and the international site — a remote URL is bound to a single site, while local switches with `TCB_SITE`
22
+
- the task needs a tool that remote does not register: `manageStorage` for uploading or downloading local files, `downloadTemplate`, `manageCloudRun`, or the declarative `deployBuild` / `deployPlan` / `deployApply` set
23
+
24
+
**Deploying functions or apps does not require local mode.** Remote deploys through the two-step upload — `queryFunctions(action="getFunctionUploadUrl")` or `queryApps(action="getUploadUrl")` → `PUT` the zip → `manageFunctions` with the `code` triple or `manageApps(action="deployApp", cosTimestamp=…)`. What remote lacks is the declarative `cloudbaserc` executor and a dry-run before applying.
25
+
26
+
The plugin installs both (`cloudbase-remote` and `cloudbase-local`) so either path stays reachable in the same session.
27
+
3
28
## Site: domestic or international (decide first)
4
29
5
30
CloudBase has two independent account systems — 国内站 (`cloud.tencent.com`) and 国际站 (`tencentcloud.com`). Env, console, API keys, and login state do not cross over, and a wrong-site login looks like *"logged in, but no environments"*. Confirm the site before configuring MCP. Ask the user if the console domain / envId does not make it obvious.
0 commit comments