@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.js CHANGED
@@ -488,6 +488,7 @@ function registerTinyCloudTools(server, selection, validator) {
488
488
  validator
489
489
  );
490
490
  const annotations = {
491
+ ...selection.annotationTitles === true ? { title: operation.title } : {},
491
492
  readOnlyHint: binding.readOnlyHint,
492
493
  idempotentHint: binding.idempotentHint,
493
494
  destructiveHint: binding.destructiveHint,
@@ -554,7 +555,7 @@ function outcomeCode(result) {
554
555
  // package.json
555
556
  var package_default = {
556
557
  name: "@tinycloud/mcp",
557
- version: "0.10.0-beta.50",
558
+ version: "0.10.0-beta.51",
558
559
  description: "TinyCloud delegated operations MCP server",
559
560
  keywords: [
560
561
  "tinycloud",
@@ -2261,6 +2262,7 @@ var MCP_CORS_EXPOSED_HEADERS = "WWW-Authenticate, Mcp-Session-Id, Mcp-Protocol-V
2261
2262
  var LOCAL_CLI_PACKAGE = ["@tinycloud", "cli"].join("/");
2262
2263
  var LOCAL_MCP_PACKAGE = ["@tinycloud", "mcp"].join("/");
2263
2264
  var RESTRICTED_ADDRESS_PREFIXES = ["chatgpt", "claude", "grok", "muse"];
2265
+ var ANNOTATION_TITLE_PREFIXES = /* @__PURE__ */ new Set(["claude"]);
2264
2266
  function createHostedMcpApp(config) {
2265
2267
  if (config.nativeServiceCredential !== void 0 && Buffer.byteLength(config.nativeServiceCredential, "utf8") < 32) {
2266
2268
  throw new Error("TC_MCP_NATIVE_SERVICE_CREDENTIAL must contain at least 32 bytes.");
@@ -2278,7 +2280,7 @@ function createHostedMcpApp(config) {
2278
2280
  nativeServiceCredential: void 0,
2279
2281
  stateDir: join3(config.stateDir, prefix),
2280
2282
  approvalPath: connectUrl.pathname
2281
- }, restrictedUrl, "public", statusFor(restrictedUrl));
2283
+ }, restrictedUrl, "public", statusFor(restrictedUrl), ANNOTATION_TITLE_PREFIXES.has(prefix));
2282
2284
  surfaces.push(restricted);
2283
2285
  for (const owned of [
2284
2286
  restrictedUrl,
@@ -2296,7 +2298,7 @@ function createHostedMcpApp(config) {
2296
2298
  }
2297
2299
  };
2298
2300
  }
2299
- function createHostedSurface(config, resourceUrl, surface, tokenStatus) {
2301
+ function createHostedSurface(config, resourceUrl, surface, tokenStatus, annotationTitles = false) {
2300
2302
  const connectPath = config.approvalPath ?? "/connect";
2301
2303
  const callbackPath = `${connectPath}/callback`;
2302
2304
  const issuer = String(config.oauthMetadata.issuer);
@@ -2336,6 +2338,7 @@ function createHostedSurface(config, resourceUrl, surface, tokenStatus) {
2336
2338
  explicitProfile: true,
2337
2339
  allowOwnerProfile: false,
2338
2340
  stateRoot,
2341
+ annotationTitles,
2339
2342
  ...nativeOwner === void 0 ? {} : {
2340
2343
  allowedTools: ["tinycloud_sql_query", "tinycloud_kv_get", "tinycloud_read"]
2341
2344
  },
@@ -2344,7 +2347,7 @@ function createHostedSurface(config, resourceUrl, surface, tokenStatus) {
2344
2347
  transformOperationResult: (result, invocation) => store.decorateAuthorityResult(subject, ownerDids, result, invocation)
2345
2348
  } : {}
2346
2349
  }, validator);
2347
- if (nativeOwner === void 0) registerConnectTool(server, validator, store, identity, surface);
2350
+ if (nativeOwner === void 0) registerConnectTool(server, validator, store, identity, surface, annotationTitles);
2348
2351
  return server;
2349
2352
  }, {
2350
2353
  legacy: "stateless",
@@ -2691,7 +2694,8 @@ Local alternative: install \`${LOCAL_CLI_PACKAGE}\` and \`${LOCAL_MCP_PACKAGE}\`
2691
2694
  close: () => handler.close()
2692
2695
  };
2693
2696
  }
2694
- function registerConnectTool(server, validator, store, identity, surface) {
2697
+ function registerConnectTool(server, validator, store, identity, surface, annotationTitles) {
2698
+ const title = "Connect TinyCloud";
2695
2699
  const inputSchema = fromJsonSchema2({ type: "object", properties: {}, additionalProperties: false }, validator);
2696
2700
  const outputSchema = fromJsonSchema2({
2697
2701
  type: "object",
@@ -2707,11 +2711,12 @@ function registerConnectTool(server, validator, store, identity, surface) {
2707
2711
  server.registerTool(
2708
2712
  "tinycloud_connect",
2709
2713
  {
2710
- title: "Connect TinyCloud",
2714
+ title,
2711
2715
  description: "Check the hosted delegate connection and return a one-time OpenKey approval URL when setup is required.",
2712
2716
  inputSchema,
2713
2717
  outputSchema,
2714
2718
  annotations: {
2719
+ ...annotationTitles ? { title } : {},
2715
2720
  readOnlyHint: false,
2716
2721
  idempotentHint: true,
2717
2722
  destructiveHint: false,