MCPcopy Create free account
hub / github.com/ShipSecAI/studio / parseArgs

Function parseArgs

docker/mcp-stdio-proxy/server.mjs:14–26  ·  view source on GitHub ↗
(raw)

Source from the content-addressed store, hash-verified

12const __dirname = dirname(__filename);
13
14function parseArgs(raw) {
15 if (!raw) return [];
16 try {
17 const parsed = JSON.parse(raw);
18 if (Array.isArray(parsed)) return parsed.map(String);
19 } catch {
20 // fall through
21 }
22 return raw
23 .split(' ')
24 .map((entry) => entry.trim())
25 .filter(Boolean);
26}
27
28// Parse named servers config from JSON file or MCP_NAMED_SERVERS env var
29function parseNamedServersConfig() {

Callers 1

server.mjsFile · 0.70

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected