@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.
- package/AGENT.md +1 -1
- package/CHANGELOG.md +15 -0
- package/README.md +35 -1
- package/agent/commands/acp.clarification-address.md +417 -0
- package/agent/commands/acp.clarification-create.md +5 -0
- package/agent/commands/acp.clarifications-research.md +326 -0
- package/agent/commands/acp.handoff.md +270 -0
- package/agent/design/local.api-token-oauth-access.md +286 -0
- package/agent/milestones/milestone-21-api-token-oauth-access.md +53 -0
- package/agent/progress.yaml +73 -2
- package/agent/scripts/acp.install.sh +50 -27
- package/agent/scripts/acp.package-validate.sh +55 -27
- package/agent/tasks/milestone-21-api-token-oauth-access/task-515-add-auth-scheme-config.md +56 -0
- package/agent/tasks/milestone-21-api-token-oauth-access/task-516-implement-oauth-token-exchange.md +56 -0
- package/agent/tasks/milestone-21-api-token-oauth-access/task-517-implement-local-config-resolution.md +59 -0
- package/agent/tasks/milestone-21-api-token-oauth-access/task-518-wire-oauth-into-server-factory.md +56 -0
- package/agent/tasks/milestone-21-api-token-oauth-access/task-519-tests-and-documentation.md +54 -0
- package/agent/tasks/unassigned/task-514-remember-mcp-consume-core-space.md +71 -0
- package/dist/auth/config-resolver.d.ts +28 -0
- package/dist/auth/config-resolver.spec.d.ts +2 -0
- package/dist/auth/oauth-bootstrap.d.ts +22 -0
- package/dist/auth/oauth-bootstrap.spec.d.ts +2 -0
- package/dist/auth/oauth-exchange.d.ts +32 -0
- package/dist/auth/oauth-exchange.spec.d.ts +2 -0
- package/dist/config.d.ts +24 -0
- package/dist/server.js +1454 -78
- package/package.json +1 -1
- package/src/auth/config-resolver.spec.ts +101 -0
- package/src/auth/config-resolver.ts +127 -0
- package/src/auth/oauth-bootstrap.spec.ts +72 -0
- package/src/auth/oauth-bootstrap.ts +45 -0
- package/src/auth/oauth-exchange.spec.ts +126 -0
- package/src/auth/oauth-exchange.ts +128 -0
- package/src/config.ts +46 -0
- 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
|
-
|
|
265
|
-
|
|
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();
|