@dollhousemcp/mcp-server 1.6.10 → 1.7.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 (37) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.github.md +1036 -0
  3. package/README.md +165 -1668
  4. package/README.md.backup +298 -0
  5. package/README.npm.md +298 -0
  6. package/dist/cache/CollectionIndexCache.d.ts.map +1 -1
  7. package/dist/cache/CollectionIndexCache.js +2 -2
  8. package/dist/collection/CollectionBrowser.d.ts.map +1 -1
  9. package/dist/collection/CollectionBrowser.js +6 -3
  10. package/dist/collection/CollectionIndexManager.d.ts.map +1 -1
  11. package/dist/collection/CollectionIndexManager.js +4 -2
  12. package/dist/collection/GitHubClient.d.ts.map +1 -1
  13. package/dist/collection/GitHubClient.js +5 -1
  14. package/dist/generated/version.d.ts +2 -2
  15. package/dist/generated/version.d.ts.map +1 -1
  16. package/dist/generated/version.js +3 -3
  17. package/dist/index.d.ts +0 -19
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +87 -98
  20. package/dist/persona/export-import/index.d.ts +1 -3
  21. package/dist/persona/export-import/index.d.ts.map +1 -1
  22. package/dist/persona/export-import/index.js +2 -3
  23. package/dist/portfolio/PortfolioRepoManager.d.ts +1 -1
  24. package/dist/portfolio/PortfolioRepoManager.d.ts.map +1 -1
  25. package/dist/portfolio/PortfolioRepoManager.js +118 -33
  26. package/dist/security/contentValidator.js +8 -8
  27. package/dist/server/tools/PersonaTools.d.ts.map +1 -1
  28. package/dist/server/tools/PersonaTools.js +36 -76
  29. package/dist/server/types.d.ts +0 -2
  30. package/dist/server/types.d.ts.map +1 -1
  31. package/dist/server/types.js +1 -1
  32. package/dist/tools/portfolio/PortfolioElementAdapter.d.ts.map +1 -1
  33. package/dist/tools/portfolio/PortfolioElementAdapter.js +3 -1
  34. package/package.json +9 -3
  35. package/dist/persona/export-import/PersonaSharer.d.ts +0 -81
  36. package/dist/persona/export-import/PersonaSharer.d.ts.map +0 -1
  37. package/dist/persona/export-import/PersonaSharer.js +0 -678
package/README.md CHANGED
@@ -1,1801 +1,298 @@
1
1
  # DollhouseMCP
2
2
 
3
- ## Project Status
4
- [![MCP Compatible](https://img.shields.io/badge/MCP-Compatible-green)](https://modelcontextprotocol.io)
5
3
  [![npm version](https://img.shields.io/npm/v/@dollhousemcp/mcp-server.svg)](https://www.npmjs.com/package/@dollhousemcp/mcp-server)
4
+ [![MCP Compatible](https://img.shields.io/badge/MCP-Compatible-green)](https://modelcontextprotocol.io)
6
5
  [![License: AGPL-3.0](https://img.shields.io/badge/License-AGPL--3.0-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
7
- [![GitHub Views](https://komarev.com/ghpvc/?username=DollhouseMCP&repo=mcp-server&label=Repository+Views&style=flat)](https://github.com/DollhouseMCP/mcp-server)
8
-
9
- ## Build & Quality
10
6
  [![Core Build & Test](https://github.com/DollhouseMCP/mcp-server/actions/workflows/core-build-test.yml/badge.svg)](https://github.com/DollhouseMCP/mcp-server/actions/workflows/core-build-test.yml)
11
- [![Build Artifacts](https://github.com/DollhouseMCP/mcp-server/actions/workflows/build-artifacts.yml/badge.svg)](https://github.com/DollhouseMCP/mcp-server/actions/workflows/build-artifacts.yml)
12
- [![Test Coverage](https://img.shields.io/badge/Coverage-1858%2B%20Tests-green)](https://github.com/DollhouseMCP/mcp-server/tree/main/__tests__)
13
- [![Enterprise-Grade Security](https://img.shields.io/badge/Security-Enterprise%20Grade-purple)](docs/SECURITY.md)
14
-
15
- ## Platform Support
16
- [![Windows Build Status](https://img.shields.io/badge/Windows-✓_Tested-0078D4?logo=windows&logoColor=white)](https://github.com/DollhouseMCP/mcp-server/actions/workflows/core-build-test.yml?query=branch:main "Windows CI Build Status")
17
- [![macOS Build Status](https://img.shields.io/badge/macOS-✓_Tested-000000?logo=apple&logoColor=white)](https://github.com/DollhouseMCP/mcp-server/actions/workflows/core-build-test.yml?query=branch:main "macOS CI Build Status")
18
- [![Linux Build Status](https://img.shields.io/badge/Linux-✓_Tested-FCC624?logo=linux&logoColor=black)](https://github.com/DollhouseMCP/mcp-server/actions/workflows/core-build-test.yml?query=branch:main "Linux CI Build Status")
19
- [![Docker](https://img.shields.io/badge/Docker-Ready-2496ED?logo=docker&logoColor=white)](https://github.com/DollhouseMCP/mcp-server/blob/main/Dockerfile)
20
-
21
- ## Technology
22
- [![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
23
- [![Node.js](https://img.shields.io/badge/Node.js-339933?logo=nodedotjs&logoColor=white)](https://nodejs.org/)
24
- [![Extended Node Compatibility](https://github.com/DollhouseMCP/mcp-server/actions/workflows/extended-node-compatibility.yml/badge.svg)](https://github.com/DollhouseMCP/mcp-server/actions/workflows/extended-node-compatibility.yml)
25
- [![Docker Testing](https://github.com/DollhouseMCP/mcp-server/actions/workflows/docker-testing.yml/badge.svg)](https://github.com/DollhouseMCP/mcp-server/actions/workflows/docker-testing.yml)
26
7
 
27
8
  A comprehensive Model Context Protocol (MCP) server that enables dynamic AI persona management with an integrated GitHub-powered collection. DollhouseMCP allows Claude and other compatible AI assistants to activate different behavioral personas while supporting community sharing and monetization.
28
9
 
29
10
  **🌐 Repository**: https://github.com/DollhouseMCP/mcp-server
30
11
  **🏪 Collection**: https://github.com/DollhouseMCP/collection
31
12
  **📦 NPM Package**: https://www.npmjs.com/package/@dollhousemcp/mcp-server
32
- **🌍 Website**: https://dollhousemcp.com (planned)
33
- **📦 Version**: v1.6.10
34
-
35
- > **🎉 New in v1.6.9**: Fixed version update script to prevent wrong file creation and package-lock.json corruption. The release workflow now works reliably with proper version management.
36
-
37
- > **⚠️ Breaking Change**: PersonaTools have been streamlined in v1.6.0. 9 redundant tools were removed in favor of ElementTools. See [PersonaTools Migration Guide](docs/PERSONATOOLS_MIGRATION_GUIDE.md) for migration instructions.
13
+ **🌍 Website**: https://dollhousemcp.com (planned)
38
14
 
39
15
  ## 🚀 Quick Start
40
16
 
41
- ```bash
42
- # Install globally
43
- npm install -g @dollhousemcp/mcp-server
44
-
45
- # ✅ v1.6.9 fixes version management and release workflow!
46
- # Browse and submit to collection with or without authentication:
47
- # npm install -g @dollhousemcp/mcp-server@latest
48
-
49
- # Add to Claude Desktop config (see path below for your OS)
50
- # macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
51
- # Windows: %APPDATA%\Claude\claude_desktop_config.json
52
- # Linux: ~/.config/Claude/claude_desktop_config.json
53
- ```
54
-
55
- ```json
56
- {
57
- "mcpServers": {
58
- "dollhousemcp": {
59
- "command": "npx",
60
- "args": ["@dollhousemcp/mcp-server"]
61
- }
62
- }
63
- }
64
- ```
65
-
66
- Restart Claude Desktop and you're ready to use DollhouseMCP! Try `list_elements type="personas"` to get started.
67
-
68
- > **🎯 New User?** Follow our [Roundtrip Workflow Guide](docs/guides/ROUNDTRIP_WORKFLOW_USER_GUIDE.md) for a complete walkthrough of discovering, customizing, and sharing AI elements with the community.
69
-
70
- ## ✨ Key Features
71
-
72
- | Feature | Description |
73
- |---------|-------------|
74
- | 🎭 **42 MCP Tools** | Complete portfolio element management through chat interface |
75
- | 🏪 **GitHub Collection** | Browse, search, install, and submit personas to community collection |
76
- | 🔄 **Roundtrip Workflow** | Complete cycle: discover → customize → share → collaborate |
77
- | 📁 **GitHub Portfolio** | Personal repository for storing and versioning your AI elements |
78
- | 👤 **User Identity System** | Environment-based attribution for persona creators |
79
- | 🆔 **Unique ID System** | Advanced ID generation: `{type}_{name}_{author}_{YYYYMMDD}-{HHMMSS}` |
80
- | 💬 **Chat-Based Management** | Create, edit, and validate personas through conversational interface |
81
- | 🔄 **Real-time Operations** | Live editing with automatic version bumping and validation |
82
- | 📦 **NPM Installation** | Install MCP servers from npm with cross-platform support and atomic operations |
83
- | 🛡️ **Data Protection** | Copy-on-write for default personas, comprehensive backup system |
84
- | 🏠 **Local-First Architecture** | Full functionality without cloud dependency |
85
-
86
- ## 🎨 Portfolio Customization Elements
87
-
88
- DollhouseMCP introduces a comprehensive portfolio system for customizing AI behavior through **customization element types**. Your portfolio is your personal collection of these element types that enhance and tailor your AI experience. Each element type serves a specific purpose in shaping how AI assistants interact with you.
89
-
90
- ### Current Portfolio Element Types
91
-
92
- | Element | Purpose | Status |
93
- |---------|---------|--------|
94
- | 🎭 **Personas** | Define AI personality, tone, and behavioral characteristics | ✅ Available |
95
- | 🛠️ **Skills** | Add specific capabilities like code review, data analysis, or creative writing | ✅ Available |
96
- | 📝 **Templates** | Create reusable response formats for emails, reports, documentation | ✅ Available |
97
- | 🤖 **Agents** | Build autonomous assistants that can pursue goals and make decisions | ✅ Available |
98
-
99
- ### Coming Soon
100
-
101
- | Element | Purpose | Status |
102
- |---------|---------|--------|
103
- | 💬 **Prompts** | Pre-configured conversation starters and structured interactions | 🔄 Coming Soon |
104
- | 🧠 **Memory** | Persistent context storage with retention policies and search capabilities | 🔄 Coming Soon |
105
- | 🎯 **Ensemble** | Orchestrate multiple elements together as one unified entity | 🔄 Coming Soon |
106
-
107
- > **📢 Note**: Prompt, memory, and ensemble element types are actively being developed and will be available in upcoming releases.
108
-
109
- ### Managing Your Portfolio
110
-
111
- Use these new generic tools to manage any element type in your portfolio:
112
-
113
- - **`list_elements`** - Browse your portfolio elements by type
114
- - **`activate_element`** - Activate elements to customize AI behavior
115
- - **`get_active_elements`** - View currently active customizations
116
- - **`deactivate_element`** - Deactivate specific customizations
117
- - **`get_element_details`** - Examine element configuration and metadata
118
- - **`reload_elements`** - Refresh portfolio from filesystem
119
-
120
- ### GitHub Portfolio Integration (NEW!)
121
-
122
- Manage your portfolio on GitHub for sharing and collaboration:
123
-
124
- - **`portfolio_status`** - Check your GitHub portfolio repository status
125
- - **`init_portfolio`** - Create a new GitHub portfolio repository
126
- - **`portfolio_config`** - Configure sync and submission settings
127
- - **`sync_portfolio`** - Synchronize local and GitHub repositories
128
- - **`search_portfolio`** - Search your local portfolio with advanced indexing
129
- - **`search_all`** - Unified search across local, GitHub, and collection sources
130
- - **`submit_content`** - Upload elements to your GitHub portfolio
17
+ ### Choose Your Installation Method
18
+
19
+ <table>
20
+ <tr>
21
+ <th>Method</th>
22
+ <th>Best For</th>
23
+ <th>Pros</th>
24
+ <th>Cons</th>
25
+ </tr>
26
+ <tr>
27
+ <td><strong>Local Install</strong><br>(Recommended)</td>
28
+ <td>Most users, multiple configs, customization</td>
29
+ <td>✅ Multiple setups<br>✅ Easy backup<br>✅ No permissions</td>
30
+ <td>❌ Longer path in config</td>
31
+ </tr>
32
+ <tr>
33
+ <td><strong>npx</strong></td>
34
+ <td>Quick testing, always latest</td>
35
+ <td>✅ No install<br>✅ Always updated</td>
36
+ <td>❌ Slower startup<br>❌ Needs internet</td>
37
+ </tr>
38
+ <tr>
39
+ <td><strong>Global Install</strong></td>
40
+ <td>Single shared instance</td>
41
+ <td>✅ Short command</td>
42
+ <td>❌ Only one version<br>❌ Needs sudo/admin</td>
43
+ </tr>
44
+ </table>
131
45
 
132
- > **📘 Getting Started**: New to portfolios? Follow our [Portfolio Setup Guide](docs/guides/PORTFOLIO_SETUP_GUIDE.md) for step-by-step instructions.
46
+ ---
133
47
 
134
- ### Smart Element Detection
48
+ ### Method 1: Local Installation (Recommended)
135
49
 
136
- DollhouseMCP automatically detects element types when submitting content, eliminating the need to manually specify types:
50
+ Create a dedicated folder for your MCP servers and install there:
137
51
 
138
52
  ```bash
139
- # System automatically detects whether this is a persona, skill, template, etc.
140
- submit_content name="code-review"
141
- ```
142
-
143
- **Key Features:**
144
- - **Automatic Type Detection**: Searches all element directories simultaneously
145
- - **Fuzzy Matching**: Finds content with partial names or different extensions
146
- - **Clear Error Messages**: Provides actionable guidance when content isn't found
147
- - **No More Mistakes**: Prevents accidentally submitting content as wrong element type
148
-
149
- **Example Output:**
150
- ```
151
- ✅ Smart detection: Found "code-review" as SKILL
152
- ✅ Successfully uploaded code-review to your GitHub portfolio!
153
- ```
154
-
155
- > **📖 Learn More**: See our [Element Detection Guide](docs/guides/ELEMENT_DETECTION_GUIDE.md) for detailed usage examples and troubleshooting tips.
156
-
157
- ### Complete Naming Freedom
158
-
159
- DollhouseMCP gives you **complete freedom** to name your elements whatever you want. There are no naming restrictions or forbidden words.
160
-
161
- **✅ You can create elements named**:
162
- - "Test Assistant" - Previously blocked, now fully supported
163
- - "Sample Code Reviewer" - No restrictions
164
- - "テスト" (Japanese for "test") - Unicode supported
165
- - "My Debugging Helper" - Any descriptive name
166
-
167
- **How it works**: DollhouseMCP uses metadata-based test detection instead of filename patterns, so only internal DollhouseMCP test files are filtered (those with `_dollhouseMCPTest: true` metadata). Your personal elements are never affected.
168
-
169
- > **📘 Technical Details**: See our [Test Metadata Convention](docs/TEST_METADATA_CONVENTION.md) for information about how DollhouseMCP identifies its own test files without affecting user content.
170
-
171
- ### Specialized Element Tools
172
-
173
- Some portfolio elements have specialized operations:
174
-
175
- - **`render_template`** - Generate content using template elements with variables
176
- - **`execute_agent`** - Deploy agent elements to accomplish specific goals
177
-
178
- ### Portfolio Examples
179
-
180
- ```
181
- # Browse your skill portfolio
182
- list_elements type="skills"
183
-
184
- # Activate a code review skill
185
- activate_element name="code-review" type="skills"
186
-
187
- # Activate a professional email template
188
- activate_element name="email-professional" type="templates"
53
+ # Create MCP servers directory
54
+ mkdir ~/mcp-servers
55
+ cd ~/mcp-servers
189
56
 
190
- # Use a template to generate content
191
- render_template name="project-update" variables='{"project": "DollhouseMCP", "status": "Released"}'
192
-
193
- # Deploy an agent for a specific task
194
- execute_agent name="project-manager" goal="Create a sprint plan for next week"
57
+ # Install DollhouseMCP
58
+ npm install @dollhousemcp/mcp-server
195
59
  ```
196
60
 
197
- ### Portfolio Structure
198
-
199
- Your portfolio lives in `~/.dollhouse/portfolio/` with elements organized by type:
200
-
201
- ```
202
- ~/.dollhouse/portfolio/
203
- ├── personas/ # Personality and behavior profiles
204
- ├── skills/ # Specialized capabilities
205
- ├── templates/ # Reusable content structures
206
- └── agents/ # Autonomous assistants
207
- ```
208
-
209
- ### Persona Management via ElementTools
210
-
211
- Personas are now managed through the generic ElementTools system:
212
- - **`list_elements type="personas"`** - Display all local personas with enhanced metadata
213
- - **`activate_element name="name" type="personas"`** - Activate by name, filename, or unique ID
214
- - **`get_active_elements type="personas"`** - Get current active persona information
215
- - **`deactivate_element type="personas"`** - Return to default mode
216
- - **`get_element_details name="name" type="personas"`** - View complete persona details
217
- - **`reload_elements type="personas"`** - Refresh personas from filesystem
218
-
219
- > **📖 Migration**: Legacy PersonaTools were removed in v1.6.0. See [PersonaTools Migration Guide](docs/PERSONATOOLS_MIGRATION_GUIDE.md) for complete migration instructions.
220
-
221
- ## 🔒 Enterprise-Grade Security
222
-
223
- DollhouseMCP implements comprehensive security measures to protect your personas and system:
224
-
225
- ### Security Features
226
- - **🛡️ Content Sanitization**: DOMPurify integration prevents XSS attacks in persona content
227
- - **📝 YAML Injection Prevention**: Secure parsing with schema validation and size limits
228
- - **🔐 Token Security**: GitHub OAuth device flow authentication with AES-256-GCM encrypted storage
229
- - **🐳 Container Hardening**: Non-root execution, read-only filesystem, resource limits
230
- - **🚦 Rate Limiting**: Token bucket algorithm prevents API abuse (10 checks/hour default)
231
- - **✅ Signature Verification**: GPG verification ensures release authenticity
232
- - **🔍 Input Validation**: Comprehensive validation for all user inputs
233
- - **📊 Security Monitoring**: Audit logging for security-relevant operations
234
-
235
- ### Security Testing
236
- - **487 comprehensive tests** including security-specific test suites
237
- - **Continuous security scanning** with GitHub Advanced Security
238
- - **Vulnerability-free**: All security alerts resolved (0 active)
239
-
240
- ## 📋 Prerequisites
241
-
242
- - **Node.js**: v20.0.0 or higher (LTS recommended)
243
- - **npm**: v10.0.0 or higher
244
- - **git**: For cloning the repository
245
- - **Operating System**: Windows, macOS, or Linux
61
+ **Configure Claude Desktop:**
246
62
 
247
- > **Note**: DollhouseMCP is developed on Node.js 24 but supports Node.js 20+ for broad compatibility.
248
-
249
- ## 🚀 Quick Start
250
-
251
- ### Installation
252
-
253
- #### NPM Installation (NEW! - Recommended)
254
-
255
- ```bash
256
- npm install -g @dollhousemcp/mcp-server
257
- ```
258
-
259
- After installation, add DollhouseMCP to your Claude Desktop configuration:
260
-
261
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
262
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
263
- **Linux**: `~/.config/Claude/claude_desktop_config.json`
63
+ Add to your config file:
64
+ - **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
65
+ - **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
66
+ - **Linux**: `~/.config/Claude/claude_desktop_config.json`
264
67
 
265
68
  ```json
266
69
  {
267
70
  "mcpServers": {
268
71
  "dollhousemcp": {
269
- "command": "npx",
270
- "args": ["@dollhousemcp/mcp-server"]
72
+ "command": "node",
73
+ "args": ["/Users/YOUR_USERNAME/mcp-servers/node_modules/@dollhousemcp/mcp-server/dist/index.js"]
271
74
  }
272
75
  }
273
76
  }
274
77
  ```
275
78
 
276
- > **Note**: If you have other MCP servers configured, add dollhousemcp to your existing mcpServers object.
277
-
278
- #### Automated Setup (Alternative) - Claude Desktop Only
79
+ 💡 **Pro tip**: Replace `/Users/YOUR_USERNAME` with your actual home directory path.
279
80
 
280
- > [!WARNING]
281
- > **Claude Desktop Only**: The automated setup script is specifically designed for **Claude Desktop** integration. If you're using **Claude Code**, other AI platforms (ChatGPT, BoltAI, Gemini, etc.), or custom MCP implementations, please use the [Manual Installation](#manual-installation) process below.
282
-
283
- ```bash
284
- # Clone the repository
285
- git clone https://github.com/DollhouseMCP/mcp-server.git
286
- cd mcp-server
287
-
288
- # Run automated setup script (Claude Desktop only)
289
- ./setup.sh
290
- ```
291
-
292
- The setup script will:
293
- - 📦 Install all dependencies
294
- - 🔨 Build the TypeScript code
295
- - 📍 Detect your installation path
296
- - 🔧 Generate the exact Claude Desktop configuration
297
- - 📋 Provide step-by-step setup instructions
298
-
299
- #### Manual Installation
300
-
301
- > **Note**: Manual installation works with all MCP-compatible platforms including Claude Desktop, Claude Code, ChatGPT, BoltAI, Gemini, and custom implementations.
302
-
303
- ```bash
304
- # Clone the repository
305
- git clone https://github.com/DollhouseMCP/mcp-server.git
306
- cd mcp-server
307
-
308
- # Install dependencies and build
309
- npm install
310
- npm run build
311
-
312
- # Optional: Set user identity for persona attribution
313
- export DOLLHOUSE_USER="your-username"
314
- export DOLLHOUSE_EMAIL="your-email@example.com"
315
- ```
316
-
317
- ### Claude Desktop Configuration
81
+ ---
318
82
 
319
- Add DollhouseMCP to your Claude Desktop configuration:
83
+ ### Method 2: Always Latest with npx
320
84
 
321
- **Location**: `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS)
85
+ No installation needed! Configure Claude Desktop to always use the latest version:
322
86
 
323
- #### For NPM Installation:
324
87
  ```json
325
88
  {
326
89
  "mcpServers": {
327
90
  "dollhousemcp": {
328
91
  "command": "npx",
329
- "args": ["@dollhousemcp/mcp-server"]
92
+ "args": ["@dollhousemcp/mcp-server@latest"]
330
93
  }
331
94
  }
332
95
  }
333
96
  ```
334
97
 
335
- #### For Source Installation:
336
- ```json
337
- {
338
- "mcpServers": {
339
- "dollhousemcp": {
340
- "command": "node",
341
- "args": ["/absolute/path/to/DollhouseMCP/dist/index.js"]
342
- }
343
- }
344
- }
345
- ```
346
-
347
- **🔄 After configuration:**
348
- 1. Save the file
349
- 2. Restart Claude Desktop completely
350
- 3. All 42 DollhouseMCP tools will be available
351
-
352
- ## 🛠️ Available Tools (42 Total)
353
-
354
- ### Portfolio Element Management (NEW!)
355
- - **`list_elements`** - List all elements of a specific type
356
- - **`activate_element`** - Activate an element by name and type
357
- - **`get_active_elements`** - Get currently active elements of a type
358
- - **`deactivate_element`** - Deactivate a specific element
359
- - **`get_element_details`** - View detailed information about an element
360
- - **`reload_elements`** - Refresh elements from filesystem
361
-
362
- ### Element-Specific Operations (NEW!)
363
- - **`render_template`** - Render a template element with provided variables
364
- - **`execute_agent`** - Execute an agent element with a specific goal
365
-
366
- ### Persona Export/Import (Specialized Tools)
367
- - **`export_persona`** - Export single persona to JSON format
368
- - **`export_all_personas`** - Export all personas to JSON bundle
369
- - **`import_persona`** - Import persona from file path or JSON string
370
- - **`share_persona`** - Generate shareable URL for persona
371
- - **`import_from_url`** - Import persona from shared URL
372
-
373
- ### GitHub Collection Integration
374
- - **`browse_collection`** - Browse content by section and type (flat structure, no categories)
375
- - **`search_collection`** - Search across all collection content
376
- - **`search_collection_enhanced`** - Enhanced search with pagination, filtering, and sorting
377
- - **`get_collection_content`** - View detailed content info
378
- - **`get_collection_cache_health`** - Monitor collection cache status and performance
379
- - **`install_element`** - One-click download and installation of any element type
380
- - **`submit_persona`** - Submit to collection via GitHub issue
381
-
382
- ### GitHub Portfolio Management (NEW!)
383
- - **`portfolio_status`** - Check your GitHub portfolio repository status
384
- - **`init_portfolio`** - Create a new GitHub portfolio repository
385
- - **`sync_portfolio`** - Synchronize local and GitHub repositories
386
- - **`search_portfolio`** - Search your local portfolio with advanced indexing
387
- - **`search_all`** - Unified search across local, GitHub, and collection sources
388
- - **`submit_content`** - Upload elements to your GitHub portfolio
389
-
390
- ### Collection Configuration (NEW!)
391
- - **`configure_collection_submission`** - Configure auto-submit and default settings
392
- - **`get_collection_submission_config`** - View current submission configuration
393
-
394
- ### User Identity Management
395
- - **`set_user_identity`** - Set username for persona attribution
396
- - **`get_user_identity`** - View current identity status
397
- - **`clear_user_identity`** - Return to anonymous mode
398
-
399
-
400
- ### System Tools
401
- - **`get_build_info`** - Comprehensive build and runtime information
402
-
403
- ### Persona Indicators
404
- - **`configure_indicator`** - Configure how persona indicators appear in AI responses
405
- - **`get_indicator_config`** - View current indicator configuration settings
406
-
407
- ### GitHub Authentication (NEW!)
408
- - **`setup_github_auth`** - Start GitHub OAuth device flow authentication
409
- - **`check_github_auth`** - Check current authentication status
410
- - **`clear_github_auth`** - Remove stored authentication credentials
411
-
412
- ## 📖 Usage Examples
413
-
414
- ### Collection Operations
415
- ```
416
- # Browse collection content by type
417
- browse_collection section="library" type="personas" # Browse all personas
418
- browse_collection section="library" type="skills" # Browse skills
419
- browse_collection section="library" type="templates" # Browse templates
420
-
421
- # Search collection content
422
- search_collection query="writing" # Search for writing personas
423
- search_collection query="code review" # Find code review skills
424
-
425
- # Enhanced collection search with pagination
426
- search_collection_enhanced query="data analysis" maxResults=10 elementType="skills"
427
- search_collection_enhanced query="creative" page=2 resultsPerPage=5
428
-
429
- # Install elements from collection
430
- install_element path="library/personas/storyteller.md" # Install persona
431
- install_element path="library/skills/code-reviewer.md" # Install skill
432
- install_element path="library/templates/email-template.md" # Install template
433
-
434
- # Check collection cache health
435
- get_collection_cache_health
436
- ```
437
-
438
- ### Portfolio Workflow (NEW!)
439
- ```
440
- # Check GitHub portfolio status
441
- portfolio_status # Check repository status
442
-
443
- # Initialize a new GitHub portfolio (first time setup)
444
- init_portfolio # Create GitHub repository
445
- init_portfolio repoName="my-ai-portfolio" # Custom repository name
446
-
447
- # Synchronize local and GitHub portfolios
448
- sync_portfolio # Sync both directions
449
- sync_portfolio direction="push" # Push local to GitHub
450
- sync_portfolio direction="pull" # Pull GitHub to local
451
-
452
- # Search your local portfolio with advanced indexing
453
- search_portfolio query="writing" # Search all element types
454
- search_portfolio query="code" elementType="skills" # Search specific type
455
- search_portfolio query="email" fuzzyMatch=true # Enable fuzzy matching
456
-
457
- # Unified search across all sources (local, GitHub, collection)
458
- search_all query="data analysis" # Search everywhere
459
- search_all query="creative writing" maxResults=20 # Limit results
460
- search_all query="templates" source="local" # Search specific source
461
-
462
- # Submit content with smart auto-detection
463
- submit_content name="code-review" # Auto-detects element type
464
- submit_content name="my-persona" elementType="personas" # Explicit type
465
- submit_content name="email-template" description="Professional email template"
466
-
467
- # Configure collection submission settings
468
- configure_collection_submission autoSubmit=true # Enable auto-submit
469
- configure_collection_submission defaultLicense="MIT" # Set default license
470
- get_collection_submission_config # View current config
471
- ```
472
-
473
- ### Portfolio Element Management
474
- ```
475
- # List elements by type (works with all element types)
476
- list_elements type="personas" # List personas
477
- list_elements type="skills" # List skills
478
- list_elements type="templates" # List templates
479
- list_elements type="agents" # List agents
480
-
481
- # Activate elements to customize AI behavior
482
- activate_element name="code-reviewer" type="skills" # Activate skill
483
- activate_element name="professional" type="personas" # Activate persona
484
- activate_element name="email-format" type="templates" # Activate template
485
-
486
- # View active elements
487
- get_active_elements # All active elements
488
- get_active_elements type="skills" # Active skills only
489
-
490
- # Get detailed element information
491
- get_element_details name="code-reviewer" type="skills" # View skill details
492
- get_element_details name="my-persona" type="personas" # View persona details
493
-
494
- # Deactivate elements
495
- deactivate_element name="code-reviewer" type="skills" # Deactivate specific
496
- deactivate_element type="personas" # Deactivate all personas
497
-
498
- # Refresh elements from filesystem
499
- reload_elements # Reload all elements
500
- reload_elements type="skills" # Reload specific type
501
- ```
502
-
503
- ### Specialized Element Operations
504
- ```
505
- # Render templates with variables
506
- render_template name="project-update" variables='{"project": "DollhouseMCP", "status": "Released"}'
507
- render_template name="email-professional" variables='{"recipient": "John", "subject": "Meeting"}'
508
-
509
- # Execute agents with specific goals
510
- execute_agent name="project-manager" goal="Create a sprint plan for next week"
511
- execute_agent name="data-analyst" goal="Analyze sales trends for Q3"
512
- ```
513
-
514
- ### System Information
515
- ```
516
- # Get comprehensive build and runtime information
517
- get_build_info # Full system info
518
- get_build_info section="version" # Version info only
519
- get_build_info section="environment" # Environment details
520
- get_build_info section="dependencies" # Dependency versions
521
- ```
522
-
523
- ### Persona Management with ElementTools
524
- ```
525
- # List all personas
526
- list_elements type="personas"
527
-
528
- # Activate a persona
529
- activate_element name="Study Buddy" type="personas"
530
-
531
- # Get persona details
532
- get_element_details name="Study Buddy" type="personas"
533
-
534
- # Submit to community collection
535
- submit_persona "Study Buddy" # Share with community
536
- ```
537
-
538
- ### User Identity
539
- ```
540
- set_user_identity "your-username" # Set attribution
541
- get_user_identity # Check current status
542
- clear_user_identity # Return to anonymous
543
- ```
544
-
545
-
546
-
547
-
548
- ### Persona Indicators
549
- DollhouseMCP adds visual indicators to AI responses when a persona is active:
550
- ```
551
- [🎭 Creative Writer v2.1 by @mickdarling] Your creative response here...
552
- ```
553
-
554
- Configure indicators:
555
- ```
556
- get_indicator_config # View current settings
557
- configure_indicator enabled:false # Disable indicators
558
- configure_indicator style:"minimal" # Use minimal format: 🎭 Creative Writer
559
- configure_indicator style:"compact" # Use compact: [Creative Writer v2.1]
560
- configure_indicator style:"full" # Full format (default)
561
- configure_indicator emoji:"🤖" # Change emoji
562
- configure_indicator showAuthor:false # Hide author attribution
563
- configure_indicator bracketStyle:"round" # Use (parentheses) instead of [brackets]
564
- ```
565
-
566
- Environment variables for persistent configuration:
567
- ```bash
568
- export DOLLHOUSE_INDICATOR_ENABLED=true
569
- export DOLLHOUSE_INDICATOR_STYLE=minimal
570
- export DOLLHOUSE_INDICATOR_EMOJI=🎨
571
- ```
572
-
573
- ## 🔄 Complete Workflows
574
-
575
- ### Setting Up Portfolio from Scratch
576
-
577
- **Step 1: Initial Setup**
578
- ```
579
- # Set your user identity for attribution
580
- set_user_identity "your-username"
581
-
582
- # Check current portfolio status
583
- portfolio_status
584
-
585
- # Initialize a new GitHub portfolio repository
586
- init_portfolio repoName="my-ai-portfolio"
587
- ```
588
-
589
- **Step 2: Browse and Install Elements**
590
- ```
591
- # Browse the community collection
592
- browse_collection section="library" type="personas"
593
- browse_collection section="library" type="skills"
594
-
595
- # Search for specific elements
596
- search_collection query="code review"
597
- search_collection_enhanced query="data analysis" elementType="skills" maxResults=5
598
-
599
- # Install elements you like
600
- install_element path="library/skills/code-reviewer.md"
601
- install_element path="library/personas/technical-writer.md"
602
- install_element path="library/templates/project-update.md"
603
- ```
604
-
605
- **Step 3: Customize and Activate**
606
- ```
607
- # Activate installed elements
608
- activate_element name="code-reviewer" type="skills"
609
- activate_element name="technical-writer" type="personas"
610
-
611
- # View your active elements
612
- get_active_elements
613
-
614
- # Get details about any element
615
- get_element_details name="technical-writer" type="personas"
616
- ```
617
-
618
- **Step 4: Sync and Share**
619
- ```
620
- # Submit your custom content to GitHub portfolio
621
- submit_content name="My Assistant"
622
-
623
- # Sync everything to GitHub
624
- sync_portfolio direction="push"
625
-
626
- # Optionally submit personas to community collection
627
- submit_persona name="My Assistant"
628
- ```
629
-
630
- ### Searching Across All Sources
631
-
632
- **Unified Search Example**
633
- ```
634
- # Search everything (local portfolio, GitHub portfolio, community collection)
635
- search_all query="writing assistant"
636
-
637
- # Search with filters
638
- search_all query="code" elementType="skills" maxResults=10
639
-
640
- # Search specific sources
641
- search_all query="templates" source="collection" # Collection only
642
- search_all query="my content" source="local" # Local portfolio only
643
- search_all query="my content" source="github" # GitHub portfolio only
644
- ```
645
-
646
- **Advanced Portfolio Search**
647
- ```
648
- # Search your local portfolio with fuzzy matching
649
- search_portfolio query="analysi" fuzzyMatch=true # Finds "analysis" elements
650
-
651
- # Search by element type
652
- search_portfolio query="email" elementType="templates"
653
- search_portfolio query="review" elementType="skills"
654
-
655
- # Get all elements of a type
656
- list_elements type="personas"
657
- list_elements type="agents"
658
- ```
659
-
660
- ### Content Submission with Auto-Detection
661
-
662
- **Smart Element Detection**
663
- ```
664
- # System automatically detects element type
665
- submit_content name="code-review" # Finds in skills/
666
- submit_content name="email-template" # Finds in templates/
667
- submit_content name="my-persona" # Finds in personas/
668
-
669
- # Add description for better documentation
670
- submit_content name="data-analyzer" description="Advanced data analysis skill"
671
-
672
- # Override auto-detection if needed
673
- submit_content name="ambiguous-name" elementType="skills"
674
- ```
675
-
676
- **Batch Content Management**
677
- ```
678
- # Configure submission settings
679
- configure_collection_submission autoSubmit=true
680
- configure_collection_submission defaultLicense="CC-BY-SA-4.0"
681
-
682
- # Check configuration
683
- get_collection_submission_config
684
-
685
- # Submit multiple elements
686
- submit_content name="skill-1"
687
- submit_content name="skill-2"
688
- submit_content name="template-1"
98
+ 📝 **Note**: The `@latest` tag ensures you always get the newest version. Remove it to use npm's cached version.
689
99
 
690
- # Sync all changes to GitHub
691
- sync_portfolio
692
- ```
693
-
694
- ### Daily Workflow Example
695
-
696
- **Morning Setup**
697
- ```
698
- # Check for updates
699
- get_build_info section="version"
700
- portfolio_status
701
-
702
- # Activate your daily toolkit
703
- activate_element name="code-reviewer" type="skills"
704
- activate_element name="professional" type="personas"
705
- activate_element name="email-template" type="templates"
706
-
707
- # Check what's active
708
- get_active_elements
709
- ```
710
-
711
- **During Work**
712
- ```
713
- # Use templates for communication
714
- render_template name="email-template" variables='{"recipient": "team", "subject": "Sprint Update"}'
715
-
716
- # Deploy agents for tasks
717
- execute_agent name="project-manager" goal="Review pending tasks and prioritize"
718
-
719
- # Search for tools as needed
720
- search_all query="debugging" elementType="skills"
721
- ```
722
-
723
- **End of Day**
724
- ```
725
- # Save any new content
726
- submit_content name="new-skill"
727
- submit_content name="daily-template"
728
-
729
- # Sync to GitHub
730
- sync_portfolio
731
-
732
- # Check system health
733
- get_collection_cache_health
734
- ```
735
-
736
- ### GitHub Authentication (v1.5.0+)
737
-
738
- DollhouseMCP supports GitHub OAuth device flow authentication for enhanced features. **FIXED in v1.6.2**: Default OAuth client ID now works correctly - no configuration needed!
739
-
740
- #### OAuth Setup (For Self-Hosting)
741
-
742
- If you're self-hosting or developing, you need to configure a GitHub OAuth app:
743
-
744
- 1. **Create GitHub OAuth App**:
745
- - Go to GitHub → Settings → Developer settings → OAuth Apps → New OAuth App
746
- - **Application name**: `DollhouseMCP Server`
747
- - **Homepage URL**: `https://github.com/DollhouseMCP/mcp-server`
748
- - **Authorization callback URL**: `http://localhost:12345/callback` (required but not used)
749
- - Click "Register application"
750
-
751
- 2. **Enable Device Flow**:
752
- - In your OAuth app settings, check ✅ **Enable Device Flow**
753
- - Copy your Client ID (format: `Ov23liXXXXXXXXXXXXXX`)
754
-
755
- 3. **Configure Environment**:
756
- ```bash
757
- # Add to your shell profile (.bashrc, .zshrc, etc)
758
- export DOLLHOUSE_GITHUB_CLIENT_ID="your_client_id_here"
759
-
760
- # Or in Claude Desktop config:
761
- "env": {
762
- "DOLLHOUSE_GITHUB_CLIENT_ID": "your_client_id_here"
763
- }
764
- ```
765
-
766
- See [OAuth Setup Guide](docs/setup/OAUTH_SETUP.md) for detailed instructions.
767
-
768
- #### Using Authentication
769
-
770
- ```
771
- setup_github_auth # Start OAuth device flow
772
- check_github_auth # Check authentication status
773
- clear_github_auth # Remove stored credentials
774
- ```
775
-
776
- **Features:**
777
- - 🔐 **Secure Token Storage**: Tokens encrypted with AES-256-GCM
778
- - 📱 **Device Flow**: No need to manually create or paste tokens
779
- - 🔄 **Automatic Token Management**: Secure storage and retrieval
780
- - 🛡️ **Rate Limiting**: Built-in protection against API abuse
781
- - ✅ **Unicode Security**: Prevents homograph attacks
782
-
783
- **How It Works:**
784
- 1. Run `setup_github_auth` to start the OAuth flow
785
- 2. Visit the provided URL and enter the user code
786
- 3. Authorize DollhouseMCP in your browser
787
- 4. Authentication completes automatically
788
- 5. Token is securely stored for future use
789
-
790
- **Example Usage:**
791
- ```
792
- # First-time setup
793
- setup_github_auth
794
- # Copy the user code: XXXX-XXXX
795
- # Visit: https://github.com/login/device
796
- # Enter the code and authorize
797
-
798
- # Check status
799
- check_github_auth
800
- # ✅ Authenticated as: your-username
801
-
802
- # Later sessions automatically use stored token
803
- browse_collection # Works with authenticated access
804
- ```
805
-
806
- ## 🖥️ Cross-Platform Installation
807
-
808
- ### 🐧 Linux Installation
809
-
810
- #### Prerequisites
811
- - **Node.js**: v20.0.0 or higher
812
- - **npm**: v10.0.0 or higher
813
- - **git**: For version control
814
-
815
- ```bash
816
- # Ubuntu/Debian
817
- sudo apt update
818
- sudo apt install -y nodejs npm git
819
- # Verify Node.js version
820
- node --version # Should be v20.0.0 or higher
821
-
822
- # CentOS/RHEL/Fedora
823
- sudo dnf install -y nodejs npm git
824
- # Verify Node.js version
825
- node --version # Should be v20.0.0 or higher
826
-
827
- # Arch Linux
828
- sudo pacman -S nodejs npm git
829
- # Verify Node.js version
830
- node --version # Should be v20.0.0 or higher
831
- ```
100
+ ---
832
101
 
833
- > **Note**: If your system's Node.js is older than v20, install from [NodeSource](https://github.com/nodesource/distributions) or use [nvm](https://github.com/nvm-sh/nvm).
102
+ ### Method 3: Global Installation
834
103
 
835
- #### Installation Steps
836
104
  ```bash
837
- # Clone and build
838
- git clone https://github.com/DollhouseMCP/mcp-server.git
839
- cd mcp-server
840
- npm install
841
- npm run build
842
-
843
- # Optional: Set user identity
844
- export DOLLHOUSE_USER="your-username"
845
- export DOLLHOUSE_EMAIL="your-email@example.com"
105
+ # Install globally (may require sudo/admin)
106
+ npm install -g @dollhousemcp/mcp-server
846
107
  ```
847
108
 
848
- #### Claude Desktop Configuration (Linux)
849
- ```bash
850
- # Configuration location
851
- ~/.config/Claude/claude_desktop_config.json
109
+ **Configure Claude Desktop:**
852
110
 
853
- # Or use XDG_CONFIG_HOME if set
854
- $XDG_CONFIG_HOME/Claude/claude_desktop_config.json
855
- ```
856
-
857
- Configuration content:
858
111
  ```json
859
112
  {
860
113
  "mcpServers": {
861
114
  "dollhousemcp": {
862
- "command": "node",
863
- "args": ["/absolute/path/to/DollhouseMCP/dist/index.js"]
115
+ "command": "dollhousemcp"
864
116
  }
865
117
  }
866
118
  }
867
119
  ```
868
120
 
869
- ### 🪟 Windows Installation
870
-
871
- #### Prerequisites
872
- - **Node.js**: v20.0.0 or higher
873
- - **npm**: v10.0.0 or higher (included with Node.js)
874
- - **git**: For version control
121
+ ⚠️ **Warning**: Only one version system-wide. Consider local installation for more flexibility.
875
122
 
876
- ```powershell
877
- # Install Node.js from https://nodejs.org/ (download LTS version)
878
- # Or using Chocolatey
879
- choco install nodejs --version=20.18.0
880
- choco install git
881
-
882
- # Or using winget
883
- winget install OpenJS.NodeJS Git.Git
884
-
885
- # Verify Node.js version
886
- node --version # Should be v20.0.0 or higher
887
- ```
888
-
889
- #### Installation Steps (PowerShell)
890
- ```powershell
891
- # Clone and build
892
- git clone https://github.com/DollhouseMCP/mcp-server.git
893
- cd mcp-server
894
- npm install
895
- npm run build
896
-
897
- # Optional: Set user identity
898
- $env:DOLLHOUSE_USER = "your-username"
899
- $env:DOLLHOUSE_EMAIL = "your-email@example.com"
900
- ```
901
-
902
- #### Claude Desktop Configuration (Windows)
903
- ```powershell
904
- # Configuration location
905
- $env:APPDATA\Claude\claude_desktop_config.json
906
- ```
907
-
908
- Configuration content (use forward slashes or double backslashes):
909
- ```json
910
- {
911
- "mcpServers": {
912
- "dollhousemcp": {
913
- "command": "node",
914
- "args": ["C:/path/to/DollhouseMCP/dist/index.js"]
915
- }
916
- }
917
- }
918
- ```
123
+ ---
919
124
 
920
- ### 🍎 macOS Installation
125
+ ### 🎯 Advanced: Multiple Configurations
921
126
 
922
- #### Prerequisites
923
- - **Node.js**: v20.0.0 or higher
924
- - **npm**: v10.0.0 or higher (included with Node.js)
925
- - **git**: For version control
127
+ Want separate portfolios for different contexts? Create multiple local installations:
926
128
 
927
129
  ```bash
928
- # Using Homebrew (recommended)
929
- brew install node git
130
+ # Personal assistant
131
+ mkdir ~/mcp-servers/personal
132
+ cd ~/mcp-servers/personal
133
+ npm install @dollhousemcp/mcp-server
930
134
 
931
- # Or download from https://nodejs.org/ (LTS version)
135
+ # Work assistant
136
+ mkdir ~/mcp-servers/work
137
+ cd ~/mcp-servers/work
138
+ npm install @dollhousemcp/mcp-server
932
139
 
933
- # Verify Node.js version
934
- node --version # Should be v20.0.0 or higher
140
+ # Creative writing
141
+ mkdir ~/mcp-servers/creative
142
+ cd ~/mcp-servers/creative
143
+ npm install @dollhousemcp/mcp-server
935
144
  ```
936
145
 
937
- #### Installation Steps
938
- ```bash
939
- # Clone and build
940
- git clone https://github.com/DollhouseMCP/mcp-server.git
941
- cd mcp-server
942
- npm install
943
- npm run build
944
-
945
- # Optional: Set user identity
946
- export DOLLHOUSE_USER="your-username"
947
- export DOLLHOUSE_EMAIL="your-email@example.com"
948
- ```
949
-
950
- #### Claude Desktop Configuration (macOS)
951
- ```bash
952
- # Configuration location
953
- ~/Library/Application Support/Claude/claude_desktop_config.json
954
- ```
146
+ **Configure each with its own portfolio:**
955
147
 
956
- Configuration content:
957
148
  ```json
958
149
  {
959
150
  "mcpServers": {
960
- "dollhousemcp": {
151
+ "dollhouse-personal": {
152
+ "command": "node",
153
+ "args": ["/Users/YOU/mcp-servers/personal/node_modules/@dollhousemcp/mcp-server/dist/index.js"],
154
+ "env": {
155
+ "DOLLHOUSE_PORTFOLIO_DIR": "/Users/YOU/portfolios/personal"
156
+ }
157
+ },
158
+ "dollhouse-work": {
961
159
  "command": "node",
962
- "args": ["/absolute/path/to/DollhouseMCP/dist/index.js"]
160
+ "args": ["/Users/YOU/mcp-servers/work/node_modules/@dollhousemcp/mcp-server/dist/index.js"],
161
+ "env": {
162
+ "DOLLHOUSE_PORTFOLIO_DIR": "/Users/YOU/portfolios/work"
163
+ }
963
164
  }
964
165
  }
965
166
  }
966
167
  ```
967
168
 
968
- ## 🐳 Docker Installation
969
-
970
- ### Quick Start with Docker
971
- ```bash
972
- # Clone repository
973
- git clone https://github.com/DollhouseMCP/mcp-server.git
974
- cd mcp-server
975
-
976
- # Build and run with Docker Compose
977
- docker-compose up -d
978
-
979
- # Or build manually
980
- docker build -t dollhousemcp .
981
- docker run -d --name dollhousemcp dollhousemcp
982
- ```
169
+ Now you can enable/disable different configurations in Claude Desktop as needed!
983
170
 
984
- ### Docker Compose (Recommended)
985
-
986
- #### Production deployment:
987
- ```bash
988
- docker-compose up -d
989
- ```
990
-
991
- #### Development with hot reload:
992
- ```bash
993
- docker-compose --profile dev up dollhousemcp-dev
994
- ```
171
+ ---
995
172
 
996
- ### Custom Personas with Docker
997
- ```bash
998
- # Mount your custom personas directory
999
- docker run -d \
1000
- --name dollhousemcp \
1001
- -v /path/to/your/personas:/app/personas \
1002
- -e DOLLHOUSE_USER="your-username" \
1003
- dollhousemcp
1004
- ```
173
+ ### Verify Installation
1005
174
 
1006
- ### Docker Environment Variables
1007
- ```bash
1008
- # Set user identity
1009
- DOLLHOUSE_USER=your-username
1010
- DOLLHOUSE_EMAIL=your-email@example.com
175
+ After configuring and restarting Claude Desktop, test with:
1011
176
 
1012
- # Custom personas directory (inside container)
1013
- PERSONAS_DIR=/app/personas
1014
-
1015
- # Node.js environment
1016
- NODE_ENV=production
1017
177
  ```
1018
-
1019
- ## 🧪 Testing
1020
-
1021
- ### Running Tests
1022
-
1023
- The project includes comprehensive tests for cross-platform compatibility:
1024
-
1025
- ```bash
1026
- # Run all tests
1027
- npm test
1028
-
1029
- # Run tests with coverage
1030
- npm run test:coverage
1031
-
1032
- # Run tests in watch mode (for development)
1033
- npm run test:watch
1034
-
1035
- # Run specific test suites
1036
- npm run test:personas
1037
- npm run test:collection
178
+ list_elements type="personas"
1038
179
  ```
1039
180
 
1040
- ### Test Coverage
1041
-
1042
- Current test coverage includes:
1043
- - ✅ **102 comprehensive tests** covering all functionality
1044
- - ✅ **Auto-update system** - GitHub API, backup/rollback, dependency validation
1045
- - ✅ **Security testing** - Command injection prevention, input validation
1046
- - ✅ **Cross-platform compatibility** - Windows, macOS, Linux path handling
1047
- - ✅ **Version validation** - Parsing tests for git/npm output formats
1048
- - ✅ **Edge case coverage** - Network failures, missing dependencies, malformed input
1049
-
1050
- ### Manual Verification
1051
-
1052
- Verify your setup works correctly:
1053
-
1054
- ```bash
1055
- # Build the project
1056
- npm run build
1057
-
1058
- # Test the server (should output server info)
1059
- node dist/index.js --help 2>/dev/null || echo "Server compiled successfully"
181
+ You should see your available personas. If not, check the [Troubleshooting](#troubleshooting) section.
1060
182
 
1061
- # Verify personas directory
1062
- ls -la personas/
1063
- ```
1064
-
1065
- ## ☁️ Cloud Deployment
183
+ ---
1066
184
 
1067
- ### Container Registries
185
+ ### 📁 Default Portfolio Location
1068
186
 
1069
- The project supports deployment to:
1070
- - **GitHub Container Registry** (ghcr.io)
1071
- - **Docker Hub**
1072
- - **AWS ECR**
1073
- - **Google Container Registry**
187
+ By default, your elements are stored in:
188
+ - **macOS/Linux**: `~/.dollhouse/portfolio/`
189
+ - **Windows**: `%USERPROFILE%\.dollhouse\portfolio\`
1074
190
 
1075
- ### Example Cloud Deployments
191
+ Use the `DOLLHOUSE_PORTFOLIO_DIR` environment variable to customize this location.
1076
192
 
1077
- #### AWS ECS
1078
- ```json
1079
- {
1080
- "family": "dollhousemcp",
1081
- "containerDefinitions": [{
1082
- "name": "dollhousemcp",
1083
- "image": "ghcr.io/mickdarling/dollhousemcp:latest",
1084
- "memory": 512,
1085
- "cpu": 256,
1086
- "environment": [
1087
- {"name": "NODE_ENV", "value": "production"},
1088
- {"name": "PERSONAS_DIR", "value": "/app/personas"},
1089
- {"name": "DOLLHOUSE_USER", "value": "production"}
1090
- ]
1091
- }]
1092
- }
1093
- ```
193
+ ## 🎯 Getting Started
1094
194
 
1095
- #### Google Cloud Run
1096
- ```bash
1097
- gcloud run deploy dollhousemcp \
1098
- --image ghcr.io/mickdarling/dollhousemcp:latest \
1099
- --platform managed \
1100
- --region us-central1 \
1101
- --set-env-vars NODE_ENV=production,DOLLHOUSE_USER=production
1102
- ```
195
+ Once installed, try these commands in Claude:
1103
196
 
1104
- #### Azure Container Instances
1105
197
  ```bash
1106
- az container create \
1107
- --name dollhousemcp \
1108
- --resource-group myResourceGroup \
1109
- --image ghcr.io/mickdarling/dollhousemcp:latest \
1110
- --environment-variables NODE_ENV=production DOLLHOUSE_USER=production
1111
- ```
1112
-
1113
- ## 🏗️ Project Structure
1114
-
1115
- ```
1116
- DollhouseMCP/
1117
- ├── .github/
1118
- │ ├── actions/
1119
- │ │ └── validate-yaml/ # Reusable YAML validation action
1120
- │ ├── workflows/ # CI/CD workflows
1121
- │ └── ISSUE_TEMPLATE/ # Issue templates for bug/feature/task
1122
- ├── __tests__/
1123
- │ ├── unit/ # Unit tests for components
1124
- │ ├── integration/ # Integration tests
1125
- │ └── *.test.ts # Test files (600+ tests total)
1126
- ├── src/
1127
- │ ├── index.ts # Main MCP server (DollhouseMCPServer)
1128
- │ ├── cache/ # API caching layer
1129
- │ ├── config/ # Configuration management
1130
- │ ├── collection/ # GitHub collection integration
1131
- │ ├── persona/ # Persona management core
1132
- │ ├── security/ # Input validation and security
1133
- │ ├── server/ # MCP server setup and tools
1134
- │ ├── types/ # TypeScript type definitions
1135
- │ ├── update/ # Auto-update system components
1136
- │ └── utils/ # Utility functions
1137
- ├── dist/ # Compiled JavaScript (auto-generated)
1138
- ├── personas/ # Default persona collection
1139
- │ ├── creative-writer.md
1140
- │ ├── technical-analyst.md
1141
- │ ├── eli5-explainer.md
1142
- │ ├── business-consultant.md
1143
- │ └── debug-detective.md
1144
- ├── custom-personas/ # User-created personas (git-ignored)
1145
- ├── docs/ # Documentation
1146
- │ └── development/ # Development notes and guides
1147
- ├── scripts/ # Management and utility scripts
1148
- ├── Dockerfile # Multi-stage Docker build
1149
- ├── docker-compose.yml # Production and development configs
1150
- ├── package.json # Project config (dollhousemcp v1.6.10)
1151
- ├── tsconfig.json # TypeScript configuration
1152
- ├── jest.config.cjs # Jest test configuration
1153
- ├── setup.sh # Automated installation script
1154
- ├── LICENSE # AGPL-3.0 with platform stability
1155
- ├── CHANGELOG.md # Version history
1156
- ├── claude.md # Project context for Claude
1157
- └── README.md # This file
1158
- ```
1159
-
1160
- ## 📝 Creating Custom Personas
1161
-
1162
- ### Enhanced Persona Format
1163
-
1164
- Create `.md` files in the `personas/` directory with this structure:
1165
-
1166
- ```markdown
1167
- ---
1168
- name: "Your Persona Name"
1169
- description: "Brief description of what this persona does"
1170
- unique_id: "auto-generated-if-missing"
1171
- author: "your-username"
1172
- triggers: ["keyword1", "keyword2"]
1173
- version: "1.0"
1174
- category: "creative"
1175
- age_rating: "all"
1176
- ai_generated: false
1177
- generation_method: "human"
1178
- price: "free"
1179
- license: "CC-BY-SA-4.0"
1180
- ---
1181
-
1182
- # Your Persona Name
198
+ # Browse available personas
199
+ list_elements type="personas"
1183
200
 
1184
- Your persona instructions go here. This content defines how the AI should behave when this persona is activated.
201
+ # Activate a persona
202
+ activate_element name="creative-writer" type="personas"
1185
203
 
1186
- ## Response Style
1187
- - Communication guidelines
1188
- - Tone and approach
1189
- - Specific behaviors
204
+ # Browse the community collection
205
+ browse_collection type="personas"
1190
206
 
1191
- ## Key Techniques
1192
- - Problem-solving methods
1193
- - Interaction patterns
207
+ # Search for specific content
208
+ search_collection query="python" type="skills"
1194
209
  ```
1195
210
 
1196
- ### Metadata Fields
1197
-
1198
- #### Required Fields
1199
- | Field | Description |
1200
- |-------|-------------|
1201
- | `name` | Display name for the persona |
1202
- | `description` | Brief description of purpose and capabilities |
1203
-
1204
- #### Optional Fields
1205
- | Field | Description |
1206
- |-------|-------------|
1207
- | `unique_id` | Auto-generated in format: `what-it-is_YYYYMMDD-HHMMSS_who-made-it` |
1208
- | `author` | Creator username (uses DOLLHOUSE_USER environment variable or generates anonymous ID) |
1209
- | `category` | One of: creative, professional, educational, gaming, personal |
1210
- | `triggers` | Array of keywords that suggest when to use this persona |
1211
- | `version` | Semantic version number (auto-incremented on edits) |
1212
- | `age_rating` | Content rating: all, 13+, or 18+ |
1213
- | `ai_generated` | Boolean flag indicating if content was AI-created |
1214
- | `price` | Monetization field - **TODO: Future Release** (will support "free" or pricing tiers) |
1215
-
1216
- ## 📚 Built-in Personas
1217
-
1218
- | Persona | Purpose | Best For |
1219
- |---------|---------|----------|
1220
- | **Creative Writer** | Imaginative storytelling and creative content | Brainstorming, creative writing, engaging narratives |
1221
- | **Technical Analyst** | Deep technical analysis and systematic problem-solving | Architecture decisions, debugging, technical docs |
1222
- | **ELI5 Explainer** | Simplifying complex topics for beginners | Teaching, onboarding, concept explanation |
1223
- | **Business Consultant** | Strategic business analysis and recommendations | Strategy planning, business decisions, market analysis |
1224
- | **Debug Detective** | Systematic debugging and troubleshooting | Bug hunting, system troubleshooting, root cause analysis |
1225
-
1226
- ## 🏪 Collection Integration (Beta)
1227
-
1228
- > **🧪 Beta Feature**: The GitHub-powered collection is currently in beta. Features may change based on community feedback.
1229
-
1230
- DollhouseMCP includes an experimental GitHub-powered collection:
1231
-
1232
- - **Browse by Category**: creative, professional, educational, gaming, personal
1233
- - **Search Content**: Find personas by keywords and descriptions
1234
- - **One-Click Install**: Download and integrate collection personas
1235
- - **Community Submissions**: Submit your personas via `submit_persona` tool
1236
- - **Version Control**: Full Git history for all collection content
1237
-
1238
- > **Note**: Collection features require internet connection and GitHub API access. Rate limits may apply.
211
+ > **📘 New User?** Follow our [Roundtrip Workflow Guide](docs/guides/ROUNDTRIP_WORKFLOW_USER_GUIDE.md) for a complete walkthrough of discovering, customizing, and sharing AI elements with the community.
1239
212
 
1240
- ### ⚠️ Migration Guide - Breaking Changes
1241
-
1242
- **Important**: Tool names have changed in recent versions:
1243
- - `browse_marketplace` → `browse_collection`
1244
- - `search_marketplace` → `search_collection`
1245
- - `get_marketplace_persona` → `get_collection_content`
1246
-
1247
- If you have scripts or workflows using the old tool names, please update them to use the new names.
1248
-
1249
- ## 💼 Business Model & Legal
1250
-
1251
- ### Licensing
1252
- - **Core Server**: AGPL-3.0 (prevents proprietary competing platforms)
1253
- - **Persona Content**: CC-BY-SA-4.0 for free personas, custom licenses for premium
1254
- - **Platform Terms**: Creator-friendly 80/20 revenue split (applies only to paid personas when monetization is implemented)
1255
-
1256
- ### Platform Stability Commitments
1257
- - 90-day advance notice for monetization changes
1258
- - 12-month revenue sharing locks for existing paid personas
1259
- - Transparent governance for platform policy updates
1260
- - Full data portability rights
1261
- - Community advisory input on policy changes
1262
-
1263
- ## 🛠️ Development
1264
-
1265
- ### Available Scripts
1266
-
1267
- | Script | Description |
1268
- |--------|-------------|
1269
- | `npm run build` | Compile TypeScript to JavaScript |
1270
- | `npm run start` | Run the compiled server |
1271
- | `npm run dev` | Run in development mode with auto-reload |
1272
- | `npm run clean` | Remove compiled files |
1273
- | `npm run rebuild` | Clean and rebuild the project |
1274
- | `npm run setup` | Install dependencies and build |
1275
- | `npm test` | Run the comprehensive test suite |
1276
- | `npm run test:coverage` | Run tests with coverage reporting |
1277
-
1278
- ### Environment Variables
1279
-
1280
- Customize server behavior with these environment variables:
213
+ ## Key Features
1281
214
 
1282
- ```bash
1283
- # User Attribution
1284
- export DOLLHOUSE_USER="your-username" # User attribution for persona creation
1285
- export DOLLHOUSE_EMAIL="your-email" # Contact email (optional)
215
+ | Feature | Description |
216
+ |---------|-------------|
217
+ | 🎭 **41 MCP Tools** | Complete portfolio element management through chat interface |
218
+ | 🏪 **GitHub Collection** | Browse, search, install, and submit personas to community collection |
219
+ | 🔄 **Roundtrip Workflow** | Complete cycle: discover → customize → share → collaborate |
220
+ | 📁 **GitHub Portfolio** | Personal repository for storing and versioning your AI elements |
221
+ | 👤 **User Identity System** | Environment-based attribution for persona creators |
222
+ | 🆔 **Unique ID System** | Advanced ID generation: `{type}_{name}_{author}_{YYYYMMDD}-{HHMMSS}` |
223
+ | 💬 **Chat-Based Management** | Create, edit, and validate personas through conversational interface |
224
+ | 🔄 **Real-time Operations** | Live editing with automatic version bumping and validation |
225
+ | 📦 **NPM Installation** | Install MCP servers from npm with cross-platform support and atomic operations |
226
+ | 🛡️ **Data Protection** | Copy-on-write for default personas, comprehensive backup system |
227
+ | 🏠 **Local-First Architecture** | Full functionality without cloud dependency |
1286
228
 
1287
- # GitHub OAuth Configuration
1288
- export DOLLHOUSE_GITHUB_CLIENT_ID="Ov23li..." # OAuth app client ID (for self-hosting)
229
+ ## 🎨 Portfolio Elements
1289
230
 
1290
- # Directory Configuration
1291
- export PERSONAS_DIR="/custom/path/to/personas" # Custom personas directory
231
+ DollhouseMCP supports multiple element types for customizing AI behavior:
1292
232
 
1293
- # Auto-Update Configuration
1294
- export GITHUB_TOKEN="your-token" # For private repository access (optional)
233
+ | Element | Purpose | Status |
234
+ |---------|---------|--------|
235
+ | 🎭 **Personas** | Define AI personality, tone, and behavioral characteristics | ✅ Available |
236
+ | 🛠️ **Skills** | Add specific capabilities like code review, data analysis, or creative writing | ✅ Available |
237
+ | 📝 **Templates** | Create reusable response formats for emails, reports, documentation | ✅ Available |
238
+ | 🤖 **Agents** | Build autonomous assistants that can pursue goals and make decisions | ✅ Available |
239
+ | 💬 **Prompts** | Pre-configured conversation starters and structured interactions | 🔄 Coming Soon |
240
+ | 🧠 **Memory** | Persistent context storage with retention policies and search capabilities | 🔄 Coming Soon |
241
+ | 🎯 **Ensemble** | Orchestrate multiple elements together as one unified entity | 🔄 Coming Soon |
1295
242
 
1296
- # Development Configuration
1297
- export NODE_ENV="development" # Development mode
1298
- export DEBUG="dollhousemcp:*" # Debug logging (optional)
1299
- ```
243
+ Your portfolio lives in `~/.dollhouse/portfolio/` with elements organized by type.
1300
244
 
1301
245
  ## 🔧 Troubleshooting
1302
246
 
1303
- ### ⚠️ NPM Installation Issues (v1.4.2)
1304
-
1305
- If the MCP server crashes on startup after NPM installation:
1306
- 1. Check your version: `npm list -g @dollhousemcp/mcp-server`
1307
- 2. If you have v1.4.2, upgrade immediately: `npm install -g @dollhousemcp/mcp-server@latest`
1308
- 3. Clear your portfolio and let it regenerate: `rm -rf ~/.dollhouse/portfolio`
1309
-
1310
- **Note**: v1.4.2 had a critical bug that prevented proper initialization. v1.4.3 attempted to fix this but introduced new crashes. Both issues are fixed in v1.4.4.
1311
-
1312
- ### Directory Structure (v1.4.3+)
1313
-
1314
- As of v1.4.3, all element directories use plural names:
1315
- - `~/.dollhouse/portfolio/personas/` (was `persona/` in v1.4.2)
1316
- - `~/.dollhouse/portfolio/skills/` (was `skill/` in v1.4.2)
1317
- - `~/.dollhouse/portfolio/templates/` (was `template/` in v1.4.2)
1318
- - `~/.dollhouse/portfolio/agents/` (was `agent/` in v1.4.2)
1319
- - `~/.dollhouse/portfolio/memories/` (was `memory/` in v1.4.2)
1320
- - `~/.dollhouse/portfolio/ensembles/` (was `ensemble/` in v1.4.2)
1321
-
1322
- If you upgraded from v1.4.2, the server will automatically migrate your directories.
1323
-
1324
247
  ### Common Issues
1325
248
 
1326
249
  | Issue | Solution |
1327
250
  |-------|----------|
1328
- | **v1.4.2 or v1.4.3 installation broken** | Upgrade to v1.4.4+ immediately |
1329
251
  | **Personas not loading** | Check `~/.dollhouse/portfolio/personas/` directory exists |
1330
- | **Server won't start** | Run `npm run rebuild` to clean and rebuild |
252
+ | **Server won't start** | Ensure Node.js v20+ is installed: `node --version` |
1331
253
  | **Collection not working** | Check internet connection and GitHub API access |
1332
- | **User identity not saving** | Set `DOLLHOUSE_USER` environment variable before starting Claude |
1333
- | **"Cannot find module" errors** | Ensure `npm install` completed successfully |
1334
- | **TypeScript compilation errors** | Verify Node.js version is 20+ with `node --version` |
1335
254
  | **Tools not appearing in Claude** | Restart Claude Desktop completely after config changes |
1336
- | **Default personas modified** | v1.2.1+ uses copy-on-write; git restore if needed |
1337
- | **Update/rollback issues** | Check write permissions; disable with `DOLLHOUSE_DISABLE_UPDATES=true` |
255
+ | **"Cannot find module" errors** | Reinstall: `npm install -g @dollhousemcp/mcp-server@latest` |
1338
256
  | **Rate limit errors** | Wait 60 seconds; GitHub API has hourly limits |
1339
257
 
1340
- ### Debug Steps
1341
-
1342
- 1. **Check build status:**
1343
- ```bash
1344
- npm run build
1345
- ```
1346
-
1347
- 2. **Verify persona files:**
1348
- ```bash
1349
- ls -la personas/*.md
1350
- ```
1351
-
1352
- 3. **Test server startup:**
1353
- ```bash
1354
- node dist/index.js
1355
- ```
1356
-
1357
- 4. **Validate configuration:**
1358
- ```bash
1359
- # Check Claude Desktop config
1360
- cat ~/Library/Application\ Support/Claude/claude_desktop_config.json
1361
-
1362
- # Verify Node.js version (requires 20+)
1363
- node --version
1364
-
1365
- # Check npm version
1366
- npm --version
1367
- ```
1368
-
1369
- 5. **Check system status:**
1370
- ```bash
1371
- # Use within Claude Desktop
1372
- get_build_info # Get build and runtime information
1373
- ```
1374
-
1375
- 6. **Validate personas:**
1376
- Use the `reload_personas` tool to check for loading errors
1377
-
1378
- ## 📚 Documentation
1379
-
1380
- ### User Guides (START HERE!)
1381
- - **[🎯 Roundtrip Workflow Guide](docs/guides/ROUNDTRIP_WORKFLOW_USER_GUIDE.md)** - Complete workflow: discover → customize → share
1382
- - **[📁 Portfolio Setup Guide](docs/guides/PORTFOLIO_SETUP_GUIDE.md)** - Set up your GitHub portfolio step-by-step
1383
- - **[🔧 Troubleshooting Guide](docs/guides/TROUBLESHOOTING_ROUNDTRIP.md)** - Solutions for common workflow issues
1384
-
1385
- ### Element System Documentation
1386
- - **[Element Architecture](docs/ELEMENT_ARCHITECTURE.md)** - System design and core concepts
1387
- - **[Element Types Reference](docs/ELEMENT_TYPES.md)** - Detailed guide for all element types
1388
- - **[Developer Guide](docs/ELEMENT_DEVELOPER_GUIDE.md)** - How to create new element types
1389
- - **[API Reference](docs/API_REFERENCE.md)** - Complete MCP tool documentation
1390
- - **[Migration Guide](docs/MIGRATION_TO_PORTFOLIO.md)** - Upgrading from personas-only
1391
-
1392
- ### Setup & Configuration
1393
- - **[OAuth Setup Guide](docs/setup/OAUTH_SETUP.md)** - GitHub authentication configuration
1394
- - **[Anonymous Submission Guide](docs/ANONYMOUS_SUBMISSION_GUIDE.md)** - Use without GitHub authentication
1395
-
1396
- ### Additional Resources
1397
- - **[Security Guidelines](docs/SECURITY.md)** - Security best practices
1398
- - **[Contributing Guide](CONTRIBUTING.md)** - How to contribute
1399
-
1400
- ## 🤝 Contributing
1401
-
1402
- We welcome contributions! DollhouseMCP includes integrated tools for submitting personas directly from Claude.
1403
-
1404
- ### Integrated Contribution Process (Recommended)
1405
-
1406
- 1. **Create or modify a persona** using the chat-based tools:
1407
- ```
1408
- create_persona "My Awesome Persona" "A helpful assistant for..." "professional"
1409
- ```
1410
-
1411
- 2. **Validate your persona** to ensure quality:
1412
- ```
1413
- validate_persona "My Awesome Persona"
1414
- ```
1415
-
1416
- 3. **Submit to the collection** directly from Claude:
1417
- ```
1418
- submit_persona "My Awesome Persona"
1419
- ```
1420
- This automatically creates a GitHub issue for community review.
1421
-
1422
- ### Manual Contribution Process
1423
-
1424
- 1. Fork the repository
1425
- 2. Create persona files in `personas/` or `custom-personas/`
1426
- 3. Follow the metadata format and naming conventions
1427
- 4. Test thoroughly with `validate_persona` tool
1428
- 5. Submit a pull request with clear description
1429
-
1430
- ### Reporting Issues
1431
-
1432
- Please include:
1433
- - Node.js version (`node --version`)
1434
- - Operating system and version
1435
- - Complete error messages
1436
- - Steps to reproduce the issue
1437
- - Relevant persona files (if applicable)
1438
- - Claude Desktop configuration (without sensitive paths)
1439
-
1440
- ### Development Guidelines
1441
-
1442
- 1. **Follow TypeScript best practices**
1443
- 2. **Maintain existing code style and patterns**
1444
- 3. **Add comprehensive error handling**
1445
- 4. **Update documentation for new features**
1446
- 5. **Test thoroughly across platforms before submitting PRs**
1447
- 6. **Include tests for new functionality**
1448
- 7. **Follow semantic versioning for releases**
1449
-
1450
- ### Development Workflow
258
+ ### Need Help?
1451
259
 
1452
- ```bash
1453
- # Fork and clone
1454
- git clone https://github.com/your-username/DollhouseMCP.git
1455
- cd mcp-server
260
+ - 📖 [Full Troubleshooting Guide](docs/TROUBLESHOOTING.md)
261
+ - 💬 [GitHub Issues](https://github.com/DollhouseMCP/mcp-server/issues)
262
+ - 💭 [GitHub Discussions](https://github.com/DollhouseMCP/mcp-server/discussions)
1456
263
 
1457
- # Install dependencies
1458
- npm install
264
+ ## 📚 Resources
1459
265
 
1460
- # Create feature branch
1461
- git checkout -b feature/your-feature-name
266
+ ### Documentation
267
+ - [Roundtrip Workflow Guide](docs/guides/ROUNDTRIP_WORKFLOW_USER_GUIDE.md)
268
+ - [Portfolio Setup Guide](docs/guides/PORTFOLIO_SETUP_GUIDE.md)
269
+ - [Element Detection Guide](docs/guides/ELEMENT_DETECTION_GUIDE.md)
270
+ - [PersonaTools Migration Guide](docs/PERSONATOOLS_MIGRATION_GUIDE.md)
271
+ - [API Documentation](docs/API.md)
1462
272
 
1463
- # Make changes and test
1464
- npm run build
1465
- npm test
273
+ ### Community
274
+ - [GitHub Repository](https://github.com/DollhouseMCP/mcp-server)
275
+ - [NPM Package](https://www.npmjs.com/package/@dollhousemcp/mcp-server)
276
+ - [Community Collection](https://github.com/DollhouseMCP/collection)
277
+ - [Discord Community](https://discord.gg/dollhousemcp) (coming soon)
1466
278
 
1467
- # Commit and push
1468
- git commit -m "feat: your feature description"
1469
- git push origin feature/your-feature-name
1470
-
1471
- # Submit pull request
1472
- ```
1473
-
1474
- ## 📄 API Reference
1475
-
1476
- ### MCP Tool Specifications
1477
-
1478
- Each tool follows the MCP specification:
1479
-
1480
- ```typescript
1481
- interface DollhouseTool {
1482
- name: string;
1483
- description: string;
1484
- inputSchema: {
1485
- type: "object";
1486
- properties: Record<string, any>;
1487
- required?: string[];
1488
- };
1489
- }
1490
- ```
1491
-
1492
- ### Tool Categories
1493
-
1494
- #### Persona Export/Import
1495
- ```typescript
1496
- // export_persona - { persona: string }
1497
- // export_all_personas - { includeDefaults?: boolean }
1498
- // import_persona - { source: string, overwrite?: boolean }
1499
- // share_persona - { persona: string, expiryDays?: number }
1500
- // import_from_url - { url: string, overwrite?: boolean }
1501
- ```
1502
-
1503
- #### Collection Integration
1504
- ```typescript
1505
- // browse_collection - { section?: string, type?: string }
1506
- // search_collection - { query: string }
1507
- // get_collection_content - { path: string }
1508
- // install_element - { path: string, type?: string }
1509
- // submit_persona - { persona: string }
1510
- ```
1511
-
1512
- #### User Identity Management
1513
- ```typescript
1514
- // set_user_identity - { username: string }
1515
- // get_user_identity - No parameters
1516
- // clear_user_identity - No parameters
1517
- ```
1518
-
1519
-
1520
-
1521
- ### Error Handling
1522
-
1523
- The server provides detailed error messages for:
1524
- - **Invalid persona identifiers** - Clear suggestions for valid names
1525
- - **File system issues** - Permission and path resolution errors
1526
- - **Malformed persona files** - YAML parsing and validation errors
1527
- - **Network errors** - GitHub API and collection connectivity issues
1528
- - **Runtime errors** - Server startup and operation failures
1529
-
1530
- ### Response Formats
1531
-
1532
- All responses follow consistent patterns:
1533
- - **Success responses**: Include requested data and operation status
1534
- - **Error responses**: Include error type, message, and suggested resolution
1535
- - **Progress indicators**: Step-by-step feedback for long operations
1536
- - **Validation results**: Detailed reports with recommendations
279
+ ### Development
280
+ - [Contributing Guide](CONTRIBUTING.md)
281
+ - [Security Policy](SECURITY.md)
282
+ - [Full Changelog](CHANGELOG.md)
1537
283
 
1538
284
  ## 📄 License
1539
285
 
1540
- This project is licensed under the **AGPL-3.0** License with Platform Stability Commitments - see the [LICENSE](LICENSE) file for details.
1541
-
1542
- **Platform Stability Guarantees:**
1543
- - 90-day advance notice for policy changes
1544
- - 12-month revenue sharing locks
1545
- - Full data portability rights
1546
- - Community advisory input
1547
-
1548
- ## 🏷️ Version History
1549
-
1550
- ### v1.6.9 - August 26, 2025
1551
-
1552
- **Critical Fixes**: Fixed OAuth helper NPM packaging and performance testing workflow
1553
-
1554
- #### 🔧 Bug Fixes
1555
- - **OAuth NPM Packaging**: Fixed missing `oauth-helper.mjs` file in NPM distribution
1556
- - File was present in repository but not included in published package
1557
- - OAuth authentication now works correctly for NPM users
1558
- - **Performance Tests**: Fixed CI workflow running all tests instead of performance tests
1559
- - Performance monitoring now works correctly in GitHub Actions
286
+ DollhouseMCP is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).
1560
287
 
1561
- ---
1562
-
1563
- ### v1.6.3 - August 25, 2025
288
+ ### What this means:
289
+ - ✅ **Free to use** for personal and commercial purposes
290
+ - **Modify and distribute** with the same license
291
+ - ✅ **Network use** requires source code disclosure
292
+ - ✅ **Platform stability** commitments protect users
1564
293
 
1565
- **OAuth Authentication Fix**: Fixed invalid OAuth client ID and improved error handling
1566
-
1567
- #### 🔧 Bug Fixes
1568
- - **OAuth Client ID**: Updated from incorrect ID to correct `Ov23li9gyNZP6m9aJ2EP`
1569
- - **Error Handling**: Added comprehensive error codes throughout OAuth flow
1570
- - **Debug Logging**: Added detailed logging at each authentication step
294
+ See [LICENSE](LICENSE) for full terms.
1571
295
 
1572
296
  ---
1573
297
 
1574
- ### v1.6.2 - August 25, 2025
1575
-
1576
- **Critical Hotfix**: Fixed OAuth default client ID not being used in `setup_github_auth` tool
1577
-
1578
- #### 🔧 Bug Fixes
1579
- - **OAuth Authentication**: Fixed critical bug where default OAuth client ID wasn't used in `setupGitHubAuth()` method
1580
- - **Configuration Fallback**: Now correctly uses `GitHubAuthManager.getClientId()` with proper fallback hierarchy
1581
-
1582
- #### 📚 Technical Details
1583
- - Made `GitHubAuthManager.getClientId()` public (was private)
1584
- - Updated `setupGitHubAuth()` to use proper fallback chain
1585
- - Restored "just works" authentication experience promised in v1.6.1
1586
-
1587
- ---
1588
-
1589
- ### v1.6.1 - August 25, 2025
1590
-
1591
- **⚠️ Breaking Changes**:
1592
- - 🔄 **Serialization Format Change** - `BaseElement.serialize()` now returns markdown with YAML frontmatter instead of JSON
1593
- - Migration: Use new `serializeToJSON()` method for backward compatibility
1594
- - 🏗️ **Server Initialization** - Portfolio initialization moved from constructor to `run()` method
1595
- - New `ensureInitialized()` method provides lazy initialization for tests
1596
-
1597
- **Major New Features**:
1598
- - 🔍 **Enhanced Portfolio System** (6 new tools):
1599
- - `portfolio_status` - Check GitHub portfolio status
1600
- - `init_portfolio` - Create GitHub portfolio repository
1601
- - `sync_portfolio` - Synchronize local/GitHub repositories
1602
- - `search_portfolio` - Search with advanced indexing
1603
- - `search_all` - Unified search across all sources
1604
- - Complete GitHub integration with indexing
1605
- - 📊 **Enhanced Collection Search**:
1606
- - `search_collection_enhanced` - Pagination, filtering, sorting
1607
- - `get_collection_cache_health` - Cache monitoring
1608
- - Smart caching with ETags and conditional requests
1609
- - 🛠️ **System Tools**:
1610
- - `get_build_info` - Comprehensive build and runtime information
1611
- - ⚙️ **Collection Configuration**:
1612
- - `configure_collection_submission` - Auto-submit settings
1613
- - `get_collection_submission_config` - Check submission config
1614
-
1615
- **Infrastructure Improvements**:
1616
- - 🚀 **High-Performance Caching** - Memory-aware LRU cache system
1617
- - 🔒 **Enhanced Security** - YAML bomb protection, content validation
1618
- - 📦 **Build Information Service** - Runtime and build info API
1619
- - 🎯 **Error Handler** - Centralized error management system
1620
- - 🔄 **Roundtrip Workflow** - Complete content submission cycle
1621
-
1622
- **Statistics**:
1623
- - 42 total MCP tools (down from 51 - 9 PersonaTools removed, 5 preserved)
1624
- - 89 commits ahead of main
1625
- - 257 files changed
1626
- - 50,857 lines added
1627
- - 76 test files modified/added
1628
-
1629
- ### v1.5.1 - August 5, 2025
1630
- **Critical Bug Fixes**:
1631
- - 🔧 **Fixed OAuth Token Retrieval** - `setup_github_auth` tokens now properly used for API calls
1632
- - 🔧 **Fixed Collection Browsing** - Removed legacy category validation blocking browsing
1633
- - 🔧 **Persona Creation Simplified** - Categories no longer required or validated
1634
- - ✅ **Element System Alignment** - Full consistency with new architecture
1635
-
1636
- ### v1.5.0 - August 5, 2025
1637
- **GitHub OAuth Authentication**:
1638
- - 🔐 **OAuth Device Flow** - Secure authentication without manual token management
1639
- - 🔒 **AES-256-GCM Encryption** - Tokens encrypted at rest with machine-specific keys
1640
- - 🛡️ **Rate Limiting** - Built-in protection against brute force attacks
1641
- - ✅ **Natural Language Flow** - User-friendly authentication instructions
1642
- - 🧪 **Comprehensive Tests** - 420+ lines of OAuth implementation tests
1643
-
1644
- ### v1.4.5 - August 5, 2025
1645
- **Claude Desktop Integration Fix**:
1646
- - ✅ **Fixed "Server disconnected" errors** when using `npx` or `dollhousemcp` CLI
1647
- - 🔄 **Progressive retry mechanism** for better compatibility across different machine speeds
1648
- - 🔒 **Security improvements** - removed detailed error logging to prevent information disclosure
1649
- - 🧪 **Added comprehensive tests** for execution detection logic
1650
-
1651
- ### v1.4.4 - August 4, 2025
1652
- **Emergency Hotfix**:
1653
- - 🚨 **Fixed v1.4.3 total failure** - initialization crashes fixed
1654
- - 🔧 **Fixed jsdom crash** - heavy dependencies now load lazily
1655
- - 🐳 **Fixed Docker compatibility** - handles read-only environments
1656
-
1657
- ### v1.4.3 - August 4, 2025
1658
- **Directory Structure Fix**:
1659
- - 🚨 **Fixed NPM installation failure** but introduced new crashes
1660
-
1661
- ### v1.4.2 - August 4, 2025
1662
- **Critical NPM Installation Fix**:
1663
- - 🚨 **Fixed NPM installation failure** where empty portfolios caused server crashes
1664
- - 📦 **DefaultElementProvider** automatically populates default content on first run
1665
- - 🔍 **Smart path detection** searches multiple NPM/Git installation locations
1666
- - 💬 **Helpful error messages** guide new users when portfolios are empty
1667
- - 🔒 **Security hardened** with audit logging and file integrity verification
1668
-
1669
- ### v1.4.1 - August 2, 2025
1670
- **NPM Installation Support**:
1671
- - 📦 **Install MCP servers from npm packages** with full cross-platform support
1672
- - 🔄 **Atomic operations** with transaction-based rollback on failure
1673
- - 📊 **Progress indicators** for better user experience during long operations
1674
- - 🏗️ **Centralized configuration** respecting platform conventions (XDG on Linux)
1675
- - 🛠️ **FileOperations utility** for consistent cross-platform behavior
1676
-
1677
- ### v1.4.0 - August 2, 2025
1678
- **Complete Element System**:
1679
- - 🎭 **Ensemble elements** for orchestrating multiple elements together
1680
- - 🧠 **Memory elements** with retention policies and search capabilities
1681
- - 🤖 **Agent elements** with goal-oriented decision making
1682
- - 📝 **Template elements** with secure variable substitution
1683
- - 🛠️ **Skill elements** with parameter system and proficiency tracking
1684
- - 🔒 **Comprehensive security** throughout all element types
1685
-
1686
- ### v1.3.3 - August 2, 2025
1687
- **Portfolio System & Element Types**:
1688
- - 🎨 **Portfolio-based architecture** for managing all AI customization elements
1689
- - 🛠️ **Generic element tools** that work with any element type
1690
- - 📁 **Structured directory layout** under `~/.dollhouse/portfolio/`
1691
- - 🔄 **Backward compatibility** maintained for existing personas
1692
-
1693
- ### v1.3.2 - August 1, 2025
1694
- **GitFlow Implementation**:
1695
- - 🔀 **GitFlow branching model** for better release management
1696
- - 🏷️ **Automated version tagging** on releases
1697
- - 📦 **NPM release automation** (pending token configuration)
1698
-
1699
- ### v1.3.1 - July 31, 2025
1700
- **Collection System Updates**:
1701
- - 🏪 **Improved collection browsing** with better error handling
1702
- - 🔍 **Enhanced search functionality** for finding content
1703
- - 📥 **Better installation process** with validation
1704
-
1705
- ### v1.3.0 - July 30, 2025
1706
- **Major Architecture Refactor**:
1707
- - 🏗️ **Element interface system** providing foundation for all element types
1708
- - 🔐 **Security-first implementation** with comprehensive protections
1709
- - 📊 **Improved test coverage** reaching 96%+
1710
-
1711
- ### v1.2.5 - July 2025
1712
-
1713
- **Collection Rename & Breaking Changes**:
1714
- - 🔄 **Renamed all "marketplace" tools to "collection"**:
1715
- - `browse_marketplace` → `browse_collection`
1716
- - `search_marketplace` → `search_collection`
1717
- - `get_marketplace_persona` → `get_collection_content`
1718
- - `install_persona` → `install_persona` (unchanged)
1719
- - `submit_persona` → `submit_persona` (unchanged)
1720
- - ✅ **Added backward compatibility aliases** (deprecated, will be removed in v2.0.0)
1721
- - ✅ **Updated repository** from `/personas` to `/collection`
1722
- - ✅ **Created migration guide** for users to update their scripts
1723
- - ✅ **Fixed all date references** from January to July 2025
1724
-
1725
- ### v1.2.4 - July 10, 2025
1726
-
1727
- **Critical Fix**:
1728
- - ✅ **Fixed MCP protocol compatibility** - console output no longer breaks JSON-RPC communication
1729
- - ✅ **Added MCP-safe logger utility** for proper logging during protocol sessions
1730
- - ✅ **Resolves connection failures** in Claude Desktop
1731
- - ✅ **Updated Docker tests** to work with new logging approach
1732
- - ✅ **Added comprehensive logger unit tests**
1733
-
1734
- ### v1.2.3 - July 10, 2025
1735
-
1736
- **Bug Fix**:
1737
- - ✅ **Fixed personas directory path resolution** for production environments
1738
- - ✅ **Changed from process.cwd() to __dirname-based paths**
1739
- - ✅ **Fixed setup script** with correct tool count and repository URLs
1740
-
1741
- ### v1.2.2 - July 10, 2025
1742
- - ✅ **Comprehensive security enhancements**:
1743
- - Content sanitization with DOMPurify (SEC-001)
1744
- - YAML injection prevention (SEC-003)
1745
- - GitHub token security (SEC-004)
1746
- - Docker container hardening (SEC-005)
1747
- - ✅ **487 comprehensive tests** including extensive security coverage
1748
- - ✅ **CI timing test fixes** for reliable cross-platform testing
1749
- - ✅ **TypeScript compilation fixes** for all test files
1750
- - ✅ **All security vulnerabilities resolved** (0 active alerts)
1751
-
1752
- ### v1.2.1 - July 8, 2025
1753
- - ✅ **Critical bug fixes** for data protection:
1754
- - Copy-on-write for default personas (Issue #145)
1755
- - User personas included in backups (Issue #144)
1756
- - ✅ **Node.js 20+ requirement** for npm publishing compatibility
1757
- - ✅ **372 comprehensive tests** covering all functionality
1758
- - ✅ **Enhanced security** with all vulnerabilities resolved
1759
- - ✅ **Improved documentation** with clear prerequisites
1760
-
1761
- ### v1.2.0 - July 7, 2025
1762
- - ✅ **Rate limiting implementation** to prevent API abuse
1763
- - ✅ **GPG signature verification** for release authenticity
1764
- - ✅ **GitHub Advanced Security** integration
1765
- - ✅ **309 tests** with improved CI environment coverage
1766
- - ✅ **Package optimization** at 279.3 kB
1767
-
1768
- ### v1.1.0 - July 4, 2025
1769
- - ✅ **Platform-specific badges** for Windows, macOS, Linux visibility
1770
- - ✅ **GitHub Project management** with issue templates and milestones
1771
- - ✅ **ARM64 Docker fix** switching from Alpine to Debian base images
1772
- - ✅ **100% workflow reliability** (except Docker ARM64)
1773
- - ✅ **First GitHub release** with CHANGELOG.md
1774
- - ✅ **21 total MCP tools** at time of release
1775
-
1776
- ### Phase 2B+ - July 3, 2025
1777
- - ✅ **Enterprise-grade auto-update system** with 4 new MCP tools
1778
- - ✅ **50 comprehensive tests** covering all functionality
1779
- - ✅ **Security hardening** - eliminated all command injection vulnerabilities
1780
- - ✅ **Cross-platform support** - Windows, macOS, Linux with CI/CD testing
1781
- - ✅ **Docker containerization** with production and development configurations
1782
- - ✅ **21 total MCP tools** with backup/rollback and dependency validation
1783
-
1784
- ### Phase 2B - July 1-2, 2025
1785
- - ✅ Complete chat-based persona management
1786
- - ✅ GitHub marketplace integration
1787
- - ✅ User identity and attribution system
1788
- - ✅ Real-time validation and editing
1789
- - ✅ Enterprise-grade GitHub Actions security
1790
-
1791
- ### Phase 1 - July 1, 2025
1792
- - ✅ Fresh AGPL-3.0 licensed repository
1793
- - ✅ Enhanced unique ID system
1794
- - ✅ Anonymous user support
1795
- - ✅ Marketplace-ready metadata schema
1796
-
1797
- ---
1798
-
1799
- **🎭 Transform your AI interactions with the power of personas**
1800
-
1801
- For support, please [open an issue](https://github.com/DollhouseMCP/mcp-server/issues) or visit our [collection](https://github.com/DollhouseMCP/collection).
298
+ *Built with ❤️ by the DollhouseMCP team*