@orchyn/mcp 1.2.2 → 1.3.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.
- package/README.md +2 -2
- package/dist/index.js +21 -55
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -39,11 +39,11 @@ npx @orchyn/mcp login # one-time sign-in (Google)
|
|
|
39
39
|
| Tool | Credits | Description |
|
|
40
40
|
|------|---------|-------------|
|
|
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
|
-
| `analyze_video` | first free* | **Deprecated alias of `analyze_post`** — kept for backwards compatibility. Use `analyze_post` for new integrations. |
|
|
43
42
|
| `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
43
|
| `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
44
|
| `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
|
+
| `check_mcp_credits` | free | Check your MCP credit balance, billing URL and pack size — no cost. |
|
|
46
|
+
| `buy_mcp_credits` | free | Get a Stripe Checkout URL to buy a credit pack — open it to pay; credits are added automatically. No cost to call. Also at `https://orchyn.com/settings?tab=billing`. |
|
|
47
47
|
|
|
48
48
|
All tools require a connected orchyn account and are billed against your orchyn credit balance (`POST /billing/mcp-credits/checkout` tops up).
|
|
49
49
|
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* orchyn-mcp — MCP server exposing
|
|
3
|
+
* orchyn-mcp — MCP server exposing `analyze_post` (analyze any post: video/image/carousel) that runs
|
|
4
4
|
* AI video analysis through the user's orchyn account.
|
|
5
5
|
*
|
|
6
6
|
* Modes:
|
|
@@ -77,42 +77,6 @@ export function createServer(opts) {
|
|
|
77
77
|
return { content: [{ type: "text", text: `Analysis failed: ${msg}` }], isError: true };
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
|
-
server.registerTool("analyze_video", {
|
|
81
|
-
title: "Analyze Video",
|
|
82
|
-
description: "[Deprecated — use analyze_post] Alias of analyze_post — analyzes any post type.",
|
|
83
|
-
inputSchema: z
|
|
84
|
-
.object({
|
|
85
|
-
url: z.string().describe("Public post URL (TikTok/Instagram/YouTube/X or shortlinks)."),
|
|
86
|
-
})
|
|
87
|
-
.strict(),
|
|
88
|
-
}, async (args, extra) => {
|
|
89
|
-
let session;
|
|
90
|
-
if (extra.authInfo?.token && opts.resolveSession) {
|
|
91
|
-
session = opts.resolveSession(extra.authInfo.token);
|
|
92
|
-
}
|
|
93
|
-
const client = opts.makeClient(session);
|
|
94
|
-
const validation = validatePostUrl(args.url);
|
|
95
|
-
if (!validation.ok) {
|
|
96
|
-
return {
|
|
97
|
-
content: [{ type: "text", text: `Invalid url: ${validation.error}` }],
|
|
98
|
-
isError: true,
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
try {
|
|
102
|
-
const result = await runVideoAnalysis(client, validation.url);
|
|
103
|
-
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
104
|
-
}
|
|
105
|
-
catch (err) {
|
|
106
|
-
if (err instanceof OrchynError && err.paywall) {
|
|
107
|
-
return {
|
|
108
|
-
content: [{ type: "text", text: `Analysis blocked: ${formatPaywallError(err)}\n\nHTTP ${err.status}: ${err.message}` }],
|
|
109
|
-
isError: true,
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
113
|
-
return { content: [{ type: "text", text: `Analysis failed: ${msg}` }], isError: true };
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
80
|
server.registerTool("get_social_media", {
|
|
117
81
|
title: "Get Social Media",
|
|
118
82
|
description: "Fetch a social post's media from a TikTok, Instagram, YouTube or X/Twitter URL: " +
|
|
@@ -158,28 +122,30 @@ export function createServer(opts) {
|
|
|
158
122
|
return toolError("discover_social_posts failed", err);
|
|
159
123
|
}
|
|
160
124
|
});
|
|
161
|
-
server.registerTool("
|
|
162
|
-
title: "
|
|
163
|
-
description: "
|
|
164
|
-
inputSchema: z
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
125
|
+
server.registerTool("check_mcp_credits", {
|
|
126
|
+
title: "Check MCP Credits",
|
|
127
|
+
description: "Check your MCP credit balance, billing URL and pack size. No cost — call anytime to see remaining credits before running other tools.",
|
|
128
|
+
inputSchema: z.object({}).strict(),
|
|
129
|
+
}, async (_args, extra) => {
|
|
130
|
+
const client = makeClientFor(extra, opts);
|
|
131
|
+
try {
|
|
132
|
+
return toToolResult(await client.callTool("check_mcp_credits", {}));
|
|
133
|
+
}
|
|
134
|
+
catch (err) {
|
|
135
|
+
return toolError("check_mcp_credits failed", err);
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
server.registerTool("buy_mcp_credits", {
|
|
139
|
+
title: "Buy MCP Credits",
|
|
140
|
+
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.",
|
|
141
|
+
inputSchema: z.object({}).strict(),
|
|
142
|
+
}, async (_args, extra) => {
|
|
177
143
|
const client = makeClientFor(extra, opts);
|
|
178
144
|
try {
|
|
179
|
-
return toToolResult(await client.callTool("
|
|
145
|
+
return toToolResult(await client.callTool("buy_mcp_credits", {}));
|
|
180
146
|
}
|
|
181
147
|
catch (err) {
|
|
182
|
-
return toolError("
|
|
148
|
+
return toolError("buy_mcp_credits failed", err);
|
|
183
149
|
}
|
|
184
150
|
});
|
|
185
151
|
server.registerTool("understand_social_post", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orchyn/mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.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",
|