@pragmatic-growth/memory-mcp 2.2.0 → 2.3.0

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/.npmrc.backup ADDED
@@ -0,0 +1,2 @@
1
+ @pragmatic-growth:registry=https://registry.npmjs.org/
2
+ //registry.npmjs.org/:_authToken=${NPM_TOKEN}
package/dist/index.d.ts CHANGED
@@ -11,8 +11,12 @@
11
11
  * npx @pragmatic-growth/memory-mcp --edit # Alias for --full
12
12
  *
13
13
  * Environment variables:
14
- * MCP_API_KEY - API key for authentication (required)
14
+ * MCP_API_KEY - Clerk API key for authentication (required)
15
15
  * MCP_SERVER_URL - Server URL (default: https://pg-memory-production.up.railway.app/api/mcp)
16
16
  * MCP_MODE - Mode: 'readonly' (default) or 'full' for edit capabilities
17
+ *
18
+ * Authentication:
19
+ * Uses Clerk API key authentication via X-API-Key header.
20
+ * Get your API key from the Clerk Dashboard or the app's API Docs page.
17
21
  */
18
22
  export {};
package/dist/index.js CHANGED
@@ -11,9 +11,13 @@
11
11
  * npx @pragmatic-growth/memory-mcp --edit # Alias for --full
12
12
  *
13
13
  * Environment variables:
14
- * MCP_API_KEY - API key for authentication (required)
14
+ * MCP_API_KEY - Clerk API key for authentication (required)
15
15
  * MCP_SERVER_URL - Server URL (default: https://pg-memory-production.up.railway.app/api/mcp)
16
16
  * MCP_MODE - Mode: 'readonly' (default) or 'full' for edit capabilities
17
+ *
18
+ * Authentication:
19
+ * Uses Clerk API key authentication via X-API-Key header.
20
+ * Get your API key from the Clerk Dashboard or the app's API Docs page.
17
21
  */
18
22
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
19
23
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
@@ -28,18 +32,20 @@ const SERVER_URL = process.env.MCP_SERVER_URL || 'https://pg-memory-production.u
28
32
  const API_KEY = process.env.MCP_API_KEY;
29
33
  if (!API_KEY) {
30
34
  console.error('Error: MCP_API_KEY environment variable is required');
31
- console.error('Set it in your Raycast MCP server configuration under "env"');
35
+ console.error('Get your Clerk API key from the Clerk Dashboard or app API Docs page');
36
+ console.error('Set it in your MCP client configuration under "env"');
32
37
  process.exit(1);
33
38
  }
34
39
  // HTTP session management
35
40
  let sessionId = null;
36
41
  /**
37
42
  * Make an HTTP request to the remote MCP server.
43
+ * Uses X-API-Key header for Clerk API key authentication.
38
44
  */
39
45
  async function callRemoteServer(method, params) {
40
46
  const headers = {
41
47
  'Content-Type': 'application/json',
42
- 'Authorization': `Bearer ${API_KEY}`,
48
+ 'X-API-Key': API_KEY, // Safe: already validated above
43
49
  };
44
50
  if (sessionId) {
45
51
  headers['Mcp-Session-Id'] = sessionId;
@@ -75,7 +81,7 @@ async function initializeRemoteSession() {
75
81
  capabilities: {},
76
82
  clientInfo: {
77
83
  name: 'pg-memory-stdio',
78
- version: '2.2.0',
84
+ version: '2.3.0',
79
85
  },
80
86
  });
81
87
  }
@@ -95,7 +101,7 @@ async function main() {
95
101
  // Create local MCP server
96
102
  const server = new McpServer({
97
103
  name: 'pg-memory',
98
- version: '2.2.0',
104
+ version: '2.3.0',
99
105
  description: `PG-Memory knowledge base (${modeLabel} mode)`,
100
106
  });
101
107
  // ============================================================
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pragmatic-growth/memory-mcp",
3
- "version": "2.2.0",
4
- "description": "Stdio proxy for PG-Memory - connects stdio-based MCP clients (Raycast, local tools) to your PG-Memory HTTP server. PG-Memory supports both HTTP transport (Claude Code, mcp-remote) and stdio transport (this package).",
3
+ "version": "2.3.0",
4
+ "description": "Stdio proxy for PG-Memory - connects stdio-based MCP clients (Claude Desktop, Raycast) to your PG-Memory HTTP server using Clerk API key authentication. Supports both read-only and full edit modes.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
7
7
  "memory-mcp": "./dist/index.js"
package/src/index.ts CHANGED
@@ -11,9 +11,13 @@
11
11
  * npx @pragmatic-growth/memory-mcp --edit # Alias for --full
12
12
  *
13
13
  * Environment variables:
14
- * MCP_API_KEY - API key for authentication (required)
14
+ * MCP_API_KEY - Clerk API key for authentication (required)
15
15
  * MCP_SERVER_URL - Server URL (default: https://pg-memory-production.up.railway.app/api/mcp)
16
16
  * MCP_MODE - Mode: 'readonly' (default) or 'full' for edit capabilities
17
+ *
18
+ * Authentication:
19
+ * Uses Clerk API key authentication via X-API-Key header.
20
+ * Get your API key from the Clerk Dashboard or the app's API Docs page.
17
21
  */
18
22
 
19
23
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
@@ -32,7 +36,8 @@ const API_KEY = process.env.MCP_API_KEY;
32
36
 
33
37
  if (!API_KEY) {
34
38
  console.error('Error: MCP_API_KEY environment variable is required');
35
- console.error('Set it in your Raycast MCP server configuration under "env"');
39
+ console.error('Get your Clerk API key from the Clerk Dashboard or app API Docs page');
40
+ console.error('Set it in your MCP client configuration under "env"');
36
41
  process.exit(1);
37
42
  }
38
43
 
@@ -49,11 +54,12 @@ interface JsonRpcResponse {
49
54
 
50
55
  /**
51
56
  * Make an HTTP request to the remote MCP server.
57
+ * Uses X-API-Key header for Clerk API key authentication.
52
58
  */
53
59
  async function callRemoteServer(method: string, params?: Record<string, unknown>): Promise<unknown> {
54
60
  const headers: Record<string, string> = {
55
61
  'Content-Type': 'application/json',
56
- 'Authorization': `Bearer ${API_KEY}`,
62
+ 'X-API-Key': API_KEY!, // Safe: already validated above
57
63
  };
58
64
 
59
65
  if (sessionId) {
@@ -97,7 +103,7 @@ async function initializeRemoteSession(): Promise<void> {
97
103
  capabilities: {},
98
104
  clientInfo: {
99
105
  name: 'pg-memory-stdio',
100
- version: '2.2.0',
106
+ version: '2.3.0',
101
107
  },
102
108
  });
103
109
  }
@@ -119,7 +125,7 @@ async function main(): Promise<void> {
119
125
  // Create local MCP server
120
126
  const server = new McpServer({
121
127
  name: 'pg-memory',
122
- version: '2.2.0',
128
+ version: '2.3.0',
123
129
  description: `PG-Memory knowledge base (${modeLabel} mode)`,
124
130
  });
125
131