@mcpcloud/cli 0.12.0-next-20260721180156 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/index.js +67 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -161,6 +161,7 @@ _Generated from the live command tree by `bun run docs:readme` — do not edit b
|
|
|
161
161
|
| --- | --- |
|
|
162
162
|
| `mcp analytics` | Show the workspace analytics rollup (readiness, funnel, usage) |
|
|
163
163
|
| `mcp completion <shell>` | Print a shell completion script (bash, zsh, or fish) |
|
|
164
|
+
| `mcp connect-agent` | Connect your agent to the official MCPCloud MCP server (headless twin of /connect-agent) |
|
|
164
165
|
| `mcp doctor` | Diagnose the CLI environment: Node, config, base URL, API key, claude CLI, and updates |
|
|
165
166
|
| `mcp help [topic]` | Show extended help for a topic (auth, profiles, agents, errors) |
|
|
166
167
|
| `mcp init` | Guided onboarding: pick org → pick/create project → create a server (empty skeleton, or generated from an OpenAPI/GraphQL spec via --from-spec) |
|
package/dist/index.js
CHANGED
|
@@ -33049,6 +33049,72 @@ Usage detail requires admin organization access.`);
|
|
|
33049
33049
|
}));
|
|
33050
33050
|
}
|
|
33051
33051
|
|
|
33052
|
+
// src/commands/connect-agent.ts
|
|
33053
|
+
function connectSnippet(mcpUrl, name) {
|
|
33054
|
+
return [
|
|
33055
|
+
`claude mcp add ${name.toLowerCase()} --transport http ${mcpUrl}`,
|
|
33056
|
+
`# or any MCP client: streamable HTTP endpoint ${mcpUrl}`
|
|
33057
|
+
].join(`
|
|
33058
|
+
`);
|
|
33059
|
+
}
|
|
33060
|
+
function registerConnectAgentCommand(program2) {
|
|
33061
|
+
program2.command("connect-agent").description("Connect your agent to the official MCPCloud MCP server (headless twin of /connect-agent)").option("--status", "Show your connection state without changing anything").option("--revoke", "Disconnect: revoke your stored credential").addHelpText("after", [
|
|
33062
|
+
"",
|
|
33063
|
+
"Examples:",
|
|
33064
|
+
" $ mcp connect-agent # enroll this profile’s key + print the snippet",
|
|
33065
|
+
" $ mcp connect-agent --status",
|
|
33066
|
+
" $ mcp connect-agent --revoke"
|
|
33067
|
+
].join(`
|
|
33068
|
+
`)).action(runAction(async (opts) => {
|
|
33069
|
+
const info = await api.get("/api/v1/official-server");
|
|
33070
|
+
const { server } = info;
|
|
33071
|
+
if (opts.status) {
|
|
33072
|
+
if (isJsonMode()) {
|
|
33073
|
+
printJson(info);
|
|
33074
|
+
return;
|
|
33075
|
+
}
|
|
33076
|
+
printKeyValue({
|
|
33077
|
+
server: server.name,
|
|
33078
|
+
endpoint: server.mcpUrl ?? "(no active deployment)",
|
|
33079
|
+
plane: info.callerIsMember ? "member" : server.endUserAccess === "enabled" ? "end-user" : "unavailable (end-user access disabled)",
|
|
33080
|
+
connection: info.connection ? `${info.connection.status} (••••${info.connection.keyHint}${info.connection.minted ? ", platform-minted" : ""})` : "not connected"
|
|
33081
|
+
});
|
|
33082
|
+
return;
|
|
33083
|
+
}
|
|
33084
|
+
if (opts.revoke) {
|
|
33085
|
+
const revoked = await api.delete("/api/v1/upstream-key", { serverId: server.id });
|
|
33086
|
+
if (isJsonMode()) {
|
|
33087
|
+
printJson(revoked);
|
|
33088
|
+
return;
|
|
33089
|
+
}
|
|
33090
|
+
printKeyValue({
|
|
33091
|
+
revoked: String(revoked.revoked),
|
|
33092
|
+
note: revoked.revoked ? "Disconnected. Reconnect any time with `mcp connect-agent`." : "No active connection was stored."
|
|
33093
|
+
});
|
|
33094
|
+
return;
|
|
33095
|
+
}
|
|
33096
|
+
if (!info.callerIsMember && server.endUserAccess !== "enabled") {
|
|
33097
|
+
throw new Error("The official server is not open to non-members in this environment yet.");
|
|
33098
|
+
}
|
|
33099
|
+
const saved = await api.post("/api/v1/upstream-key", { serverId: server.id, apiKey: requireApiKey() });
|
|
33100
|
+
if (isJsonMode()) {
|
|
33101
|
+
printJson({ ...saved, server });
|
|
33102
|
+
return;
|
|
33103
|
+
}
|
|
33104
|
+
printKeyValue({
|
|
33105
|
+
connected: String(saved.saved),
|
|
33106
|
+
server: server.name,
|
|
33107
|
+
key: `••••${saved.keyHint}`,
|
|
33108
|
+
plane: info.callerIsMember ? "member" : "end-user",
|
|
33109
|
+
endpoint: server.mcpUrl ?? "(no active deployment)"
|
|
33110
|
+
});
|
|
33111
|
+
if (server.mcpUrl) {
|
|
33112
|
+
console.log(`
|
|
33113
|
+
${connectSnippet(server.mcpUrl, server.name)}`);
|
|
33114
|
+
}
|
|
33115
|
+
}));
|
|
33116
|
+
}
|
|
33117
|
+
|
|
33052
33118
|
// src/commands/connections.ts
|
|
33053
33119
|
async function readKeyFromStdin() {
|
|
33054
33120
|
const chunks = [];
|
|
@@ -37775,6 +37841,7 @@ function createProgram() {
|
|
|
37775
37841
|
registerOrgCommands(program2);
|
|
37776
37842
|
registerUsageCommands(program2);
|
|
37777
37843
|
registerAnalyticsCommands(program2);
|
|
37844
|
+
registerConnectAgentCommand(program2);
|
|
37778
37845
|
registerConnectionsCommands(program2);
|
|
37779
37846
|
registerMetricsCommands(program2);
|
|
37780
37847
|
registerDevCommand(program2);
|
package/package.json
CHANGED