@solongate/proxy 0.4.5 → 0.4.7
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/create.js +4 -3
- package/dist/index.js +30 -11
- package/dist/init.js +25 -7
- package/package.json +1 -1
package/dist/create.js
CHANGED
|
@@ -300,10 +300,11 @@ async function main() {
|
|
|
300
300
|
bEmpty();
|
|
301
301
|
log(` ${c.dim}\u251C${hr}\u2524${c.reset}`);
|
|
302
302
|
bEmpty();
|
|
303
|
-
bLine(`${c.yellow}Use with
|
|
303
|
+
bLine(`${c.yellow}Use with any MCP server:${c.reset}`);
|
|
304
304
|
bEmpty();
|
|
305
|
-
bLine(` ${c.cyan}$${c.reset} solongate-proxy -- npx @
|
|
306
|
-
bLine(` ${c.
|
|
305
|
+
bLine(` ${c.cyan}$${c.reset} solongate-proxy -- npx @modelcontextprotocol/server-filesystem .`);
|
|
306
|
+
bLine(` ${c.cyan}$${c.reset} solongate-proxy -- npx @playwright/mcp@latest`);
|
|
307
|
+
bLine(` ${c.dim}Wraps any MCP server or AI tool with SolonGate protection${c.reset}`);
|
|
307
308
|
bEmpty();
|
|
308
309
|
log(` ${c.dim}\u251C${hr}\u2524${c.reset}`);
|
|
309
310
|
bEmpty();
|
package/dist/index.js
CHANGED
|
@@ -187,7 +187,7 @@ function parseArgs(argv) {
|
|
|
187
187
|
}
|
|
188
188
|
if (upstreamArgs.length === 0) {
|
|
189
189
|
throw new Error(
|
|
190
|
-
"No upstream server command provided.\n\nUsage: solongate-proxy [options] -- <command> [args...]\n\nExamples:\n solongate-proxy -- node my-server.js\n solongate-proxy --policy restricted -- npx @
|
|
190
|
+
"No upstream server command provided.\n\nUsage: solongate-proxy [options] -- <command> [args...]\n\nExamples:\n solongate-proxy -- node my-server.js\n solongate-proxy --policy restricted -- npx @playwright/mcp@latest\n solongate-proxy --upstream-url http://localhost:3001/mcp\n solongate-proxy --config solongate.json\n"
|
|
191
191
|
);
|
|
192
192
|
}
|
|
193
193
|
const [command, ...commandArgs] = upstreamArgs;
|
|
@@ -775,14 +775,25 @@ async function main() {
|
|
|
775
775
|
console.error("");
|
|
776
776
|
console.error(` ${_c.dim}${_c.italic}Init Setup${_c.reset}`);
|
|
777
777
|
console.error("");
|
|
778
|
-
|
|
778
|
+
let configInfo = findConfigFile(options.configPath);
|
|
779
779
|
if (!configInfo) {
|
|
780
|
-
|
|
781
|
-
|
|
780
|
+
const starterConfig = {
|
|
781
|
+
mcpServers: {
|
|
782
|
+
"filesystem": {
|
|
783
|
+
command: "npx",
|
|
784
|
+
args: ["-y", "@modelcontextprotocol/server-filesystem", "."]
|
|
785
|
+
},
|
|
786
|
+
"playwright": {
|
|
787
|
+
command: "npx",
|
|
788
|
+
args: ["-y", "@playwright/mcp@latest"]
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
};
|
|
792
|
+
const starterPath = resolve2(".mcp.json");
|
|
793
|
+
writeFileSync2(starterPath, JSON.stringify(starterConfig, null, 2) + "\n");
|
|
794
|
+
console.error(" No MCP config found \u2014 created .mcp.json with starter servers.");
|
|
782
795
|
console.error("");
|
|
783
|
-
|
|
784
|
-
console.error(" Create a .mcp.json file first, or specify --config <path>");
|
|
785
|
-
process.exit(1);
|
|
796
|
+
configInfo = { path: starterPath, type: "mcp" };
|
|
786
797
|
}
|
|
787
798
|
console.error(` Config: ${configInfo.path}`);
|
|
788
799
|
console.error(` Type: ${configInfo.type === "claude-desktop" ? "Claude Desktop" : "MCP JSON"}`);
|
|
@@ -853,7 +864,14 @@ async function main() {
|
|
|
853
864
|
}
|
|
854
865
|
}
|
|
855
866
|
if (!apiKey || apiKey === "sg_live_your_key_here") {
|
|
856
|
-
|
|
867
|
+
if (options.all) {
|
|
868
|
+
apiKey = "sg_test_demo_init_key";
|
|
869
|
+
console.error(" No API key found \u2014 using demo test key.");
|
|
870
|
+
console.error(" For cloud features, set your key in .env or pass --api-key");
|
|
871
|
+
console.error("");
|
|
872
|
+
} else {
|
|
873
|
+
apiKey = await prompt(" Enter your SolonGate API key (from https://dashboard.solongate.com): ");
|
|
874
|
+
}
|
|
857
875
|
if (!apiKey) {
|
|
858
876
|
console.error(" API key is required. Get one at https://dashboard.solongate.com");
|
|
859
877
|
process.exit(1);
|
|
@@ -1802,10 +1820,11 @@ async function main3() {
|
|
|
1802
1820
|
bEmpty();
|
|
1803
1821
|
log4(` ${c2.dim}\u251C${hr}\u2524${c2.reset}`);
|
|
1804
1822
|
bEmpty();
|
|
1805
|
-
bLine(`${c2.yellow}Use with
|
|
1823
|
+
bLine(`${c2.yellow}Use with any MCP server:${c2.reset}`);
|
|
1806
1824
|
bEmpty();
|
|
1807
|
-
bLine(` ${c2.cyan}$${c2.reset} solongate-proxy -- npx @
|
|
1808
|
-
bLine(` ${c2.
|
|
1825
|
+
bLine(` ${c2.cyan}$${c2.reset} solongate-proxy -- npx @modelcontextprotocol/server-filesystem .`);
|
|
1826
|
+
bLine(` ${c2.cyan}$${c2.reset} solongate-proxy -- npx @playwright/mcp@latest`);
|
|
1827
|
+
bLine(` ${c2.dim}Wraps any MCP server or AI tool with SolonGate protection${c2.reset}`);
|
|
1809
1828
|
bEmpty();
|
|
1810
1829
|
log4(` ${c2.dim}\u251C${hr}\u2524${c2.reset}`);
|
|
1811
1830
|
bEmpty();
|
package/dist/init.js
CHANGED
|
@@ -476,14 +476,25 @@ async function main() {
|
|
|
476
476
|
console.error("");
|
|
477
477
|
console.error(` ${_c.dim}${_c.italic}Init Setup${_c.reset}`);
|
|
478
478
|
console.error("");
|
|
479
|
-
|
|
479
|
+
let configInfo = findConfigFile(options.configPath);
|
|
480
480
|
if (!configInfo) {
|
|
481
|
-
|
|
482
|
-
|
|
481
|
+
const starterConfig = {
|
|
482
|
+
mcpServers: {
|
|
483
|
+
"filesystem": {
|
|
484
|
+
command: "npx",
|
|
485
|
+
args: ["-y", "@modelcontextprotocol/server-filesystem", "."]
|
|
486
|
+
},
|
|
487
|
+
"playwright": {
|
|
488
|
+
command: "npx",
|
|
489
|
+
args: ["-y", "@playwright/mcp@latest"]
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
};
|
|
493
|
+
const starterPath = resolve(".mcp.json");
|
|
494
|
+
writeFileSync(starterPath, JSON.stringify(starterConfig, null, 2) + "\n");
|
|
495
|
+
console.error(" No MCP config found \u2014 created .mcp.json with starter servers.");
|
|
483
496
|
console.error("");
|
|
484
|
-
|
|
485
|
-
console.error(" Create a .mcp.json file first, or specify --config <path>");
|
|
486
|
-
process.exit(1);
|
|
497
|
+
configInfo = { path: starterPath, type: "mcp" };
|
|
487
498
|
}
|
|
488
499
|
console.error(` Config: ${configInfo.path}`);
|
|
489
500
|
console.error(` Type: ${configInfo.type === "claude-desktop" ? "Claude Desktop" : "MCP JSON"}`);
|
|
@@ -554,7 +565,14 @@ async function main() {
|
|
|
554
565
|
}
|
|
555
566
|
}
|
|
556
567
|
if (!apiKey || apiKey === "sg_live_your_key_here") {
|
|
557
|
-
|
|
568
|
+
if (options.all) {
|
|
569
|
+
apiKey = "sg_test_demo_init_key";
|
|
570
|
+
console.error(" No API key found \u2014 using demo test key.");
|
|
571
|
+
console.error(" For cloud features, set your key in .env or pass --api-key");
|
|
572
|
+
console.error("");
|
|
573
|
+
} else {
|
|
574
|
+
apiKey = await prompt(" Enter your SolonGate API key (from https://dashboard.solongate.com): ");
|
|
575
|
+
}
|
|
558
576
|
if (!apiKey) {
|
|
559
577
|
console.error(" API key is required. Get one at https://dashboard.solongate.com");
|
|
560
578
|
process.exit(1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solongate/proxy",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.7",
|
|
4
4
|
"description": "MCP security proxy — protect any MCP server with customizable policies, path/command constraints, rate limiting, and audit logging. Zero code changes required.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|