@orchyn/mcp 1.1.0 → 1.1.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
@@ -53,22 +53,21 @@ finishes, and returns the full result (analysis, job metadata, cost) as JSON.
53
53
 
54
54
  - Node.js >= 18 (tested on Node 22)
55
55
  - An orchyn account (created automatically on first sign-in — Google sign-in
56
- via `orchyn-mcp login`; the dashboard is **not** required: the server
56
+ via `npx @orchyn/mcp login`; the dashboard is **not** required: the server
57
57
  auto-creates a default workspace + app for new accounts)
58
- - Access to an orchyn server (default `http://localhost:8080`, see `ORCHYN_BASE_URL`)
58
+ - Access to an orchyn server defaults to the cloud API
59
+ (`https://api.orchyn.com`); point `ORCHYN_BASE_URL` at your own deployment
60
+ for local development
59
61
 
60
62
  ## Quick start
61
63
 
62
64
  ```bash
63
- npm install
64
- npm run build
65
-
66
65
  # 1. Sign in with your orchyn account (Google sign-in opens in your browser)
67
66
  npx @orchyn/mcp login
68
67
  # or with email/password:
69
68
  npx @orchyn/mcp login --email you@example.com --password '...'
70
69
 
71
- # 2. Run the server
70
+ # 2. Add it to your MCP client (see install section above) — or run it manually:
72
71
  npx @orchyn/mcp # stdio (default; for Claude Desktop / Cursor)
73
72
  npx @orchyn/mcp --http # remote HTTP with OAuth (for OpenAI Agents SDK)
74
73
  ```
@@ -185,7 +184,7 @@ console.log(result.output);
185
184
  ```
186
185
 
187
186
  For a local stdio process with the Agents SDK, use `StdioMCPClient` (Python:
188
- `StdioMCPClient(command="npx", args=["orchyn-mcp"])`).
187
+ `StdioMCPClient(command="npx", args=["@orchyn/mcp"])`).
189
188
 
190
189
  ## Command line
191
190
 
@@ -202,7 +201,7 @@ orchyn-mcp --help Show help
202
201
 
203
202
  | Variable | Default | Description |
204
203
  |----------|---------|-------------|
205
- | `ORCHYN_BASE_URL` | `http://localhost:8080` | orchyn server base URL (trailing slash stripped) |
204
+ | `ORCHYN_BASE_URL` | `https://api.orchyn.com` | orchyn server base URL (trailing slash stripped) |
206
205
  | `ORCHYN_ACCESS_TOKEN` | — | orchyn JWT access token; takes priority over the credentials file |
207
206
  | `ORCHYN_CREDENTIALS_FILE` | `~/.config/orchyn-mcp/credentials.json` | token store path |
208
207
  | `ORCHYN_PUBLIC_URL` | `http://localhost:3457` | public base URL advertised in OAuth metadata (HTTP mode) |
@@ -235,17 +234,20 @@ per the MCP 2025-03-26 spec):
235
234
  - TikTok: `tiktok.com/*`, `vm.tiktok.com/*` (and `www.`/`m.` subdomains)
236
235
  - Instagram: `instagram.com/*` (reels, posts), `instagr.am/*`
237
236
  - 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)
238
239
 
239
- Other hosts are rejected by the tool.
240
+ Other hosts are rejected by the tools.
240
241
 
241
242
  ## Troubleshooting
242
243
 
243
244
  - **`Not authenticated with orchyn` / 401**: run `npx @orchyn/mcp login` or set
244
245
  `ORCHYN_ACCESS_TOKEN`.
245
- - **402 paywall (`Analysis blocked`)**: your orchyn account has no credits
246
- left. The error includes `reason`, `used`/`max`, and `cost`. Top up or check
247
- your usage in the orchyn dashboard. The first analysis is covered by the
248
- free grant.
246
+ - **402 paywall / `insufficient MCP credits`**: your orchyn account is out of
247
+ 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`.
249
251
  - **Expired refresh token**: the stored refresh token was rejected by the
250
252
  orchyn server. Run `npx @orchyn/mcp login` again to re-authenticate.
251
253
  - **`Could not reach the orchyn server`**: `ORCHYN_BASE_URL` is unreachable or
package/dist/config.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import path from "node:path";
2
2
  import os from "node:os";
3
- export const DEFAULT_BASE_URL = "http://localhost:8080";
3
+ export const DEFAULT_BASE_URL = "https://api.orchyn.com";
4
4
  export const DEFAULT_PUBLIC_URL = "http://localhost:3457";
5
5
  export const DEFAULT_PORT = 3457;
6
6
  export function stripTrailingSlash(url) {
package/dist/index.js CHANGED
@@ -408,11 +408,13 @@ export async function runLogin(opts) {
408
408
  process.stdout.write(`Signed in as ${session.user?.email ?? opts.email}. Credentials saved to ${auth.getCredentialsFile()}\n`);
409
409
  return;
410
410
  }
411
- // Browser flow with a loopback listener.
411
+ // Browser flow: open the orchyn-branded login page (Google + email/password)
412
+ // at /auth/mcp-login?redirect=<loopback callback>. Both paths converge on a
413
+ // single ?code= redirect the listener exchanges for JWTs.
412
414
  const callbackPath = "/oauth/callback";
413
415
  const callbackUrl = `http://127.0.0.1:${opts.port}${callbackPath}`;
414
- const googleStart = new URL("/auth/google/start", baseUrl);
415
- googleStart.searchParams.set("redirect", callbackUrl);
416
+ const mcpLoginUrl = new URL("/auth/mcp-login", baseUrl);
417
+ mcpLoginUrl.searchParams.set("redirect", callbackUrl);
416
418
  const listener = http.createServer((req, res) => {
417
419
  const reqUrl = new URL(req.url ?? "/", "http://127.0.0.1");
418
420
  if (reqUrl.pathname === callbackPath && req.method === "GET") {
@@ -448,10 +450,10 @@ export async function runLogin(opts) {
448
450
  listener.once("error", reject);
449
451
  listener.listen(opts.port, "127.0.0.1", resolve);
450
452
  });
451
- process.stdout.write(`Open this URL in your browser to sign in with your orchyn account:\n\n ${googleStart.toString()}\n\n`);
453
+ process.stdout.write(`Open this URL in your browser to sign in with your orchyn account:\n\n ${mcpLoginUrl.toString()}\n\n`);
452
454
  try {
453
455
  const { default: open } = await import("open");
454
- await open(googleStart.toString());
456
+ await open(mcpLoginUrl.toString());
455
457
  }
456
458
  catch {
457
459
  process.stdout.write("Could not open the browser automatically. Copy the URL above into your browser.\n");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orchyn/mcp",
3
- "version": "1.1.0",
4
- "description": "MCP server for orchyn - AI video analysis for TikTok, Instagram, and YouTube links",
3
+ "version": "1.1.2",
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",
7
7
  "files": [