@orchyn/mcp 1.2.0 → 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 +25 -16
- package/dist/index.js +28 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -38,16 +38,26 @@ npx @orchyn/mcp login # one-time sign-in (Google)
|
|
|
38
38
|
|
|
39
39
|
| Tool | Credits | Description |
|
|
40
40
|
|------|---------|-------------|
|
|
41
|
-
| `
|
|
42
|
-
| `
|
|
43
|
-
| `
|
|
44
|
-
| `
|
|
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_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. |
|
|
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. |
|
|
45
47
|
|
|
46
|
-
All tools require a connected orchyn account and are billed against your
|
|
47
|
-
orchyn credit balance (`POST /billing/mcp-credits/checkout` tops up).
|
|
48
|
+
All tools require a connected orchyn account and are billed against your orchyn credit balance (`POST /billing/mcp-credits/checkout` tops up).
|
|
48
49
|
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
`*` `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).
|
|
51
|
+
|
|
52
|
+
## Images in Claude / ChatGPT chat
|
|
53
|
+
|
|
54
|
+
Every tool that returns posts also renders **inline thumbnails** directly in the chat:
|
|
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.
|
|
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.
|
|
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.
|
|
51
61
|
|
|
52
62
|
## Prerequisites
|
|
53
63
|
|
|
@@ -229,15 +239,14 @@ per the MCP 2025-03-26 spec):
|
|
|
229
239
|
orchyn session (valid 1 hour)
|
|
230
240
|
- every MCP RPC validates the Bearer token against the session map
|
|
231
241
|
|
|
232
|
-
## Supported
|
|
242
|
+
## Supported URLs
|
|
233
243
|
|
|
234
244
|
- TikTok: `tiktok.com/*`, `vm.tiktok.com/*` (and `www.`/`m.` subdomains)
|
|
235
|
-
- Instagram: `instagram.com/*` (reels, posts), `instagr.am/*`
|
|
245
|
+
- Instagram: `instagram.com/*` (reels, posts, carousels), `instagr.am/*`
|
|
236
246
|
- YouTube: `youtube.com/*` (including `/shorts/`), `youtu.be/*`, `m.youtube.com/*`
|
|
237
|
-
- X/Twitter: `x.com/*`, `twitter.com/*`
|
|
238
|
-
`understand_social_post` (`analyze_video` covers TikTok/Instagram/YouTube only)
|
|
247
|
+
- X/Twitter: `x.com/*`, `twitter.com/*`
|
|
239
248
|
|
|
240
|
-
|
|
249
|
+
All tools accept these hosts. `analyze_post` (and its `analyze_video` alias) additionally handles **image, carousel and slideshow** posts — not just video.
|
|
241
250
|
|
|
242
251
|
## Troubleshooting
|
|
243
252
|
|
|
@@ -245,9 +254,9 @@ Other hosts are rejected by the tools.
|
|
|
245
254
|
`ORCHYN_ACCESS_TOKEN`.
|
|
246
255
|
- **402 paywall / `insufficient MCP credits`**: your orchyn account is out of
|
|
247
256
|
credits for this tool. Each call costs: `get_social_media` 1,
|
|
248
|
-
`discover_social_videos` 2, `understand_social_post` 10, `
|
|
249
|
-
first-call free. Top up via the orchyn dashboard
|
|
250
|
-
`POST /billing/mcp-credits/checkout`.
|
|
257
|
+
`discover_social_videos` 2, `understand_social_post` 10, `analyze_post`/
|
|
258
|
+
`analyze_video` first-call free* (see Tools). Top up via the orchyn dashboard
|
|
259
|
+
billing page or `POST /billing/mcp-credits/checkout`.
|
|
251
260
|
- **Expired refresh token**: the stored refresh token was rejected by the
|
|
252
261
|
orchyn server. Run `npx @orchyn/mcp login` again to re-authenticate.
|
|
253
262
|
- **`Could not reach the orchyn server`**: `ORCHYN_BASE_URL` is unreachable or
|
package/dist/index.js
CHANGED
|
@@ -132,15 +132,41 @@ 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: "
|
|
138
|
-
"Consumes 2 orchyn credits.",
|
|
163
|
+
description: "[Deprecated — use discover_social_posts] Alias of discover_social_posts.",
|
|
139
164
|
inputSchema: z
|
|
140
165
|
.object({
|
|
141
166
|
niche: z.string().describe("Niche/topic, e.g. 'fitness'."),
|
|
142
167
|
keywords: z.string().optional().describe("Optional extra keywords."),
|
|
143
168
|
limit: z.number().int().optional().describe("Max results (default 6)."),
|
|
169
|
+
offset: z.number().int().optional().describe("Skip first N results — for 'next' pagination."),
|
|
144
170
|
platform: z
|
|
145
171
|
.enum(["youtube", "tiktok", "instagram", "any"])
|
|
146
172
|
.optional()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orchyn/mcp",
|
|
3
|
-
"version": "1.2.
|
|
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",
|