@dollhousemcp/mcp-server 1.4.5 โ†’ 1.5.1

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/CHANGELOG.md CHANGED
@@ -5,6 +5,51 @@ All notable changes to DollhouseMCP will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.5.1] - 2025-08-05
9
+
10
+ ### Fixed
11
+ - **Critical**: Fixed OAuth token retrieval for collection browsing (#471)
12
+ - `GitHubClient` now uses `getGitHubTokenAsync()` to check both environment variables and secure storage
13
+ - OAuth tokens from `setup_github_auth` are now properly used for API calls
14
+ - **Critical**: Fixed legacy category validation blocking collection browsing (#471)
15
+ - Replaced deprecated `validateCategory()` calls with proper section/type validation
16
+ - Collection browsing now accepts valid sections (library, showcase, catalog) and types (personas, skills, etc.)
17
+ - **Legacy**: Removed category validation from persona creation tools
18
+ - `create_persona` tool no longer requires or validates categories
19
+ - `edit_persona` allows editing category field for backward compatibility without validation
20
+ - Aligns with element system architecture where categories are deprecated
21
+
22
+ ## [1.5.0] - 2025-08-05
23
+
24
+ ### Added
25
+ - **GitHub OAuth Device Flow Authentication** - Secure authentication without manual token management
26
+ - New tools: `setup_github_auth`, `check_github_auth`, `clear_github_auth`
27
+ - AES-256-GCM encrypted token storage with machine-specific keys
28
+ - Natural language OAuth flow with user-friendly instructions
29
+ - Built-in rate limiting and Unicode security validation
30
+ - Automatic token persistence across sessions
31
+ - **Comprehensive test coverage** for OAuth implementation (420+ lines of tests)
32
+ - **ES module mocking support** using `jest.unstable_mockModule` for better test reliability
33
+
34
+ ### Security
35
+ - **Token encryption**: GitHub tokens are now encrypted at rest using AES-256-GCM
36
+ - **Machine-specific encryption keys**: Tokens are encrypted with keys derived from machine ID
37
+ - **Secure file permissions**: Token storage uses 0o600 file and 0o700 directory permissions
38
+ - **Rate limiting**: Built-in protection against brute force token validation attacks
39
+
40
+ ## [1.4.5] - 2025-08-05
41
+
42
+ ### Fixed
43
+ - **Critical**: Fixed server startup with npx and CLI commands in Claude Desktop
44
+ - Server now properly detects and handles all execution methods (direct, npx, CLI)
45
+ - No more "Server disconnected" errors when using standard npm installation
46
+ - Added 50ms delay for npx/CLI execution to ensure proper module initialization
47
+ - Better error logging with execution context details
48
+
49
+ ### Changed
50
+ - Improved startup detection logic to handle various execution scenarios
51
+ - Added global error handlers for better debugging of startup issues
52
+
8
53
  ## [1.4.4] - 2025-08-04
9
54
 
10
55
  ### ๐Ÿšจ Emergency Hotfix
package/README.md CHANGED
@@ -23,7 +23,7 @@ A comprehensive Model Context Protocol (MCP) server that enables dynamic AI pers
23
23
  **๐Ÿช Collection**: https://github.com/DollhouseMCP/collection
24
24
  **๐Ÿ“ฆ NPM Package**: https://www.npmjs.com/package/@dollhousemcp/mcp-server
25
25
  **๐ŸŒ Website**: https://dollhousemcp.com (planned)
26
- **๐Ÿ“ฆ Version**: v1.4.4
26
+ **๐Ÿ“ฆ Version**: v1.5.1
27
27
 
28
28
  > **โš ๏ธ Breaking Change Notice**: Tool names have changed from "marketplace" to "collection" terminology. Old names still work but are deprecated. See [Migration Guide](docs/MIGRATION_GUIDE_COLLECTION_RENAME.md) for details.
29
29
 
@@ -33,7 +33,8 @@ A comprehensive Model Context Protocol (MCP) server that enables dynamic AI pers
33
33
  # Install globally
34
34
  npm install -g @dollhousemcp/mcp-server
35
35
 
36
- # โš ๏ธ IMPORTANT: If you have v1.4.2 or v1.4.3, upgrade immediately:
36
+ # โœ… v1.5.1 fixes critical collection browsing issues!
37
+ # OAuth authentication + collection browsing now work seamlessly:
37
38
  # npm install -g @dollhousemcp/mcp-server@latest
38
39
 
39
40
  # Add to Claude Desktop config (see path below for your OS)
@@ -59,7 +60,7 @@ Restart Claude Desktop and you're ready to use DollhouseMCP! Try `list_personas`
59
60
 
60
61
  | Feature | Description |
61
62
  |---------|-------------|
62
- | ๐ŸŽญ **40 MCP Tools** | Complete portfolio element management through chat interface |
63
+ | ๐ŸŽญ **49 MCP Tools** | Complete portfolio element management through chat interface |
63
64
  | ๐Ÿช **GitHub Collection** | Browse, search, install, and submit personas to community collection |
64
65
  | ๐Ÿ‘ค **User Identity System** | Environment-based attribution for persona creators |
65
66
  | ๐Ÿ†” **Unique ID System** | Advanced ID generation: `{type}_{name}_{author}_{YYYYMMDD}-{HHMMSS}` |
@@ -149,7 +150,7 @@ DollhouseMCP implements comprehensive security measures to protect your personas
149
150
  ### Security Features
150
151
  - **๐Ÿ›ก๏ธ Content Sanitization**: DOMPurify integration prevents XSS attacks in persona content
151
152
  - **๐Ÿ“ YAML Injection Prevention**: Secure parsing with schema validation and size limits
152
- - **๐Ÿ” Token Security**: GitHub tokens are validated, encrypted at rest, with rotation support
153
+ - **๐Ÿ” Token Security**: GitHub OAuth device flow authentication with AES-256-GCM encrypted storage
153
154
  - **๐Ÿณ Container Hardening**: Non-root execution, read-only filesystem, resource limits
154
155
  - **๐Ÿšฆ Rate Limiting**: Token bucket algorithm prevents API abuse (10 checks/hour default)
155
156
  - **โœ… Signature Verification**: GPG verification ensures release authenticity
@@ -271,9 +272,9 @@ Add DollhouseMCP to your Claude Desktop configuration:
271
272
  **๐Ÿ”„ After configuration:**
272
273
  1. Save the file
273
274
  2. Restart Claude Desktop completely
274
- 3. All 46 DollhouseMCP tools will be available
275
+ 3. All 49 DollhouseMCP tools will be available
275
276
 
276
- ## ๐Ÿ› ๏ธ Available Tools (46 Total)
277
+ ## ๐Ÿ› ๏ธ Available Tools (49 Total)
277
278
 
278
279
  ### Portfolio Element Management (NEW!)
279
280
  - **`list_elements`** - List all elements of a specific type
@@ -322,6 +323,11 @@ Add DollhouseMCP to your Claude Desktop configuration:
322
323
  - **`configure_indicator`** - Configure how persona indicators appear in AI responses
323
324
  - **`get_indicator_config`** - View current indicator configuration settings
324
325
 
326
+ ### GitHub Authentication (NEW!)
327
+ - **`setup_github_auth`** - Start GitHub OAuth device flow authentication
328
+ - **`check_github_auth`** - Check current authentication status
329
+ - **`clear_github_auth`** - Remove stored authentication credentials
330
+
325
331
  ## ๐Ÿ“– Usage Examples
326
332
 
327
333
  ### Collection Operations
@@ -401,6 +407,46 @@ export DOLLHOUSE_INDICATOR_STYLE=minimal
401
407
  export DOLLHOUSE_INDICATOR_EMOJI=๐ŸŽจ
402
408
  ```
403
409
 
410
+ ### GitHub Authentication (v1.5.0+)
411
+
412
+ DollhouseMCP now supports GitHub OAuth device flow authentication for secure access to GitHub features without exposing tokens:
413
+
414
+ ```
415
+ setup_github_auth # Start OAuth device flow
416
+ check_github_auth # Check authentication status
417
+ clear_github_auth # Remove stored credentials
418
+ ```
419
+
420
+ **Features:**
421
+ - ๐Ÿ” **Secure Token Storage**: Tokens encrypted with AES-256-GCM
422
+ - ๐Ÿ“ฑ **Device Flow**: No need to manually create or paste tokens
423
+ - ๐Ÿ”„ **Automatic Token Management**: Secure storage and retrieval
424
+ - ๐Ÿ›ก๏ธ **Rate Limiting**: Built-in protection against API abuse
425
+ - โœ… **Unicode Security**: Prevents homograph attacks
426
+
427
+ **How It Works:**
428
+ 1. Run `setup_github_auth` to start the OAuth flow
429
+ 2. Visit the provided URL and enter the user code
430
+ 3. Authorize DollhouseMCP in your browser
431
+ 4. Authentication completes automatically
432
+ 5. Token is securely stored for future use
433
+
434
+ **Example Usage:**
435
+ ```
436
+ # First-time setup
437
+ setup_github_auth
438
+ # Copy the user code: XXXX-XXXX
439
+ # Visit: https://github.com/login/device
440
+ # Enter the code and authorize
441
+
442
+ # Check status
443
+ check_github_auth
444
+ # โœ… Authenticated as: your-username
445
+
446
+ # Later sessions automatically use stored token
447
+ browse_collection # Works with authenticated access
448
+ ```
449
+
404
450
  ## ๐Ÿ–ฅ๏ธ Cross-Platform Installation
405
451
 
406
452
  ### ๐Ÿง Linux Installation
@@ -1154,7 +1200,29 @@ This project is licensed under the **AGPL-3.0** License with Platform Stability
1154
1200
 
1155
1201
  ## ๐Ÿท๏ธ Version History
1156
1202
 
1157
- ### v1.4.4 - August 4, 2025 (Current)
1203
+ ### v1.5.1 - August 5, 2025 (Current)
1204
+ **Critical Bug Fixes**:
1205
+ - ๐Ÿ”ง **Fixed OAuth Token Retrieval** - `setup_github_auth` tokens now properly used for API calls
1206
+ - ๐Ÿ”ง **Fixed Collection Browsing** - Removed legacy category validation blocking browsing
1207
+ - ๐Ÿ”ง **Persona Creation Simplified** - Categories no longer required or validated
1208
+ - โœ… **Element System Alignment** - Full consistency with new architecture
1209
+
1210
+ ### v1.5.0 - August 5, 2025
1211
+ **GitHub OAuth Authentication**:
1212
+ - ๐Ÿ” **OAuth Device Flow** - Secure authentication without manual token management
1213
+ - ๐Ÿ”’ **AES-256-GCM Encryption** - Tokens encrypted at rest with machine-specific keys
1214
+ - ๐Ÿ›ก๏ธ **Rate Limiting** - Built-in protection against brute force attacks
1215
+ - โœ… **Natural Language Flow** - User-friendly authentication instructions
1216
+ - ๐Ÿงช **Comprehensive Tests** - 420+ lines of OAuth implementation tests
1217
+
1218
+ ### v1.4.5 - August 5, 2025
1219
+ **Claude Desktop Integration Fix**:
1220
+ - โœ… **Fixed "Server disconnected" errors** when using `npx` or `dollhousemcp` CLI
1221
+ - ๐Ÿ”„ **Progressive retry mechanism** for better compatibility across different machine speeds
1222
+ - ๐Ÿ”’ **Security improvements** - removed detailed error logging to prevent information disclosure
1223
+ - ๐Ÿงช **Added comprehensive tests** for execution detection logic
1224
+
1225
+ ### v1.4.4 - August 4, 2025
1158
1226
  **Emergency Hotfix**:
1159
1227
  - ๐Ÿšจ **Fixed v1.4.3 total failure** - initialization crashes fixed
1160
1228
  - ๐Ÿ”ง **Fixed jsdom crash** - heavy dependencies now load lazily
@@ -0,0 +1,93 @@
1
+ /**
2
+ * GitHub authentication manager using OAuth device flow
3
+ * Handles authentication for MCP servers without requiring client secrets
4
+ */
5
+ import { APICache } from '../cache/APICache.js';
6
+ export interface DeviceCodeResponse {
7
+ device_code: string;
8
+ user_code: string;
9
+ verification_uri: string;
10
+ expires_in: number;
11
+ interval: number;
12
+ }
13
+ export interface TokenResponse {
14
+ access_token: string;
15
+ token_type: string;
16
+ scope: string;
17
+ }
18
+ export interface AuthStatus {
19
+ isAuthenticated: boolean;
20
+ hasToken: boolean;
21
+ username?: string;
22
+ scopes?: string[];
23
+ expiresAt?: Date;
24
+ }
25
+ /**
26
+ * Manages GitHub authentication using the OAuth device flow
27
+ * This is the recommended approach for CLI/desktop applications
28
+ */
29
+ export declare class GitHubAuthManager {
30
+ private static readonly CLIENT_ID;
31
+ private static readonly DEVICE_CODE_URL;
32
+ private static readonly TOKEN_URL;
33
+ private static readonly USER_URL;
34
+ private static readonly DEFAULT_POLL_INTERVAL;
35
+ private static readonly MAX_POLL_ATTEMPTS;
36
+ private apiCache;
37
+ private activePolling;
38
+ constructor(apiCache: APICache);
39
+ /**
40
+ * Execute a network request with retry logic
41
+ */
42
+ private fetchWithRetry;
43
+ /**
44
+ * Check current authentication status
45
+ */
46
+ getAuthStatus(): Promise<AuthStatus>;
47
+ /**
48
+ * Initiate the device flow authentication process
49
+ */
50
+ initiateDeviceFlow(): Promise<DeviceCodeResponse>;
51
+ /**
52
+ * Poll for token after user has authorized the device
53
+ */
54
+ pollForToken(deviceCode: string, interval?: number): Promise<TokenResponse>;
55
+ /**
56
+ * Complete the authentication flow and store the token
57
+ */
58
+ completeAuthentication(tokenResponse: TokenResponse): Promise<AuthStatus>;
59
+ /**
60
+ * Clear stored authentication and revoke token
61
+ */
62
+ clearAuthentication(): Promise<void>;
63
+ /**
64
+ * Store token securely using encrypted file storage
65
+ */
66
+ private storeToken;
67
+ /**
68
+ * Fetch user information from GitHub
69
+ */
70
+ private fetchUserInfo;
71
+ /**
72
+ * Format authentication instructions for users
73
+ */
74
+ formatAuthInstructions(deviceResponse: DeviceCodeResponse): string;
75
+ /**
76
+ * Check if user needs to authenticate for a specific action
77
+ */
78
+ needsAuthForAction(action: string): boolean;
79
+ /**
80
+ * Wait with abort signal support
81
+ */
82
+ private waitWithAbort;
83
+ /**
84
+ * Clean up any active operations (called on server shutdown)
85
+ */
86
+ cleanup(): Promise<void>;
87
+ /**
88
+ * Get user-friendly error message based on HTTP status code
89
+ * Avoids exposing sensitive information while providing helpful guidance
90
+ */
91
+ private getErrorMessageForStatus;
92
+ }
93
+ //# sourceMappingURL=GitHubAuthManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GitHubAuthManager.d.ts","sourceRoot":"","sources":["../../src/auth/GitHubAuthManager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAIhD,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,aAAa;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACzB,eAAe,EAAE,OAAO,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB;AAED;;;GAGG;AACH,qBAAa,iBAAiB;IAG5B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAA0C;IAG3E,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAA0C;IACjF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAiD;IAClF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAiC;IAGjE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAAQ;IACrD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,CAAO;IAEhD,OAAO,CAAC,QAAQ,CAAW;IAC3B,OAAO,CAAC,aAAa,CAAgC;gBAEzC,QAAQ,EAAE,QAAQ;IAI9B;;OAEG;YACW,cAAc;IA0C5B;;OAEG;IACG,aAAa,IAAI,OAAO,CAAC,UAAU,CAAC;IA8B1C;;OAEG;IACG,kBAAkB,IAAI,OAAO,CAAC,kBAAkB,CAAC;IA0DvD;;OAEG;IACG,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAgD,GAAG,OAAO,CAAC,aAAa,CAAC;IAkF1H;;OAEG;IACG,sBAAsB,CAAC,aAAa,EAAE,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC;IA4B/E;;OAEG;IACG,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC;IAoC1C;;OAEG;YACW,UAAU;IAYxB;;OAEG;YACW,aAAa;IA6E3B;;OAEG;IACH,sBAAsB,CAAC,cAAc,EAAE,kBAAkB,GAAG,MAAM;IAmBlE;;OAEG;IACH,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAK3C;;OAEG;YACW,aAAa;IAmB3B;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAuB9B;;;OAGG;IACH,OAAO,CAAC,wBAAwB;CAyBjC"}