@orchyn/mcp 1.2.0 → 1.2.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.
Files changed (3) hide show
  1. package/README.md +24 -16
  2. package/dist/index.js +3 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -38,16 +38,25 @@ npx @orchyn/mcp login # one-time sign-in (Google)
38
38
 
39
39
  | Tool | Credits | Description |
40
40
  |------|---------|-------------|
41
- | `analyze_video` | first free | Start an AI analysis of a TikTok/Instagram/YouTube video; polls until done and returns the full analysis. |
42
- | `get_social_media` | 1 | Fetch a post's media from a URL: contentType, title, caption, author, stats, direct media URLs + inline thumbnail image. |
43
- | `discover_social_videos` | 2 | Find recent videos for a niche (YouTube search; TikTok/Instagram via Apify). |
44
- | `understand_social_post` | 10 | Import a post URL AND analyze it with multimodal AI over the actual video/images: summary, hook strength, viral triggers, format breakdown, variation ideas. |
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
+ | `analyze_video` | first free* | **Deprecated alias of `analyze_post`** kept for backwards compatibility. Use `analyze_post` for new integrations. |
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. |
45
+ | `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. |
45
46
 
46
- All tools require a connected orchyn account and are billed against your
47
- orchyn credit balance (`POST /billing/mcp-credits/checkout` tops up).
47
+ All tools require a connected orchyn account and are billed against your orchyn credit balance (`POST /billing/mcp-credits/checkout` tops up).
48
48
 
49
- The server starts the analysis on the orchyn backend, polls until the analysis
50
- finishes, and returns the full result (analysis, job metadata, cost) as JSON.
49
+ `*` `analyze_post`/`analyze_video` bill against **workspace** credits (first free grant); the other three bill against **per-user MCP** credits (never tied to an app/workspace).
50
+
51
+ ## Images in Claude / ChatGPT chat
52
+
53
+ Every tool that returns posts also renders **inline thumbnails** directly in the chat:
54
+
55
+ - `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.
58
+
59
+ > 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.
51
60
 
52
61
  ## Prerequisites
53
62
 
@@ -229,15 +238,14 @@ per the MCP 2025-03-26 spec):
229
238
  orchyn session (valid 1 hour)
230
239
  - every MCP RPC validates the Bearer token against the session map
231
240
 
232
- ## Supported video URLs
241
+ ## Supported URLs
233
242
 
234
243
  - TikTok: `tiktok.com/*`, `vm.tiktok.com/*` (and `www.`/`m.` subdomains)
235
- - Instagram: `instagram.com/*` (reels, posts), `instagr.am/*`
244
+ - Instagram: `instagram.com/*` (reels, posts, carousels), `instagr.am/*`
236
245
  - YouTube: `youtube.com/*` (including `/shorts/`), `youtu.be/*`, `m.youtube.com/*`
237
- - X/Twitter: `x.com/*`, `twitter.com/*` — supported by `get_social_media` and
238
- `understand_social_post` (`analyze_video` covers TikTok/Instagram/YouTube only)
246
+ - X/Twitter: `x.com/*`, `twitter.com/*`
239
247
 
240
- Other hosts are rejected by the tools.
248
+ All tools accept these hosts. `analyze_post` (and its `analyze_video` alias) additionally handles **image, carousel and slideshow** posts — not just video.
241
249
 
242
250
  ## Troubleshooting
243
251
 
@@ -245,9 +253,9 @@ Other hosts are rejected by the tools.
245
253
  `ORCHYN_ACCESS_TOKEN`.
246
254
  - **402 paywall / `insufficient MCP credits`**: your orchyn account is out of
247
255
  credits for this tool. Each call costs: `get_social_media` 1,
248
- `discover_social_videos` 2, `understand_social_post` 10, `analyze_video`
249
- first-call free. Top up via the orchyn dashboard billing page or
250
- `POST /billing/mcp-credits/checkout`.
256
+ `discover_social_videos` 2, `understand_social_post` 10, `analyze_post`/
257
+ `analyze_video` first-call free* (see Tools). Top up via the orchyn dashboard
258
+ billing page or `POST /billing/mcp-credits/checkout`.
251
259
  - **Expired refresh token**: the stored refresh token was rejected by the
252
260
  orchyn server. Run `npx @orchyn/mcp login` again to re-authenticate.
253
261
  - **`Could not reach the orchyn server`**: `ORCHYN_BASE_URL` is unreachable or
package/dist/index.js CHANGED
@@ -135,12 +135,14 @@ export function createServer(opts) {
135
135
  server.registerTool("discover_social_videos", {
136
136
  title: "Discover Social Videos",
137
137
  description: "Discover recent videos/posts for a niche. YouTube via search; TikTok & Instagram via Apify. " +
138
- "Consumes 2 orchyn credits.",
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.",
139
140
  inputSchema: z
140
141
  .object({
141
142
  niche: z.string().describe("Niche/topic, e.g. 'fitness'."),
142
143
  keywords: z.string().optional().describe("Optional extra keywords."),
143
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."),
144
146
  platform: z
145
147
  .enum(["youtube", "tiktok", "instagram", "any"])
146
148
  .optional()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orchyn/mcp",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
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",