@orchyn/mcp 1.16.0 → 1.16.1

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.
@@ -11,7 +11,7 @@ import { OrchynError } from "./orchyn.js";
11
11
  import { formatPaywallError, runVideoAnalysis, validatePostUrl } from "./video.js";
12
12
  import { ORCHYN_UI_TEMPLATE } from "./ui-template.js";
13
13
  /** Current MCP server version — bumped on every deploy for traceability. */
14
- export const MCP_SERVER_VERSION = "1.16.0";
14
+ export const MCP_SERVER_VERSION = "1.16.1";
15
15
  /** MCP Apps extension identifier */
16
16
  const UI_EXTENSION = "io.modelcontextprotocol/ui";
17
17
  /** MIME type for MCP Apps HTML resources */
@@ -249,7 +249,9 @@ export function createMcpServer(makeClient) {
249
249
  // distinct URI per tool avoids a shared app instance/session colliding
250
250
  // between different tools (ext-apps#558). Each URI serves the same generic
251
251
  // template, which renders whichever structuredResult the tool delivers.
252
- const TOOL_URIS = [
252
+ // Every tool/view gets its own named app resource so it is distinguishable
253
+ // in MCP controllers by BOTH a unique URI and a unique human-readable name.
254
+ const TOOL_NAMES = [
253
255
  "analyze_post",
254
256
  "get_social_media",
255
257
  "discover_social_posts",
@@ -262,7 +264,15 @@ export function createMcpServer(makeClient) {
262
264
  "check_orchyn_credits",
263
265
  "buy_orchyn_credits",
264
266
  "understand_social_post",
265
- ].map(uiResource);
267
+ ];
268
+ // Human-readable resource name per tool (used in resources/list + tools/list).
269
+ function resourceName(tool) {
270
+ const readable = tool
271
+ .split("_")
272
+ .map((w) => (w ? w[0].toUpperCase() + w.slice(1) : w))
273
+ .join(" ");
274
+ return `Orchyn ${readable || "View"}`;
275
+ }
266
276
  // Build CSP resourceDomains from env so proxied thumbnails work
267
277
  const domains = [
268
278
  "https://*.tiktokcdn.com",
@@ -276,8 +286,9 @@ export function createMcpServer(makeClient) {
276
286
  if (apiUrl && apiUrl.trim()) {
277
287
  domains.push(apiUrl.trim().replace(/\/+$/, ""));
278
288
  }
279
- for (const uri of TOOL_URIS) {
280
- server.registerResource("Orchyn Interactive View", uri, { mimeType: RESOURCE_MIME_TYPE }, async () => {
289
+ for (const tool of TOOL_NAMES) {
290
+ const uri = uiResource(tool);
291
+ server.registerResource(resourceName(tool), uri, { mimeType: RESOURCE_MIME_TYPE }, async () => {
281
292
  // Computed per-request so the claude.ai sandbox origin is correct.
282
293
  const domain = await computeAppDomain();
283
294
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orchyn/mcp",
3
- "version": "1.16.0",
3
+ "version": "1.16.1",
4
4
  "description": "MCP server for orchyn - fetch, discover and understand TikTok/Instagram/YouTube/X/LinkedIn posts with AI (media metadata, niche discovery, hook & viral analysis)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",