@solongate/proxy 0.1.10 → 0.1.12

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 CHANGED
@@ -177,7 +177,6 @@ function createProject(dir, name, _policy) {
177
177
  join(dir, "src", "index.ts"),
178
178
  `#!/usr/bin/env node
179
179
 
180
- // MCP uses stdout for JSON-RPC \u2014 redirect console to stderr
181
180
  console.log = (...args: unknown[]) => {
182
181
  process.stderr.write(args.map(String).join(' ') + '\\n');
183
182
  };
@@ -186,35 +185,20 @@ import { SecureMcpServer } from '@solongate/sdk';
186
185
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
187
186
  import { z } from 'zod';
188
187
 
189
- // Create a secure MCP server (API key from SOLONGATE_API_KEY env var)
190
188
  const server = new SecureMcpServer({
191
189
  name: '${name}',
192
190
  version: '0.1.0',
193
191
  });
194
192
 
195
- // \u2500\u2500 Register your tools below \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
196
-
197
193
  server.tool(
198
194
  'hello',
199
195
  'Say hello to someone',
200
196
  { name: z.string().describe('Name of the person to greet') },
201
- async ({ name }) => ({
197
+ async ({ name }: { name: string }) => ({
202
198
  content: [{ type: 'text', text: \`Hello, \${name}! Welcome to ${name}.\` }],
203
199
  }),
204
200
  );
205
201
 
206
- // Example: Add more tools here
207
- // server.tool(
208
- // 'read_data',
209
- // 'Read data from a source',
210
- // { query: z.string().describe('What to read') },
211
- // async ({ query }) => ({
212
- // content: [{ type: 'text', text: \`Result for: \${query}\` }],
213
- // }),
214
- // );
215
-
216
- // \u2500\u2500 Start the server \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
217
-
218
202
  const transport = new StdioServerTransport();
219
203
  await server.connect(transport);
220
204
  console.log('${name} is running');
@@ -229,7 +213,7 @@ console.log('${name} is running');
229
213
  command: "node",
230
214
  args: ["dist/index.js"],
231
215
  env: {
232
- SOLONGATE_API_KEY: "sg_test_e4460d32_replace_with_your_key"
216
+ SOLONGATE_API_KEY: "sg_test_YOUR_KEY_HERE"
233
217
  }
234
218
  }
235
219
  }
@@ -294,6 +278,14 @@ async function main() {
294
278
  bEmpty();
295
279
  bLine(`${c.dim}https://dashboard.solongate.com/api-keys/${c.reset}`);
296
280
  bEmpty();
281
+ log(` ${c.dim}\u251C${hr}\u2524${c.reset}`);
282
+ bEmpty();
283
+ bLine(`${c.yellow}Use with Claude Code:${c.reset}`);
284
+ bEmpty();
285
+ bLine(` ${c.dim}1.${c.reset} Open the project folder in Claude Code`);
286
+ bLine(` ${c.dim}2.${c.reset} .mcp.json is auto-detected on startup`);
287
+ bLine(` ${c.dim}3.${c.reset} Restart Claude Code if already open`);
288
+ bEmpty();
297
289
  log(` ${c.dim}\u2570${hr}\u256F${c.reset}`);
298
290
  log("");
299
291
  }
package/dist/index.js CHANGED
@@ -838,7 +838,6 @@ function createProject(dir, name, _policy) {
838
838
  join2(dir, "src", "index.ts"),
839
839
  `#!/usr/bin/env node
840
840
 
841
- // MCP uses stdout for JSON-RPC \u2014 redirect console to stderr
842
841
  console.log = (...args: unknown[]) => {
843
842
  process.stderr.write(args.map(String).join(' ') + '\\n');
844
843
  };
@@ -847,35 +846,20 @@ import { SecureMcpServer } from '@solongate/sdk';
847
846
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
848
847
  import { z } from 'zod';
849
848
 
850
- // Create a secure MCP server (API key from SOLONGATE_API_KEY env var)
851
849
  const server = new SecureMcpServer({
852
850
  name: '${name}',
853
851
  version: '0.1.0',
854
852
  });
855
853
 
856
- // \u2500\u2500 Register your tools below \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
857
-
858
854
  server.tool(
859
855
  'hello',
860
856
  'Say hello to someone',
861
857
  { name: z.string().describe('Name of the person to greet') },
862
- async ({ name }) => ({
858
+ async ({ name }: { name: string }) => ({
863
859
  content: [{ type: 'text', text: \`Hello, \${name}! Welcome to ${name}.\` }],
864
860
  }),
865
861
  );
866
862
 
867
- // Example: Add more tools here
868
- // server.tool(
869
- // 'read_data',
870
- // 'Read data from a source',
871
- // { query: z.string().describe('What to read') },
872
- // async ({ query }) => ({
873
- // content: [{ type: 'text', text: \`Result for: \${query}\` }],
874
- // }),
875
- // );
876
-
877
- // \u2500\u2500 Start the server \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
878
-
879
863
  const transport = new StdioServerTransport();
880
864
  await server.connect(transport);
881
865
  console.log('${name} is running');
@@ -890,7 +874,7 @@ console.log('${name} is running');
890
874
  command: "node",
891
875
  args: ["dist/index.js"],
892
876
  env: {
893
- SOLONGATE_API_KEY: "sg_test_e4460d32_replace_with_your_key"
877
+ SOLONGATE_API_KEY: "sg_test_YOUR_KEY_HERE"
894
878
  }
895
879
  }
896
880
  }
@@ -955,6 +939,14 @@ async function main3() {
955
939
  bEmpty();
956
940
  bLine(`${c2.dim}https://dashboard.solongate.com/api-keys/${c2.reset}`);
957
941
  bEmpty();
942
+ log3(` ${c2.dim}\u251C${hr}\u2524${c2.reset}`);
943
+ bEmpty();
944
+ bLine(`${c2.yellow}Use with Claude Code:${c2.reset}`);
945
+ bEmpty();
946
+ bLine(` ${c2.dim}1.${c2.reset} Open the project folder in Claude Code`);
947
+ bLine(` ${c2.dim}2.${c2.reset} .mcp.json is auto-detected on startup`);
948
+ bLine(` ${c2.dim}3.${c2.reset} Restart Claude Code if already open`);
949
+ bEmpty();
958
950
  log3(` ${c2.dim}\u2570${hr}\u256F${c2.reset}`);
959
951
  log3("");
960
952
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solongate/proxy",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "description": "MCP security proxy — protect any MCP server with policies, input validation, rate limiting, and audit logging. Zero code changes required.",
5
5
  "type": "module",
6
6
  "bin": {