@orchyn/mcp 1.1.1 → 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/dist/index.js +7 -5
- package/package.json +1 -1
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
|
|
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
|
|
415
|
-
|
|
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 ${
|
|
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(
|
|
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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orchyn/mcp",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.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",
|