workfullcircle-mcp 2.0.1 → 2.0.3

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/README.md CHANGED
@@ -8,8 +8,8 @@
8
8
  # Install and configure automatically
9
9
  npx workfullcircle-mcp install --token uam_your_token_here
10
10
 
11
- # Or use the remote server directly
12
- npx workfullcircle-remote https://your-server.com/sse --header "Authorization: Bearer uam_your_token"
11
+ # Or use the Streamable HTTP bridge directly
12
+ npx workfullcircle-remote https://your-server.com --header "Authorization: Bearer uam_your_token"
13
13
  ```
14
14
 
15
15
  ## Environment Variables
@@ -19,11 +19,8 @@ Configure your MCP server with these environment variables:
19
19
  ### Required Variables
20
20
  ```bash
21
21
  # WorkFullCircle API Configuration
22
- WFC_API_URL=https://workfullcircle.com/api # Your API endpoint
23
- WFC_API_KEY=uam_your_api_key_here # Your API key
24
-
25
- # For remote server connections
26
- WFC_SSE_URL=https://workfullcircle.com/sse # SSE endpoint
22
+ WFC_API_URL=https://workfullcircle.com # Streamable HTTP endpoint
23
+ WFC_API_KEY=uam_your_api_key_here # Your API key
27
24
  ```
28
25
 
29
26
  ### Optional Variables
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "workfullcircle-mcp",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "WorkFullCircle MCP - Universal AI memory that works anywhere",
5
5
  "bin": {
6
6
  "workfullcircle-mcp": "bin/workfullcircle-mcp.js"
@@ -1,102 +1,109 @@
1
- const path = require('path');
2
- const fs = require('fs');
3
- const os = require('os');
4
-
5
- function getTargets() {
6
- const home = os.homedir();
7
- return [
8
- {
9
- name: 'Claude Desktop',
10
- path: os.platform() === 'win32'
11
- ? path.join(process.env.APPDATA || '', 'Claude', 'claude_desktop_config.json')
12
- : path.join(home, 'Library', 'Application Support', 'Claude', 'claude_desktop_config.json')
13
- },
14
- {
15
- name: 'Cursor',
16
- path: path.join(home, '.cursor', 'mcp.json')
17
- },
18
- {
19
- name: 'Windsurf',
20
- path: os.platform() === 'win32'
21
- ? path.join(process.env.APPDATA || '', 'Windsurf', 'User', 'globalStorage', 'storage.json')
22
- : path.join(home, '.windsurf', 'mcp.json')
23
- },
24
- {
25
- name: 'VS Code',
26
- path: os.platform() === 'win32'
27
- ? path.join(process.env.APPDATA || '', 'Code', 'User', 'globalStorage', 'storage.json')
28
- : os.platform() === 'darwin'
29
- ? path.join(home, 'Library', 'Application Support', 'Code', 'User', 'globalStorage', 'storage.json')
30
- : path.join(home, '.config', 'Code', 'User', 'globalStorage', 'storage.json')
31
- }
32
- ];
33
- }
34
-
35
- function buildConfig(token, projectId) {
36
- const args = [
37
- '-y',
38
- 'workfullcircle-remote',
39
- process.env.WFC_API_URL || process.env.RAILWAY_STATIC_URL || 'https://workfullcircle.com/api',
40
- '--header',
41
- `Authorization: Bearer ${token}`
42
- ];
43
- if (projectId) {
44
- args.push('--project', projectId);
45
- }
46
- return {
47
- mcpServers: {
48
- workfullcircle: {
49
- command: 'npx',
50
- args
51
- }
52
- }
53
- };
54
- }
55
-
56
- function mergeConfig(existing, token, projectId) {
57
- const config = existing && typeof existing === 'object' ? existing : {};
58
- if (!config.mcpServers) {
59
- config.mcpServers = {};
60
- }
61
-
62
- // Handle VS Code's different JSON structure
63
- const workfullcircleConfig = buildConfig(token, projectId).mcpServers.workfullcircle;
64
- if (existing.mcpServers && existing.mcpServers.workfullcircle) {
65
- // VS Code might store in different format, merge properly
66
- config.mcpServers.workfullcircle = {
67
- ...existing.mcpServers.workfullcircle,
68
- ...workfullcircleConfig
69
- };
70
- } else {
71
- config.mcpServers.workfullcircle = workfullcircleConfig;
72
- }
73
-
74
- return config;
75
- }
76
-
77
- function writeConfig(target, token, projectId) {
78
- const dir = path.dirname(target.path);
79
- if (!fs.existsSync(dir)) {
80
- fs.mkdirSync(dir, { recursive: true });
81
- }
82
-
83
- let existing = {};
84
- if (fs.existsSync(target.path)) {
85
- try {
86
- existing = JSON.parse(fs.readFileSync(target.path, 'utf8'));
87
- } catch (error) {
88
- return { success: false, error: `Invalid JSON in ${target.path}` };
89
- }
90
- }
91
-
92
- const merged = mergeConfig(existing, token, projectId);
93
- fs.writeFileSync(target.path, JSON.stringify(merged, null, 2));
94
- return { success: true };
95
- }
96
-
97
- module.exports = {
98
- getTargets,
99
- writeConfig,
100
- buildConfig,
101
- mergeConfig
102
- };
1
+ const path = require('path');
2
+ const fs = require('fs');
3
+ const os = require('os');
4
+
5
+ function resolveAppData(home) {
6
+ return process.env.APPDATA || path.join(home, 'AppData', 'Roaming');
7
+ }
8
+
9
+ function getWindsurfConfigPath(home) {
10
+ return path.join(home, '.codeium', 'windsurf', 'mcp_config.json');
11
+ }
12
+
13
+ function getTargets() {
14
+ const home = os.homedir();
15
+ const appData = resolveAppData(home);
16
+ return [
17
+ {
18
+ name: 'Claude Desktop',
19
+ path: os.platform() === 'win32'
20
+ ? path.join(appData, 'Claude', 'claude_desktop_config.json')
21
+ : path.join(home, 'Library', 'Application Support', 'Claude', 'claude_desktop_config.json')
22
+ },
23
+ {
24
+ name: 'Cursor',
25
+ path: path.join(home, '.cursor', 'mcp.json')
26
+ },
27
+ {
28
+ name: 'Windsurf',
29
+ path: getWindsurfConfigPath(home)
30
+ },
31
+ {
32
+ name: 'VS Code',
33
+ path: os.platform() === 'win32'
34
+ ? path.join(appData, 'Code', 'User', 'globalStorage', 'storage.json')
35
+ : os.platform() === 'darwin'
36
+ ? path.join(home, 'Library', 'Application Support', 'Code', 'User', 'globalStorage', 'storage.json')
37
+ : path.join(home, '.config', 'Code', 'User', 'globalStorage', 'storage.json')
38
+ }
39
+ ];
40
+ }
41
+
42
+ function buildConfig(token, projectId) {
43
+ const args = [
44
+ '-y',
45
+ 'workfullcircle-remote',
46
+ process.env.WFC_API_URL || process.env.RAILWAY_STATIC_URL || 'https://workfullcircle.com',
47
+ '--header',
48
+ `Authorization: Bearer ${token}`
49
+ ];
50
+ if (projectId) {
51
+ args.push('--project', projectId);
52
+ }
53
+ return {
54
+ mcpServers: {
55
+ workfullcircle: {
56
+ command: 'npx',
57
+ args
58
+ }
59
+ }
60
+ };
61
+ }
62
+
63
+ function mergeConfig(existing, token, projectId) {
64
+ const config = existing && typeof existing === 'object' ? existing : {};
65
+ if (!config.mcpServers) {
66
+ config.mcpServers = {};
67
+ }
68
+
69
+ // Handle VS Code's different JSON structure
70
+ const workfullcircleConfig = buildConfig(token, projectId).mcpServers.workfullcircle;
71
+ if (existing.mcpServers && existing.mcpServers.workfullcircle) {
72
+ // VS Code might store in different format, merge properly
73
+ config.mcpServers.workfullcircle = {
74
+ ...existing.mcpServers.workfullcircle,
75
+ ...workfullcircleConfig
76
+ };
77
+ } else {
78
+ config.mcpServers.workfullcircle = workfullcircleConfig;
79
+ }
80
+
81
+ return config;
82
+ }
83
+
84
+ function writeConfig(target, token, projectId) {
85
+ const dir = path.dirname(target.path);
86
+ if (!fs.existsSync(dir)) {
87
+ fs.mkdirSync(dir, { recursive: true });
88
+ }
89
+
90
+ let existing = {};
91
+ if (fs.existsSync(target.path)) {
92
+ try {
93
+ existing = JSON.parse(fs.readFileSync(target.path, 'utf8'));
94
+ } catch (error) {
95
+ return { success: false, error: `Invalid JSON in ${target.path}` };
96
+ }
97
+ }
98
+
99
+ const merged = mergeConfig(existing, token, projectId);
100
+ fs.writeFileSync(target.path, JSON.stringify(merged, null, 2));
101
+ return { success: true };
102
+ }
103
+
104
+ module.exports = {
105
+ getTargets,
106
+ writeConfig,
107
+ buildConfig,
108
+ mergeConfig
109
+ };