@orchyn/mcp 1.2.1 → 1.2.2

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 CHANGED
@@ -41,7 +41,8 @@ npx @orchyn/mcp login # one-time sign-in (Google)
41
41
  | `analyze_post` | first free* | **Preferred.** Analyze any post (video, image, carousel/slideshow) from a TikTok/Instagram/YouTube/X-Twitter URL — imports the media and runs AI analysis over the actual content (video frames, carousel images, caption). Returns a `jobId` to poll via `GET /ai/analyze-post`. *First analysis free per workspace via the dashboard free grant.* |
42
42
  | `analyze_video` | first free* | **Deprecated alias of `analyze_post`** — kept for backwards compatibility. Use `analyze_post` for new integrations. |
43
43
  | `get_social_media` | 1 | Fetch a post's media from a URL: `contentType` (video/image/carousel/slideshow), title, caption, author, stats, direct media URLs **+ inline thumbnail image in chat**. |
44
- | `discover_social_videos` | 2 | Find recent posts for a niche (YouTube via `yt-dlp` search; TikTok/Instagram via Apify). Returns up to 6 posts with stats **and inline thumbnails** — see *Images in chat* below. |
44
+ | `discover_social_posts` | 2 | **Preferred.** Find recent posts (video/image/carousel/slideshow) for a niche (YouTube via `yt-dlp` search; TikTok/Instagram via Apify). Each post includes title/caption, views/likes/comments, author, `externalUrl` + **inline thumbnails (4 at a time)** — see *Images in chat* below. Supports `limit`/`offset` pagination (“next”). |
45
+ | `discover_social_videos` | 2 | **Deprecated alias of `discover_social_posts`** — kept for backwards compatibility. |
45
46
  | `understand_social_post` | 10 | Import a post URL **and** analyze it with multimodal AI over the actual video/images: factual `whatHappens` description, hook strength, viral triggers, format breakdown, variation ideas, suggested hook/hashtags. Includes inline thumbnails. |
46
47
 
47
48
  All tools require a connected orchyn account and are billed against your orchyn credit balance (`POST /billing/mcp-credits/checkout` tops up).
@@ -53,8 +54,8 @@ All tools require a connected orchyn account and are billed against your orchyn
53
54
  Every tool that returns posts also renders **inline thumbnails** directly in the chat:
54
55
 
55
56
  - `get_social_media` / `understand_social_post` / `analyze_post` — up to 4 frames inline (poster + carousel slides). The full `mediaItems[].preview_url` + `thumbnailUrl` stay in `structuredContent` for the model to reason over.
56
- - `discover_social_videos` — each discovered post shows its thumbnail inline (up to 4 of the 6 results at once). Say **"next"** or **"show more"** — Claude will re-call `discover_social_videos` with a larger `limit` or paginate. Say **"analyze the 2nd one"** — Claude calls `analyze_post` or `understand_social_post` on that URL.
57
- - **Batch analysis** — ask "analyze all 4" or "understand these 3 in batch" and Claude will call `analyze_post`/`understand_social_post` once per URL in parallel and summarize. For large batches, `discover_social_videos` + a follow-up `analyze_post` per URL is the recommended flow.
57
+ - `discover_social_posts` — each discovered post shows its thumbnail inline (up to 4 of the 6 results at once) together with its title/caption + views/likes/comments. Say **"next"** or **"show more"** — Claude will re-call `discover_social_posts` with `offset` pagination. Say **"analyze the 2nd one"** — Claude calls `analyze_post` or `understand_social_post` on that URL.
58
+ - **Batch analysis** — ask "analyze all 4" or "understand these 3 in batch" and Claude will call `analyze_post`/`understand_social_post` once per URL in parallel and summarize. For large batches, `discover_social_posts` + a follow-up `analyze_post` per URL is the recommended flow.
58
59
 
59
60
  > The backend's `analyze_post` now watches the **actual video/images** (direct MP4, YouTube `fileUri`, or 6 carousel frames via Gemini multimodal) — not just the caption. The analysis includes a `whatHappens` field describing exactly what is seen.
60
61
 
package/dist/index.js CHANGED
@@ -132,11 +132,35 @@ export function createServer(opts) {
132
132
  return toolError("get_social_media failed", err);
133
133
  }
134
134
  });
135
+ server.registerTool("discover_social_posts", {
136
+ title: "Discover Social Posts",
137
+ description: "Discover recent posts (video, image, carousel, slideshow) for a niche. YouTube via search; TikTok & Instagram via Apify. " +
138
+ "Each post includes title/caption, thumbnailUrl, externalUrl, views/likes/comments and inline thumbnails (up to 4) so they show in chat. " +
139
+ "Say \"next\" to paginate (offset), or \"analyze the 2nd one\" / \"analyze all\" for batch analysis. Consumes 2 orchyn credits.",
140
+ inputSchema: z
141
+ .object({
142
+ niche: z.string().describe("Niche/topic, e.g. 'fitness'."),
143
+ keywords: z.string().optional().describe("Optional extra keywords."),
144
+ limit: z.number().int().optional().describe("Max results (default 6)."),
145
+ offset: z.number().int().optional().describe("Skip first N results — for 'next' pagination."),
146
+ platform: z
147
+ .enum(["youtube", "tiktok", "instagram", "any"])
148
+ .optional()
149
+ .describe("Platform to search (default youtube)."),
150
+ })
151
+ .strict(),
152
+ }, async (args, extra) => {
153
+ const client = makeClientFor(extra, opts);
154
+ try {
155
+ return toToolResult(await client.callTool("discover_social_posts", { ...args }));
156
+ }
157
+ catch (err) {
158
+ return toolError("discover_social_posts failed", err);
159
+ }
160
+ });
135
161
  server.registerTool("discover_social_videos", {
136
162
  title: "Discover Social Videos",
137
- description: "Discover recent videos/posts for a niche. YouTube via search; TikTok & Instagram via Apify. " +
138
- "Returns inline thumbnails (up to 4) so they show in chat. Say \"next\" to paginate (offset), " +
139
- "or \"analyze the 2nd one\" / \"analyze all\" for batch analysis. Consumes 2 orchyn credits.",
163
+ description: "[Deprecated use discover_social_posts] Alias of discover_social_posts.",
140
164
  inputSchema: z
141
165
  .object({
142
166
  niche: z.string().describe("Niche/topic, e.g. 'fitness'."),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orchyn/mcp",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "MCP server for orchyn - fetch, discover and understand TikTok/Instagram/YouTube/X posts with AI (media metadata, niche discovery, hook & viral analysis)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",