@tinycloud/mcp 0.10.0-beta.50 → 0.10.0-beta.51

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/dist/index.cjs CHANGED
@@ -525,6 +525,7 @@ function registerTinyCloudTools(server, selection, validator) {
525
525
  validator
526
526
  );
527
527
  const annotations = {
528
+ ...selection.annotationTitles === true ? { title: operation.title } : {},
528
529
  readOnlyHint: binding.readOnlyHint,
529
530
  idempotentHint: binding.idempotentHint,
530
531
  destructiveHint: binding.destructiveHint,
@@ -591,7 +592,7 @@ function outcomeCode(result) {
591
592
  // package.json
592
593
  var package_default = {
593
594
  name: "@tinycloud/mcp",
594
- version: "0.10.0-beta.50",
595
+ version: "0.10.0-beta.51",
595
596
  description: "TinyCloud delegated operations MCP server",
596
597
  keywords: [
597
598
  "tinycloud",
@@ -2274,6 +2275,7 @@ var MCP_CORS_EXPOSED_HEADERS = "WWW-Authenticate, Mcp-Session-Id, Mcp-Protocol-V
2274
2275
  var LOCAL_CLI_PACKAGE = ["@tinycloud", "cli"].join("/");
2275
2276
  var LOCAL_MCP_PACKAGE = ["@tinycloud", "mcp"].join("/");
2276
2277
  var RESTRICTED_ADDRESS_PREFIXES = ["chatgpt", "claude", "grok", "muse"];
2278
+ var ANNOTATION_TITLE_PREFIXES = /* @__PURE__ */ new Set(["claude"]);
2277
2279
  function createHostedMcpApp(config) {
2278
2280
  if (config.nativeServiceCredential !== void 0 && Buffer.byteLength(config.nativeServiceCredential, "utf8") < 32) {
2279
2281
  throw new Error("TC_MCP_NATIVE_SERVICE_CREDENTIAL must contain at least 32 bytes.");
@@ -2291,7 +2293,7 @@ function createHostedMcpApp(config) {
2291
2293
  nativeServiceCredential: void 0,
2292
2294
  stateDir: (0, import_node_path4.join)(config.stateDir, prefix),
2293
2295
  approvalPath: connectUrl.pathname
2294
- }, restrictedUrl, "public", statusFor(restrictedUrl));
2296
+ }, restrictedUrl, "public", statusFor(restrictedUrl), ANNOTATION_TITLE_PREFIXES.has(prefix));
2295
2297
  surfaces.push(restricted);
2296
2298
  for (const owned of [
2297
2299
  restrictedUrl,
@@ -2309,7 +2311,7 @@ function createHostedMcpApp(config) {
2309
2311
  }
2310
2312
  };
2311
2313
  }
2312
- function createHostedSurface(config, resourceUrl, surface, tokenStatus) {
2314
+ function createHostedSurface(config, resourceUrl, surface, tokenStatus, annotationTitles = false) {
2313
2315
  const connectPath = config.approvalPath ?? "/connect";
2314
2316
  const callbackPath = `${connectPath}/callback`;
2315
2317
  const issuer = String(config.oauthMetadata.issuer);
@@ -2349,6 +2351,7 @@ function createHostedSurface(config, resourceUrl, surface, tokenStatus) {
2349
2351
  explicitProfile: true,
2350
2352
  allowOwnerProfile: false,
2351
2353
  stateRoot,
2354
+ annotationTitles,
2352
2355
  ...nativeOwner === void 0 ? {} : {
2353
2356
  allowedTools: ["tinycloud_sql_query", "tinycloud_kv_get", "tinycloud_read"]
2354
2357
  },
@@ -2357,7 +2360,7 @@ function createHostedSurface(config, resourceUrl, surface, tokenStatus) {
2357
2360
  transformOperationResult: (result, invocation) => store.decorateAuthorityResult(subject, ownerDids, result, invocation)
2358
2361
  } : {}
2359
2362
  }, validator);
2360
- if (nativeOwner === void 0) registerConnectTool(server, validator, store, identity, surface);
2363
+ if (nativeOwner === void 0) registerConnectTool(server, validator, store, identity, surface, annotationTitles);
2361
2364
  return server;
2362
2365
  }, {
2363
2366
  legacy: "stateless",
@@ -2704,7 +2707,8 @@ Local alternative: install \`${LOCAL_CLI_PACKAGE}\` and \`${LOCAL_MCP_PACKAGE}\`
2704
2707
  close: () => handler.close()
2705
2708
  };
2706
2709
  }
2707
- function registerConnectTool(server, validator, store, identity, surface) {
2710
+ function registerConnectTool(server, validator, store, identity, surface, annotationTitles) {
2711
+ const title = "Connect TinyCloud";
2708
2712
  const inputSchema = (0, import_server5.fromJsonSchema)({ type: "object", properties: {}, additionalProperties: false }, validator);
2709
2713
  const outputSchema = (0, import_server5.fromJsonSchema)({
2710
2714
  type: "object",
@@ -2720,11 +2724,12 @@ function registerConnectTool(server, validator, store, identity, surface) {
2720
2724
  server.registerTool(
2721
2725
  "tinycloud_connect",
2722
2726
  {
2723
- title: "Connect TinyCloud",
2727
+ title,
2724
2728
  description: "Check the hosted delegate connection and return a one-time OpenKey approval URL when setup is required.",
2725
2729
  inputSchema,
2726
2730
  outputSchema,
2727
2731
  annotations: {
2732
+ ...annotationTitles ? { title } : {},
2728
2733
  readOnlyHint: false,
2729
2734
  idempotentHint: true,
2730
2735
  destructiveHint: false,