@opennous/mcp 0.8.9 → 0.10.1

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.
Files changed (4) hide show
  1. package/LICENSE +661 -0
  2. package/package.json +17 -8
  3. package/src/client.js +13 -2
  4. package/src/index.js +253 -573
package/package.json CHANGED
@@ -1,21 +1,30 @@
1
1
  {
2
2
  "name": "@opennous/mcp",
3
- "version": "0.8.9",
3
+ "version": "0.10.1",
4
4
  "description": "Nous MCP Server — GTM data infrastructure for agents.",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "nous-mcp": "src/index.js"
8
8
  },
9
9
  "main": "./src/index.js",
10
- "files": ["src"],
10
+ "files": [
11
+ "src"
12
+ ],
13
+ "keywords": [
14
+ "mcp",
15
+ "nous",
16
+ "memory",
17
+ "crm",
18
+ "gtm",
19
+ "agents"
20
+ ],
21
+ "dependencies": {
22
+ "@modelcontextprotocol/sdk": "^1.27.1",
23
+ "zod": "^3.23.8"
24
+ },
11
25
  "scripts": {
12
26
  "dev": "node --watch src/index.js",
13
27
  "start": "node src/index.js",
14
28
  "typecheck": "echo 'no ts in mcp — skipping'"
15
- },
16
- "keywords": ["mcp", "nous", "memory", "crm", "gtm", "agents"],
17
- "dependencies": {
18
- "@modelcontextprotocol/sdk": "^1.27.1",
19
- "zod": "^3.23.8"
20
29
  }
21
- }
30
+ }
package/src/client.js CHANGED
@@ -3,8 +3,19 @@
3
3
  * Thin HTTP wrapper that handles auth, workspace context, and error handling.
4
4
  */
5
5
 
6
- const API_URL = process.env.NOUS_API_URL || "https://api.opennous.cloud";
7
- const API_KEY = process.env.NOUS_API_KEY;
6
+ // Resolve an env var defensively — Claude Code plugins use ${user_config.X}
7
+ // substitution; when an optional userConfig field is left blank, the literal
8
+ // "${user_config.field}" string can leak through. Treat any value that looks
9
+ // like an unresolved substitution as missing.
10
+ function resolvedEnv(name) {
11
+ const v = process.env[name];
12
+ if (!v) return undefined;
13
+ if (v.includes("${")) return undefined; // unresolved substitution marker
14
+ return v;
15
+ }
16
+
17
+ const API_URL = resolvedEnv("NOUS_API_URL") || "https://api.opennous.cloud";
18
+ const API_KEY = resolvedEnv("NOUS_API_KEY");
8
19
 
9
20
  export function validateConfig() {
10
21
  if (!API_KEY) {