@mcp-use/cli 2.12.6 → 2.13.0
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/commands/auth.d.ts.map +1 -1
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/index.cjs +40 -36
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +40 -36
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1123,12 +1123,12 @@ import {
|
|
|
1123
1123
|
|
|
1124
1124
|
// src/utils/config.ts
|
|
1125
1125
|
import { promises as fs7 } from "fs";
|
|
1126
|
-
import path3 from "path";
|
|
1127
1126
|
import os3 from "os";
|
|
1127
|
+
import path3 from "path";
|
|
1128
1128
|
var CONFIG_DIR = path3.join(os3.homedir(), ".mcp-use");
|
|
1129
1129
|
var CONFIG_FILE = path3.join(CONFIG_DIR, "config.json");
|
|
1130
1130
|
var DEFAULT_API_URL = process.env.MCP_API_URL ? process.env.MCP_API_URL.replace(/\/api\/v1$/, "") + "/api/v1" : "https://cloud.mcp-use.com/api/v1";
|
|
1131
|
-
var DEFAULT_WEB_URL = process.env.MCP_WEB_URL ? process.env.MCP_WEB_URL : "https://
|
|
1131
|
+
var DEFAULT_WEB_URL = process.env.MCP_WEB_URL ? process.env.MCP_WEB_URL : "https://manufact.com";
|
|
1132
1132
|
async function ensureConfigDir() {
|
|
1133
1133
|
try {
|
|
1134
1134
|
await fs7.mkdir(CONFIG_DIR, { recursive: true });
|
|
@@ -1505,14 +1505,19 @@ async function startCallbackServer(port, expectedState) {
|
|
|
1505
1505
|
const tokenPromise = new Promise((res) => {
|
|
1506
1506
|
tokenResolver = res;
|
|
1507
1507
|
});
|
|
1508
|
-
const server = createServer(
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1508
|
+
const server = createServer(
|
|
1509
|
+
{
|
|
1510
|
+
maxHeaderSize: 65536
|
|
1511
|
+
// 64KB - handle very long JWT tokens in URL (increased from default 8192)
|
|
1512
|
+
},
|
|
1513
|
+
(req, res) => {
|
|
1514
|
+
if (req.url?.startsWith("/callback")) {
|
|
1515
|
+
const url = new URL(req.url, `http://localhost:${port}`);
|
|
1516
|
+
const token = url.searchParams.get("token");
|
|
1517
|
+
const state = url.searchParams.get("state");
|
|
1518
|
+
if (state !== expectedState) {
|
|
1519
|
+
res.writeHead(400, { "Content-Type": "text/html" });
|
|
1520
|
+
res.end(`
|
|
1516
1521
|
<!DOCTYPE html>
|
|
1517
1522
|
<html>
|
|
1518
1523
|
<head>
|
|
@@ -1550,11 +1555,11 @@ async function startCallbackServer(port, expectedState) {
|
|
|
1550
1555
|
</body>
|
|
1551
1556
|
</html>
|
|
1552
1557
|
`);
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
+
return;
|
|
1559
|
+
}
|
|
1560
|
+
if (token && tokenResolver) {
|
|
1561
|
+
res.writeHead(200, { "Content-Type": "text/html" });
|
|
1562
|
+
res.end(`
|
|
1558
1563
|
<!DOCTYPE html>
|
|
1559
1564
|
<html>
|
|
1560
1565
|
<head>
|
|
@@ -1653,10 +1658,10 @@ async function startCallbackServer(port, expectedState) {
|
|
|
1653
1658
|
</body>
|
|
1654
1659
|
</html>
|
|
1655
1660
|
`);
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1661
|
+
tokenResolver(token);
|
|
1662
|
+
} else {
|
|
1663
|
+
res.writeHead(400, { "Content-Type": "text/html" });
|
|
1664
|
+
res.end(`
|
|
1660
1665
|
<!DOCTYPE html>
|
|
1661
1666
|
<html>
|
|
1662
1667
|
<head>
|
|
@@ -1732,9 +1737,10 @@ async function startCallbackServer(port, expectedState) {
|
|
|
1732
1737
|
</body>
|
|
1733
1738
|
</html>
|
|
1734
1739
|
`);
|
|
1740
|
+
}
|
|
1735
1741
|
}
|
|
1736
1742
|
}
|
|
1737
|
-
|
|
1743
|
+
);
|
|
1738
1744
|
server.listen(port, () => {
|
|
1739
1745
|
resolve({ server, token: tokenPromise });
|
|
1740
1746
|
});
|
|
@@ -1753,7 +1759,7 @@ async function loginCommand(options) {
|
|
|
1753
1759
|
}
|
|
1754
1760
|
return;
|
|
1755
1761
|
}
|
|
1756
|
-
console.log(source_default.cyan.bold("\u{1F510} Logging in to
|
|
1762
|
+
console.log(source_default.cyan.bold("\u{1F510} Logging in to Manufact cloud...\n"));
|
|
1757
1763
|
const state = crypto.randomBytes(32).toString("hex");
|
|
1758
1764
|
const port = await findAvailablePort();
|
|
1759
1765
|
const redirectUri = `http://localhost:${port}/callback`;
|
|
@@ -1878,8 +1884,8 @@ async function whoamiCommand() {
|
|
|
1878
1884
|
|
|
1879
1885
|
// src/commands/client.ts
|
|
1880
1886
|
import { Command } from "commander";
|
|
1881
|
-
import { getPackageVersion } from "mcp-use/server";
|
|
1882
1887
|
import { MCPClient } from "mcp-use/client";
|
|
1888
|
+
import { getPackageVersion } from "mcp-use/server";
|
|
1883
1889
|
import { createInterface } from "readline";
|
|
1884
1890
|
|
|
1885
1891
|
// src/utils/format.ts
|
|
@@ -2260,10 +2266,10 @@ function getCliClientInfo() {
|
|
|
2260
2266
|
description: "mcp-use CLI - Command-line interface for MCP servers",
|
|
2261
2267
|
icons: [
|
|
2262
2268
|
{
|
|
2263
|
-
src: "https://
|
|
2269
|
+
src: "https://manufact.com/logo.png"
|
|
2264
2270
|
}
|
|
2265
2271
|
],
|
|
2266
|
-
websiteUrl: "https://
|
|
2272
|
+
websiteUrl: "https://manufact.com"
|
|
2267
2273
|
};
|
|
2268
2274
|
}
|
|
2269
2275
|
async function connectCommand(urlOrCommand, options) {
|
|
@@ -3343,11 +3349,11 @@ async function displayDeploymentProgress(api, deployment) {
|
|
|
3343
3349
|
const mcpServerUrl = getMcpServerUrl(finalDeployment);
|
|
3344
3350
|
let dashboardUrl = null;
|
|
3345
3351
|
if (finalDeployment.serverSlug) {
|
|
3346
|
-
dashboardUrl = `https://
|
|
3352
|
+
dashboardUrl = `https://manufact.com/cloud/servers/${finalDeployment.serverSlug}`;
|
|
3347
3353
|
} else if (finalDeployment.serverId) {
|
|
3348
|
-
dashboardUrl = `https://
|
|
3354
|
+
dashboardUrl = `https://manufact.com/cloud/servers/${finalDeployment.serverId}`;
|
|
3349
3355
|
}
|
|
3350
|
-
const inspectorUrl = `https://inspector.
|
|
3356
|
+
const inspectorUrl = `https://inspector.manufact.com/inspector?autoConnect=${encodeURIComponent(
|
|
3351
3357
|
mcpServerUrl
|
|
3352
3358
|
)}`;
|
|
3353
3359
|
console.log(source_default.green.bold("\u2713 Deployment successful!\n"));
|
|
@@ -3563,7 +3569,7 @@ Opening browser to ${reason === "not_connected" ? "install" : "configure"} GitHu
|
|
|
3563
3569
|
source_default.yellow("\n\u26A0\uFE0F Unable to open GitHub installation automatically")
|
|
3564
3570
|
);
|
|
3565
3571
|
console.log(
|
|
3566
|
-
source_default.white("Please visit: ") + source_default.cyan("https://
|
|
3572
|
+
source_default.white("Please visit: ") + source_default.cyan("https://manufact.com/cloud/settings")
|
|
3567
3573
|
);
|
|
3568
3574
|
console.log(
|
|
3569
3575
|
source_default.gray("Then connect your GitHub account and try again.\n")
|
|
@@ -3607,7 +3613,7 @@ async function deployCommand(options) {
|
|
|
3607
3613
|
process.exit(0);
|
|
3608
3614
|
}
|
|
3609
3615
|
}
|
|
3610
|
-
console.log(source_default.cyan.bold("\u{1F680} Deploying to
|
|
3616
|
+
console.log(source_default.cyan.bold("\u{1F680} Deploying to Manufact cloud...\n"));
|
|
3611
3617
|
const isMcp = await isMcpProject(cwd);
|
|
3612
3618
|
if (!isMcp) {
|
|
3613
3619
|
console.log(
|
|
@@ -3751,9 +3757,7 @@ async function deployCommand(options) {
|
|
|
3751
3757
|
console.log(
|
|
3752
3758
|
source_default.gray("Please try connecting GitHub from the web UI:")
|
|
3753
3759
|
);
|
|
3754
|
-
console.log(
|
|
3755
|
-
source_default.cyan(" https://cloud.mcp-use.com/cloud/settings\n")
|
|
3756
|
-
);
|
|
3760
|
+
console.log(source_default.cyan(" https://manufact.com/cloud/settings\n"));
|
|
3757
3761
|
process.exit(1);
|
|
3758
3762
|
}
|
|
3759
3763
|
githubVerified = true;
|
|
@@ -3818,7 +3822,7 @@ async function deployCommand(options) {
|
|
|
3818
3822
|
console.log(source_default.gray("\nPlease ensure:"));
|
|
3819
3823
|
console.log(
|
|
3820
3824
|
source_default.cyan(
|
|
3821
|
-
" 1. You have connected GitHub at https://
|
|
3825
|
+
" 1. You have connected GitHub at https://manufact.com/cloud/settings"
|
|
3822
3826
|
)
|
|
3823
3827
|
);
|
|
3824
3828
|
console.log(
|
|
@@ -5641,7 +5645,7 @@ program.command("start").description("Start production server").option("-p, --pa
|
|
|
5641
5645
|
process.exit(1);
|
|
5642
5646
|
}
|
|
5643
5647
|
});
|
|
5644
|
-
program.command("login").description("Login to
|
|
5648
|
+
program.command("login").description("Login to Manufact cloud").action(async () => {
|
|
5645
5649
|
try {
|
|
5646
5650
|
await loginCommand();
|
|
5647
5651
|
process.exit(0);
|
|
@@ -5653,13 +5657,13 @@ program.command("login").description("Login to mcp-use cloud").action(async () =
|
|
|
5653
5657
|
process.exit(1);
|
|
5654
5658
|
}
|
|
5655
5659
|
});
|
|
5656
|
-
program.command("logout").description("Logout from
|
|
5660
|
+
program.command("logout").description("Logout from Manufact cloud").action(async () => {
|
|
5657
5661
|
await logoutCommand();
|
|
5658
5662
|
});
|
|
5659
5663
|
program.command("whoami").description("Show current user information").action(async () => {
|
|
5660
5664
|
await whoamiCommand();
|
|
5661
5665
|
});
|
|
5662
|
-
program.command("deploy").description("Deploy MCP server from GitHub to
|
|
5666
|
+
program.command("deploy").description("Deploy MCP server from GitHub to Manufact cloud").option("--open", "Open deployment in browser after successful deploy").option("--name <name>", "Custom deployment name").option("--port <port>", "Server port", "3000").option("--runtime <runtime>", "Runtime (node or python)").option(
|
|
5663
5667
|
"--new",
|
|
5664
5668
|
"Force creation of new deployment instead of reusing linked deployment"
|
|
5665
5669
|
).option(
|