@ai-dossier/mcp-server 1.0.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.
Files changed (50) hide show
  1. package/README.md +379 -0
  2. package/dist/index.d.ts +8 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +332 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/parsers/signatureVerifier.d.ts +10 -0
  7. package/dist/parsers/signatureVerifier.d.ts.map +1 -0
  8. package/dist/parsers/signatureVerifier.js +85 -0
  9. package/dist/parsers/signatureVerifier.js.map +1 -0
  10. package/dist/resources/concept.d.ts +7 -0
  11. package/dist/resources/concept.d.ts.map +1 -0
  12. package/dist/resources/concept.js +11 -0
  13. package/dist/resources/concept.js.map +1 -0
  14. package/dist/resources/protocol.d.ts +7 -0
  15. package/dist/resources/protocol.d.ts.map +1 -0
  16. package/dist/resources/protocol.js +11 -0
  17. package/dist/resources/protocol.js.map +1 -0
  18. package/dist/resources/security.d.ts +7 -0
  19. package/dist/resources/security.d.ts.map +1 -0
  20. package/dist/resources/security.js +11 -0
  21. package/dist/resources/security.js.map +1 -0
  22. package/dist/tools/listDossiers.d.ts +19 -0
  23. package/dist/tools/listDossiers.d.ts.map +1 -0
  24. package/dist/tools/listDossiers.js +104 -0
  25. package/dist/tools/listDossiers.js.map +1 -0
  26. package/dist/tools/readDossier.d.ts +27 -0
  27. package/dist/tools/readDossier.d.ts.map +1 -0
  28. package/dist/tools/readDossier.js +46 -0
  29. package/dist/tools/readDossier.js.map +1 -0
  30. package/dist/tools/verifyDossier.d.ts +15 -0
  31. package/dist/tools/verifyDossier.d.ts.map +1 -0
  32. package/dist/tools/verifyDossier.js +107 -0
  33. package/dist/tools/verifyDossier.js.map +1 -0
  34. package/dist/utils/errors.d.ts +35 -0
  35. package/dist/utils/errors.d.ts.map +1 -0
  36. package/dist/utils/errors.js +68 -0
  37. package/dist/utils/errors.js.map +1 -0
  38. package/dist/utils/logger.d.ts +31 -0
  39. package/dist/utils/logger.d.ts.map +1 -0
  40. package/dist/utils/logger.js +58 -0
  41. package/dist/utils/logger.js.map +1 -0
  42. package/dist/utils/resourceLoader.d.ts +20 -0
  43. package/dist/utils/resourceLoader.d.ts.map +1 -0
  44. package/dist/utils/resourceLoader.js +46 -0
  45. package/dist/utils/resourceLoader.js.map +1 -0
  46. package/dist/utils/response.d.ts +17 -0
  47. package/dist/utils/response.d.ts.map +1 -0
  48. package/dist/utils/response.js +22 -0
  49. package/dist/utils/response.js.map +1 -0
  50. package/package.json +45 -0
package/README.md ADDED
@@ -0,0 +1,379 @@
1
+ # Dossier MCP Server
2
+
3
+ > **Status**: ✅ MVP Complete - Core security verification tools working, ready for testing with Claude Code
4
+
5
+ Make dossier automation truly frictionless with Model Context Protocol integration.
6
+
7
+ ---
8
+
9
+ ## The Problem
10
+
11
+ Currently, using dossiers requires explaining the concept and providing file contents to your LLM:
12
+
13
+ ```
14
+ ❌ Current Reality:
15
+ User: "Use the project-init dossier"
16
+ LLM: "I don't know what a dossier is, and I can't access that file"
17
+
18
+ User: *Explains dossiers, copies file content, pastes it*
19
+ LLM: "OK, now I understand. Let me execute this..."
20
+ ```
21
+
22
+ This creates friction for new users and breaks the promise of natural language automation.
23
+
24
+ ---
25
+
26
+ ## The Solution
27
+
28
+ The **Dossier MCP Server** enables LLMs to discover, understand, and execute dossiers automatically:
29
+
30
+ ```
31
+ ✅ With MCP Server:
32
+ User: "Use the project-init dossier"
33
+ LLM: *Uses MCP to read concept, find dossier, understand protocol*
34
+ LLM: "Found project-init dossier v1.0.0. Analyzing prerequisites..."
35
+ ```
36
+
37
+ ---
38
+
39
+ ## What It Provides
40
+
41
+ ### 🛠️ Tools
42
+
43
+ - **`list_dossiers`** - Discover available dossiers
44
+ - **`read_dossier`** - Get dossier content and metadata
45
+ - **`get_registry`** - Understand dossier relationships
46
+ - **`validate_dossier`** - Check specification compliance
47
+ - **`verify_dossier`** - 🔒 Verify integrity and authenticity (security)
48
+
49
+ ### 📚 Resources
50
+
51
+ - **`dossier://concept`** - What are dossiers?
52
+ - **`dossier://protocol`** - How to execute them (includes security protocol)
53
+ - **`dossier://specification`** - How to create them
54
+ - **`dossier://examples`** - Example dossiers
55
+ - **`dossier://security`** - 🔒 Security architecture and trust model
56
+ - **`dossier://keys`** - 🔒 Official and community public keys
57
+
58
+ ### 💡 Prompts ✅ Implemented
59
+
60
+ - **`execute-dossier`** - Run a dossier following the verification → execution protocol
61
+ - **`create-dossier`** - Author a new dossier using the official meta-dossier template
62
+
63
+ ---
64
+
65
+ ## Installation
66
+
67
+ ### Using with Claude Code
68
+
69
+ ```bash
70
+ # Global installation (available across all projects)
71
+ claude mcp add dossier --scope user -- npx @ai-dossier/mcp-server
72
+
73
+ # Or project-only installation
74
+ claude mcp add dossier -- npx @ai-dossier/mcp-server
75
+ ```
76
+
77
+ Verify with:
78
+ ```bash
79
+ claude mcp list
80
+ ```
81
+
82
+ Then try it:
83
+ ```
84
+ "List available dossiers in this project"
85
+ "Execute the project-init dossier"
86
+ ```
87
+
88
+ ---
89
+
90
+ ## Example Usage
91
+
92
+ ### Discovery
93
+
94
+ ```
95
+ User: "What dossiers are available in this project?"
96
+
97
+ LLM: *Uses list_dossiers tool*
98
+ Found 5 dossiers:
99
+ - project-init (Setup) - Initialize project structure
100
+ - environment-setup (Setup) - Configure development environment
101
+ - deploy-to-aws (DevOps) - Deploy to AWS with validation
102
+ - run-tests (Development) - Execute test suite
103
+ - cleanup (Maintenance) - Remove temporary files
104
+ ```
105
+
106
+ ### Execution
107
+
108
+ ```
109
+ User: "Use the project-init dossier"
110
+
111
+ LLM: *Uses read_dossier tool to get content*
112
+ *Uses dossier://protocol resource to understand execution*
113
+
114
+ Executing: project-init dossier v1.0.0
115
+
116
+ Prerequisites:
117
+ ✓ Directory is writable
118
+ ✓ Git is installed
119
+
120
+ Context Analysis:
121
+ - Detected: Node.js project (package.json found)
122
+ - Framework: Express.js
123
+ - TypeScript: Yes
124
+
125
+ Decision: Using Node.js + TypeScript template
126
+
127
+ Actions:
128
+ ✓ Created .gitignore
129
+ ✓ Created tsconfig.json
130
+ ✓ Created README.md
131
+ ✓ Initialized Git repository
132
+
133
+ Validation:
134
+ ✓ All files created successfully
135
+ ✓ Git repository initialized
136
+
137
+ Project initialization complete!
138
+ ```
139
+
140
+ ### Registry Understanding
141
+
142
+ ```
143
+ User: "I want to set up a new project from scratch. What's the recommended workflow?"
144
+
145
+ LLM: *Uses get_registry tool*
146
+
147
+ Based on your project's dossier registry, here's the recommended
148
+ "Greenfield Project Setup" journey:
149
+
150
+ 1. project-init - Initialize basic structure
151
+ 2. environment-setup - Configure dev environment
152
+ 3. dependency-install - Install dependencies
153
+ 4. test-setup - Set up testing framework
154
+
155
+ Would you like me to execute this journey?
156
+ ```
157
+
158
+ ---
159
+
160
+ ## 🔒 Built-in Security
161
+
162
+ The MCP server includes comprehensive security verification for all dossiers.
163
+
164
+ ### Automatic Verification
165
+
166
+ Every dossier execution through the MCP server is automatically verified:
167
+
168
+ ```
169
+ User: "Execute the deploy-to-aws dossier"
170
+
171
+ LLM: *Calls verify_dossier tool*
172
+
173
+ 🔒 Security Verification:
174
+ ✅ Integrity: Checksum verified (content not tampered with)
175
+ ✅ Authenticity: Signed by imboard-ai-2024 (trusted)
176
+ ⚠️ Risk Level: HIGH
177
+
178
+ This dossier will:
179
+ • Modify AWS infrastructure
180
+ • Require AWS credentials
181
+ • Execute Infrastructure as Code
182
+
183
+ Proceed? (y/N)
184
+ ```
185
+
186
+ ### Security Features
187
+
188
+ **1. Integrity Verification**
189
+ - SHA256 checksums ensure dossiers haven't been modified
190
+ - Automatic verification before execution
191
+ - BLOCKS execution if checksum fails
192
+
193
+ **2. Cryptographic Signatures (Optional)**
194
+ - Dossiers can be signed with minisign
195
+ - Trust levels: VERIFIED, SIGNED_UNKNOWN, UNSIGNED, INVALID
196
+ - User controls which keys to trust
197
+
198
+ **3. Risk Assessment**
199
+ - Every dossier declares risk level (low/medium/high/critical)
200
+ - Specific risk factors (modifies_files, requires_credentials, etc.)
201
+ - Detailed destructive operations list
202
+ - Automatic approval requests for high-risk operations
203
+
204
+ **4. Trust Model**
205
+ - Decentralized (like Docker Hub)
206
+ - Official dossiers signed by Imboard AI
207
+ - Community dossiers signed by their authors
208
+ - Users choose which keys to trust in `~/.dossier/trusted-keys.txt`
209
+
210
+ ### Verification Responses
211
+
212
+ The `verify_dossier` tool returns:
213
+
214
+ - **ALLOW**: Verified signature from trusted source + low risk → Execute confidently
215
+ - **WARN**: Unsigned/unknown signer OR high risk → Request user approval
216
+ - **BLOCK**: Checksum failed OR signature invalid → DO NOT EXECUTE
217
+
218
+ ### Resources
219
+
220
+ - `dossier://security` - Full security architecture documentation
221
+ - `dossier://keys` - Official and community public keys
222
+ - `dossier://protocol` - Includes security verification steps
223
+
224
+ Learn more: [SECURITY_ARCHITECTURE.md](../SECURITY_ARCHITECTURE.md)
225
+
226
+ ---
227
+
228
+ ## For Developers
229
+
230
+ ### Project Structure
231
+
232
+ ```
233
+ dossier-mcp-server/
234
+ ├── src/
235
+ │ ├── index.ts # Server entry point
236
+ │ ├── tools/ # Tool implementations
237
+ │ ├── resources/ # Resource providers
238
+ │ ├── prompts/ # Prompt templates
239
+ │ ├── parsers/ # Dossier parsing logic
240
+ │ └── types/ # TypeScript definitions
241
+ ├── tests/ # Test suite
242
+ ├── examples/ # Usage examples
243
+ └── docs/ # Additional documentation
244
+ ```
245
+
246
+ ### Development Setup
247
+
248
+ ```bash
249
+ # Clone and install
250
+ git clone https://github.com/imboard-ai/ai-dossier.git
251
+ cd dossier/mcp-server
252
+ npm install
253
+
254
+ # Build
255
+ npm run build
256
+
257
+ # Test
258
+ npm test
259
+
260
+ # Run locally
261
+ npm start
262
+ ```
263
+
264
+ ### Contributing
265
+
266
+ See [SPECIFICATION.md](./SPECIFICATION.md) for detailed API design.
267
+
268
+ Contributions welcome! This is a critical piece of infrastructure for making dossiers truly frictionless.
269
+
270
+ **Priority areas**:
271
+ - [ ] Core tool implementations
272
+ - [ ] Resource providers
273
+ - [ ] Dossier parser
274
+ - [ ] Validation logic
275
+ - [ ] Test coverage
276
+ - [ ] Documentation
277
+
278
+ ---
279
+
280
+ ## Roadmap
281
+
282
+ ### Phase 1: MVP (v1.0.0) - ✅ COMPLETED
283
+ - [x] Basic tools (list_dossiers, read_dossier) ✅
284
+ - [x] Core resources (concept, protocol, security) ✅
285
+ - [x] **Security verification** (`verify_dossier` tool) ✅
286
+ - [x] Checksum verification (SHA256) ✅
287
+ - [x] Signature verification (minisign) ✅
288
+ - [x] Trust management (trusted-keys.txt) ✅
289
+ - [x] Risk assessment and recommendations ✅
290
+ - [x] TypeScript implementation ✅
291
+ - [x] MCP SDK integration ✅
292
+ - [x] Structured logging ✅
293
+ - [x] Working locally with Claude Code ✅
294
+
295
+ ### Phase 2: Testing & Publishing (v1.1.0) - 🚧 NEXT
296
+ - [x] MCP Prompts (execute-dossier, create-dossier) ✅
297
+ - [ ] Integration testing with Claude Code
298
+ - [ ] Test with all example dossiers
299
+ - [ ] NPM package preparation
300
+ - [ ] CLI entry point for global install
301
+ - [ ] Advanced validation (`validate_dossier` tool)
302
+ - [ ] Registry relationship parsing (`get_registry` tool)
303
+ - [ ] Comprehensive test suite
304
+ - [ ] Documentation improvements
305
+
306
+ ### Phase 3: Ecosystem (v1.2.0) - Target: Future
307
+ - [ ] NPM package published
308
+ - [ ] Journey map support
309
+ - [ ] suggest-dossier prompt (LLM-based discovery)
310
+ - [ ] VS Code extension
311
+ - [ ] Web documentation
312
+ - [ ] Community templates
313
+ - [ ] Video tutorials
314
+
315
+ ---
316
+
317
+ ## Why This Matters
318
+
319
+ The Dossier MCP Server is the key to making dossiers **truly universal and frictionless**.
320
+
321
+ **Without MCP**:
322
+ - Users must manually explain dossiers
323
+ - Copy-pasting file contents is tedious
324
+ - No standardized discovery
325
+ - Limited to file-access-capable tools
326
+
327
+ **With MCP**:
328
+ - LLMs understand dossiers automatically
329
+ - Discovery is programmatic
330
+ - Works with any MCP-compatible tool
331
+ - Execution follows standard protocol
332
+ - Registry relationships are understood
333
+
334
+ This transforms dossiers from "interesting idea" to "production-ready automation standard".
335
+
336
+ ---
337
+
338
+ ## Technical Details
339
+
340
+ - **Protocol**: MCP 1.0
341
+ - **Language**: TypeScript
342
+ - **Runtime**: Node.js 18+
343
+ - **Dependencies**: @modelcontextprotocol/sdk
344
+ - **License**: MIT
345
+
346
+ ---
347
+
348
+ ## Links
349
+
350
+ - [Full Specification](./SPECIFICATION.md)
351
+ - [Dossier Standard](../README.md)
352
+ - [Examples](../examples/)
353
+ - [Contributing Guidelines](./CONTRIBUTING.md)
354
+
355
+ ---
356
+
357
+ ## Status
358
+
359
+ **Current Phase**: MVP Complete ✅
360
+
361
+ **What's Working**:
362
+ - ✅ Security verification (checksum + signature)
363
+ - ✅ Dossier listing and reading
364
+ - ✅ MCP protocol integration
365
+ - ✅ Resource serving (protocol, security, concept)
366
+ - ✅ Structured logging and error handling
367
+ - ✅ **MCP Prompts** (execute-dossier, create-dossier)
368
+
369
+ **Next Steps**:
370
+ 1. NPM package preparation
371
+ 2. Advanced validation tool
372
+ 3. Registry support
373
+ 4. Publish to NPM
374
+
375
+ **Contributors Welcome!** This is a community-driven effort to make LLM automation truly accessible.
376
+
377
+ ---
378
+
379
+ **Questions or ideas?** Open an issue or start a discussion!
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Dossier MCP Server
4
+ * Model Context Protocol server for dossier automation standard
5
+ * Enables LLMs to discover, verify, and execute dossiers securely
6
+ */
7
+ export {};
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;GAIG"}