@prmichaelsen/remember-mcp 3.18.1 → 3.19.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.
Files changed (35) hide show
  1. package/AGENT.md +1 -1
  2. package/CHANGELOG.md +15 -0
  3. package/README.md +35 -1
  4. package/agent/commands/acp.clarification-address.md +417 -0
  5. package/agent/commands/acp.clarification-create.md +5 -0
  6. package/agent/commands/acp.clarifications-research.md +326 -0
  7. package/agent/commands/acp.handoff.md +270 -0
  8. package/agent/design/local.api-token-oauth-access.md +286 -0
  9. package/agent/milestones/milestone-21-api-token-oauth-access.md +53 -0
  10. package/agent/progress.yaml +73 -2
  11. package/agent/scripts/acp.install.sh +50 -27
  12. package/agent/scripts/acp.package-validate.sh +55 -27
  13. package/agent/tasks/milestone-21-api-token-oauth-access/task-515-add-auth-scheme-config.md +56 -0
  14. package/agent/tasks/milestone-21-api-token-oauth-access/task-516-implement-oauth-token-exchange.md +56 -0
  15. package/agent/tasks/milestone-21-api-token-oauth-access/task-517-implement-local-config-resolution.md +59 -0
  16. package/agent/tasks/milestone-21-api-token-oauth-access/task-518-wire-oauth-into-server-factory.md +56 -0
  17. package/agent/tasks/milestone-21-api-token-oauth-access/task-519-tests-and-documentation.md +54 -0
  18. package/agent/tasks/unassigned/task-514-remember-mcp-consume-core-space.md +71 -0
  19. package/dist/auth/config-resolver.d.ts +28 -0
  20. package/dist/auth/config-resolver.spec.d.ts +2 -0
  21. package/dist/auth/oauth-bootstrap.d.ts +22 -0
  22. package/dist/auth/oauth-bootstrap.spec.d.ts +2 -0
  23. package/dist/auth/oauth-exchange.d.ts +32 -0
  24. package/dist/auth/oauth-exchange.spec.d.ts +2 -0
  25. package/dist/config.d.ts +24 -0
  26. package/dist/server.js +1454 -78
  27. package/package.json +1 -1
  28. package/src/auth/config-resolver.spec.ts +101 -0
  29. package/src/auth/config-resolver.ts +127 -0
  30. package/src/auth/oauth-bootstrap.spec.ts +72 -0
  31. package/src/auth/oauth-bootstrap.ts +45 -0
  32. package/src/auth/oauth-exchange.spec.ts +126 -0
  33. package/src/auth/oauth-exchange.ts +128 -0
  34. package/src/config.ts +46 -0
  35. package/src/server.ts +17 -3
package/src/server.ts CHANGED
@@ -8,11 +8,13 @@ import {
8
8
  ErrorCode,
9
9
  McpError,
10
10
  } from '@modelcontextprotocol/sdk/types.js';
11
- import { config, validateConfig } from './config.js';
11
+ import { config, validateConfig, loadAuthSchemeConfig } from './config.js';
12
12
  import { initWeaviateClient, testWeaviateConnection, getWeaviateClient } from './weaviate/client.js';
13
13
  import { initFirestore, testFirestoreConnection } from './firestore/init.js';
14
14
  import { logger } from './utils/logger.js';
15
15
  import type { AuthContext } from './types/auth.js';
16
+ import { bootstrapOAuth } from './auth/oauth-bootstrap.js';
17
+ import { createServer } from './server-factory.js';
16
18
 
17
19
  // Import memory tools
18
20
  import { createMemoryTool, handleCreateMemory } from './tools/create-memory.js';
@@ -261,8 +263,20 @@ async function main(): Promise<void> {
261
263
  try {
262
264
  logger.info('Starting remember-mcp server...');
263
265
 
264
- // Initialize server
265
- const server = await initServer();
266
+ const authConfig = loadAuthSchemeConfig();
267
+ let server: Server;
268
+
269
+ if (authConfig.scheme === 'oauth') {
270
+ // OAuth mode: exchange API token for JWT, then create server via factory
271
+ logger.info('Auth scheme: oauth');
272
+ const { accessToken, userId } = await bootstrapOAuth();
273
+ logger.info(`Authenticated as userId: ${userId}`);
274
+ server = await createServer(accessToken, userId);
275
+ } else {
276
+ // Service mode: standalone server with no auth (used behind mcp-auth)
277
+ logger.info('Auth scheme: service');
278
+ server = await initServer();
279
+ }
266
280
 
267
281
  // Start with stdio transport
268
282
  const transport = new StdioServerTransport();