@intangle/mcp-server 2.1.0 → 2.1.2

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 (3) hide show
  1. package/dist/index.js +21 -1
  2. package/index.ts +25 -3
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -18,7 +18,21 @@ config({ path: ".env.local", quiet: true });
18
18
  const API_BASE_URL = process.env.NEXT_APP_URL || "https://intangle.app";
19
19
  const MCP_API_KEY = process.env.MCP_API_KEY;
20
20
  // No space configuration needed - AI discovers spaces dynamically
21
+ // Debug logging
22
+ import { appendFileSync } from "fs";
23
+ const DEBUG_LOG = "/tmp/intangle-mcp-debug.log";
24
+ function log(msg) {
25
+ try {
26
+ appendFileSync(DEBUG_LOG, `${new Date().toISOString()}: ${msg}\n`);
27
+ }
28
+ catch (e) { }
29
+ }
30
+ log("--- Server Starting ---");
31
+ log(`CWD: ${process.cwd()}`);
32
+ log(`Has API Key: ${!!MCP_API_KEY}`);
33
+ log(`Node Version: ${process.version}`);
21
34
  if (!MCP_API_KEY) {
35
+ log("Error: MCP_API_KEY environment variable is required");
22
36
  console.error("Error: MCP_API_KEY environment variable is required");
23
37
  console.error("Please set your Intangle API key in the Claude Desktop configuration");
24
38
  process.exit(1);
@@ -26,7 +40,13 @@ if (!MCP_API_KEY) {
26
40
  console.log("Intangle MCP Server starting - connecting to", API_BASE_URL);
27
41
  // Version checking - automatically read from package.json
28
42
  const __dirname = dirname(fileURLToPath(import.meta.url));
29
- const packageJson = JSON.parse(readFileSync(join(__dirname, "package.json"), "utf-8"));
43
+ let packageJson;
44
+ try {
45
+ packageJson = JSON.parse(readFileSync(join(__dirname, "package.json"), "utf-8"));
46
+ }
47
+ catch {
48
+ packageJson = JSON.parse(readFileSync(join(__dirname, "../package.json"), "utf-8"));
49
+ }
30
50
  const CURRENT_VERSION = packageJson.version;
31
51
  let latestVersion = null;
32
52
  let versionCheckDone = false;
package/index.ts CHANGED
@@ -29,7 +29,22 @@ const MCP_API_KEY = process.env.MCP_API_KEY;
29
29
 
30
30
  // No space configuration needed - AI discovers spaces dynamically
31
31
 
32
+ // Debug logging
33
+ import { appendFileSync } from "fs";
34
+ const DEBUG_LOG = "/tmp/intangle-mcp-debug.log";
35
+ function log(msg: string) {
36
+ try {
37
+ appendFileSync(DEBUG_LOG, `${new Date().toISOString()}: ${msg}\n`);
38
+ } catch (e) {}
39
+ }
40
+
41
+ log("--- Server Starting ---");
42
+ log(`CWD: ${process.cwd()}`);
43
+ log(`Has API Key: ${!!MCP_API_KEY}`);
44
+ log(`Node Version: ${process.version}`);
45
+
32
46
  if (!MCP_API_KEY) {
47
+ log("Error: MCP_API_KEY environment variable is required");
33
48
  console.error("Error: MCP_API_KEY environment variable is required");
34
49
  console.error(
35
50
  "Please set your Intangle API key in the Claude Desktop configuration",
@@ -41,9 +56,16 @@ console.log("Intangle MCP Server starting - connecting to", API_BASE_URL);
41
56
 
42
57
  // Version checking - automatically read from package.json
43
58
  const __dirname = dirname(fileURLToPath(import.meta.url));
44
- const packageJson = JSON.parse(
45
- readFileSync(join(__dirname, "package.json"), "utf-8"),
46
- );
59
+ let packageJson;
60
+ try {
61
+ packageJson = JSON.parse(
62
+ readFileSync(join(__dirname, "package.json"), "utf-8"),
63
+ );
64
+ } catch {
65
+ packageJson = JSON.parse(
66
+ readFileSync(join(__dirname, "../package.json"), "utf-8"),
67
+ );
68
+ }
47
69
  const CURRENT_VERSION = packageJson.version;
48
70
  let latestVersion: string | null = null;
49
71
  let versionCheckDone = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intangle/mcp-server",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "description": "Model Context Protocol server for Intangle - AI memory that persists across conversations",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",