@systemdox/mcp-server 0.1.24 → 0.1.25

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/cli.js CHANGED
@@ -19,12 +19,13 @@ function requireHttpsApiUrl(apiUrl) {
19
19
  `SYSTEMDOX_API_URL is not a valid URL: ${apiUrl}`
20
20
  );
21
21
  }
22
- if (parsed.protocol !== "https:") {
23
- throw new Error(
24
- `SYSTEMDOX_API_URL must use https:// \u2014 refusing to send the API key over ${parsed.protocol}// in cleartext. Got: ${apiUrl}`
25
- );
22
+ if (parsed.protocol === "https:") return apiUrl;
23
+ if (parsed.protocol === "http:" && LOOPBACK_HOSTS.has(parsed.hostname)) {
24
+ return apiUrl;
26
25
  }
27
- return apiUrl;
26
+ throw new Error(
27
+ `SYSTEMDOX_API_URL must use https:// \u2014 refusing to send the API key over ${parsed.protocol}// in cleartext. Got: ${apiUrl}`
28
+ );
28
29
  }
29
30
  function loadConfig() {
30
31
  const apiKey = process.env.SYSTEMDOX_API_KEY;
@@ -43,11 +44,12 @@ function loadConfig() {
43
44
  defaultOrg: process.env.SYSTEMDOX_DEFAULT_ORG
44
45
  };
45
46
  }
46
- var API_URL_DEFAULT;
47
+ var API_URL_DEFAULT, LOOPBACK_HOSTS;
47
48
  var init_config = __esm({
48
49
  "src/lib/config.ts"() {
49
50
  "use strict";
50
51
  API_URL_DEFAULT = "https://api.puglieseweb.com/systemdox";
52
+ LOOPBACK_HOSTS = /* @__PURE__ */ new Set(["localhost", "127.0.0.1", "[::1]", "::1"]);
51
53
  }
52
54
  });
53
55
 
@@ -2000,7 +2002,7 @@ var init_server = __esm({
2000
2002
  init_create_project_rule();
2001
2003
  init_get_prompt_templates();
2002
2004
  init_create_prompt_template();
2003
- SERVER_VERSION = true ? "0.1.24" : "0.0.0-dev";
2005
+ SERVER_VERSION = true ? "0.1.25" : "0.0.0-dev";
2004
2006
  }
2005
2007
  });
2006
2008
 
package/dist/http.js CHANGED
@@ -1825,7 +1825,7 @@ function registerCreatePromptTemplate(server, apiClient) {
1825
1825
  }
1826
1826
 
1827
1827
  // src/server.ts
1828
- var SERVER_VERSION = true ? "0.1.24" : "0.0.0-dev";
1828
+ var SERVER_VERSION = true ? "0.1.25" : "0.0.0-dev";
1829
1829
  function createServer(apiClient) {
1830
1830
  const server = new McpServer({
1831
1831
  name: "systemdox-mcp-server",
package/dist/index.js CHANGED
@@ -5,6 +5,7 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
5
5
 
6
6
  // src/lib/config.ts
7
7
  var API_URL_DEFAULT = "https://api.puglieseweb.com/systemdox";
8
+ var LOOPBACK_HOSTS = /* @__PURE__ */ new Set(["localhost", "127.0.0.1", "[::1]", "::1"]);
8
9
  function requireHttpsApiUrl(apiUrl) {
9
10
  let parsed;
10
11
  try {
@@ -14,12 +15,13 @@ function requireHttpsApiUrl(apiUrl) {
14
15
  `SYSTEMDOX_API_URL is not a valid URL: ${apiUrl}`
15
16
  );
16
17
  }
17
- if (parsed.protocol !== "https:") {
18
- throw new Error(
19
- `SYSTEMDOX_API_URL must use https:// \u2014 refusing to send the API key over ${parsed.protocol}// in cleartext. Got: ${apiUrl}`
20
- );
18
+ if (parsed.protocol === "https:") return apiUrl;
19
+ if (parsed.protocol === "http:" && LOOPBACK_HOSTS.has(parsed.hostname)) {
20
+ return apiUrl;
21
21
  }
22
- return apiUrl;
22
+ throw new Error(
23
+ `SYSTEMDOX_API_URL must use https:// \u2014 refusing to send the API key over ${parsed.protocol}// in cleartext. Got: ${apiUrl}`
24
+ );
23
25
  }
24
26
  function loadConfig() {
25
27
  const apiKey = process.env.SYSTEMDOX_API_KEY;
@@ -1826,7 +1828,7 @@ function registerCreatePromptTemplate(server2, apiClient2) {
1826
1828
  }
1827
1829
 
1828
1830
  // src/server.ts
1829
- var SERVER_VERSION = true ? "0.1.24" : "0.0.0-dev";
1831
+ var SERVER_VERSION = true ? "0.1.25" : "0.0.0-dev";
1830
1832
  function createServer(apiClient2) {
1831
1833
  const server2 = new McpServer({
1832
1834
  name: "systemdox-mcp-server",
@@ -9,6 +9,10 @@ export declare const API_URL_DEFAULT = "https://api.puglieseweb.com/systemdox";
9
9
  * Fail closed on a non-https API URL. The API key travels as a bearer token in
10
10
  * the Authorization header on every request, so an http:// URL would leak it in
11
11
  * cleartext. Reject rather than downgrade. Returns the URL unchanged when valid.
12
+ *
13
+ * http://localhost is allowed: see LOOPBACK_HOSTS. Local development and the
14
+ * MCP release gate (scripts/mcp-release-gate.mjs, which boots the published
15
+ * server against an http stub on 127.0.0.1) both depend on it.
12
16
  */
13
17
  export declare function requireHttpsApiUrl(apiUrl: string): string;
14
18
  export declare function loadConfig(): ServerConfig;
@@ -2,6 +2,7 @@
2
2
 
3
3
  // src/lib/config.ts
4
4
  var API_URL_DEFAULT = "https://api.puglieseweb.com/systemdox";
5
+ var LOOPBACK_HOSTS = /* @__PURE__ */ new Set(["localhost", "127.0.0.1", "[::1]", "::1"]);
5
6
  function requireHttpsApiUrl(apiUrl) {
6
7
  let parsed;
7
8
  try {
@@ -11,12 +12,13 @@ function requireHttpsApiUrl(apiUrl) {
11
12
  `SYSTEMDOX_API_URL is not a valid URL: ${apiUrl}`
12
13
  );
13
14
  }
14
- if (parsed.protocol !== "https:") {
15
- throw new Error(
16
- `SYSTEMDOX_API_URL must use https:// \u2014 refusing to send the API key over ${parsed.protocol}// in cleartext. Got: ${apiUrl}`
17
- );
15
+ if (parsed.protocol === "https:") return apiUrl;
16
+ if (parsed.protocol === "http:" && LOOPBACK_HOSTS.has(parsed.hostname)) {
17
+ return apiUrl;
18
18
  }
19
- return apiUrl;
19
+ throw new Error(
20
+ `SYSTEMDOX_API_URL must use https:// \u2014 refusing to send the API key over ${parsed.protocol}// in cleartext. Got: ${apiUrl}`
21
+ );
20
22
  }
21
23
  function loadConfig() {
22
24
  const apiKey = process.env.SYSTEMDOX_API_KEY;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@systemdox/mcp-server",
3
- "version": "0.1.24",
3
+ "version": "0.1.25",
4
4
  "mcpName": "io.github.puglieseweb/systemdox",
5
5
  "type": "module",
6
6
  "description": "Give AI coding agents your architecture context over MCP — checks, specs, ADRs, project rules, and docs from SystemDox, delivered at write time",