@orchyn/mcp 1.18.0 → 1.18.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.
@@ -72,4 +72,10 @@ export const TOOL_DEFINITIONS = [
72
72
  description: "Buy an MCP credit pack via Stripe Checkout. Returns a secure checkout URL — open it in your browser to pay. Credits are added automatically after payment. No cost to call.",
73
73
  inputSchema: z.object({}).strict(),
74
74
  },
75
+ {
76
+ name: "orchyn_login",
77
+ title: "Orchyn Login",
78
+ description: "Get a fresh login URL to re-authenticate your MCP session. Call this tool when you need to reconnect or when the session has expired. No cost to call.",
79
+ inputSchema: z.object({}).strict(),
80
+ },
75
81
  ];
@@ -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.17.7";
14
+ export const MCP_SERVER_VERSION = "1.18.1";
15
15
  /** MCP Apps extension identifier */
16
16
  const UI_EXTENSION = "io.modelcontextprotocol/ui";
17
17
  /** MIME type for MCP Apps HTML resources */
@@ -578,6 +578,24 @@ export function createMcpServer(makeClient) {
578
578
  return toolError("buy_orchyn_credits failed", err);
579
579
  }
580
580
  });
581
+ server.registerTool("orchyn_login", {
582
+ title: "Orchyn Login",
583
+ description: "Get a fresh login URL to re-authenticate your MCP session. Call this tool when you need to reconnect or when the session has expired. No cost to call.",
584
+ inputSchema: z.object({}).strict(),
585
+ }, async (_args, _extra) => {
586
+ const base = process.env.ORCHYN_BASE_URL || "https://api.orchyn.com";
587
+ const mcpUrl = process.env.MCP_SERVER_URL || "https://mcp.orchyn.com";
588
+ const redirect = `${mcpUrl}/auth/callback?state=new`;
589
+ const loginUrl = `${base}/auth/mcp-login?redirect=${encodeURIComponent(redirect)}`;
590
+ return {
591
+ content: [{ type: "text", text: JSON.stringify({
592
+ loginUrl,
593
+ message: "Open this URL in your browser to sign in. After authentication, your MCP session will be refreshed automatically."
594
+ }) }],
595
+ structuredContent: { loginUrl, message: "Open this URL in your browser to sign in." },
596
+ isError: false,
597
+ };
598
+ });
581
599
  server.registerTool("understand_social_post", {
582
600
  title: "Understand Social Post",
583
601
  description: "Import a social post URL AND understand it with multimodal AI over the actual video/images: " +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orchyn/mcp",
3
- "version": "1.18.0",
3
+ "version": "1.18.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",