memory-journal-mcp 4.4.2 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/codeql.yml +1 -6
- package/.github/workflows/docker-publish.yml +15 -49
- package/.github/workflows/lint-and-test.yml +1 -1
- package/.github/workflows/secrets-scanning.yml +4 -3
- package/.github/workflows/security-update.yml +3 -3
- package/CHANGELOG.md +213 -0
- package/CONTRIBUTING.md +132 -97
- package/DOCKER_README.md +184 -235
- package/Dockerfile +27 -24
- package/README.md +218 -190
- package/SECURITY.md +27 -35
- package/dist/cli.js +16 -1
- package/dist/cli.js.map +1 -1
- package/dist/constants/ServerInstructions.d.ts +5 -1
- package/dist/constants/ServerInstructions.d.ts.map +1 -1
- package/dist/constants/ServerInstructions.js +133 -73
- package/dist/constants/ServerInstructions.js.map +1 -1
- package/dist/constants/icons.d.ts +2 -2
- package/dist/constants/icons.d.ts.map +1 -1
- package/dist/constants/icons.js +7 -6
- package/dist/constants/icons.js.map +1 -1
- package/dist/database/SqliteAdapter.d.ts +37 -24
- package/dist/database/SqliteAdapter.d.ts.map +1 -1
- package/dist/database/SqliteAdapter.js +319 -157
- package/dist/database/SqliteAdapter.js.map +1 -1
- package/dist/database/schema.d.ts +45 -0
- package/dist/database/schema.d.ts.map +1 -0
- package/dist/database/schema.js +92 -0
- package/dist/database/schema.js.map +1 -0
- package/dist/filtering/ToolFilter.d.ts +1 -1
- package/dist/filtering/ToolFilter.d.ts.map +1 -1
- package/dist/filtering/ToolFilter.js +13 -2
- package/dist/filtering/ToolFilter.js.map +1 -1
- package/dist/github/GitHubIntegration.d.ts.map +1 -1
- package/dist/github/GitHubIntegration.js +1 -3
- package/dist/github/GitHubIntegration.js.map +1 -1
- package/dist/handlers/prompts/github.d.ts +12 -0
- package/dist/handlers/prompts/github.d.ts.map +1 -0
- package/dist/handlers/prompts/github.js +178 -0
- package/dist/handlers/prompts/github.js.map +1 -0
- package/dist/handlers/prompts/index.d.ts +23 -2
- package/dist/handlers/prompts/index.d.ts.map +1 -1
- package/dist/handlers/prompts/index.js +7 -432
- package/dist/handlers/prompts/index.js.map +1 -1
- package/dist/handlers/prompts/workflow.d.ts +12 -0
- package/dist/handlers/prompts/workflow.d.ts.map +1 -0
- package/dist/handlers/prompts/workflow.js +277 -0
- package/dist/handlers/prompts/workflow.js.map +1 -0
- package/dist/handlers/resources/core.d.ts +11 -0
- package/dist/handlers/resources/core.d.ts.map +1 -0
- package/dist/handlers/resources/core.js +433 -0
- package/dist/handlers/resources/core.js.map +1 -0
- package/dist/handlers/resources/github.d.ts +11 -0
- package/dist/handlers/resources/github.d.ts.map +1 -0
- package/dist/handlers/resources/github.js +314 -0
- package/dist/handlers/resources/github.js.map +1 -0
- package/dist/handlers/resources/graph.d.ts +11 -0
- package/dist/handlers/resources/graph.d.ts.map +1 -0
- package/dist/handlers/resources/graph.js +204 -0
- package/dist/handlers/resources/graph.js.map +1 -0
- package/dist/handlers/resources/index.d.ts +5 -20
- package/dist/handlers/resources/index.d.ts.map +1 -1
- package/dist/handlers/resources/index.js +16 -1278
- package/dist/handlers/resources/index.js.map +1 -1
- package/dist/handlers/resources/shared.d.ts +60 -0
- package/dist/handlers/resources/shared.d.ts.map +1 -0
- package/dist/handlers/resources/shared.js +49 -0
- package/dist/handlers/resources/shared.js.map +1 -0
- package/dist/handlers/resources/team.d.ts +13 -0
- package/dist/handlers/resources/team.d.ts.map +1 -0
- package/dist/handlers/resources/team.js +119 -0
- package/dist/handlers/resources/team.js.map +1 -0
- package/dist/handlers/resources/templates.d.ts +13 -0
- package/dist/handlers/resources/templates.d.ts.map +1 -0
- package/dist/handlers/resources/templates.js +310 -0
- package/dist/handlers/resources/templates.js.map +1 -0
- package/dist/handlers/tools/admin.d.ts +8 -0
- package/dist/handlers/tools/admin.d.ts.map +1 -0
- package/dist/handlers/tools/admin.js +270 -0
- package/dist/handlers/tools/admin.js.map +1 -0
- package/dist/handlers/tools/analytics.d.ts +8 -0
- package/dist/handlers/tools/analytics.d.ts.map +1 -0
- package/dist/handlers/tools/analytics.js +256 -0
- package/dist/handlers/tools/analytics.js.map +1 -0
- package/dist/handlers/tools/backup.d.ts +8 -0
- package/dist/handlers/tools/backup.d.ts.map +1 -0
- package/dist/handlers/tools/backup.js +224 -0
- package/dist/handlers/tools/backup.js.map +1 -0
- package/dist/handlers/tools/core.d.ts +9 -0
- package/dist/handlers/tools/core.d.ts.map +1 -0
- package/dist/handlers/tools/core.js +326 -0
- package/dist/handlers/tools/core.js.map +1 -0
- package/dist/handlers/tools/export.d.ts +8 -0
- package/dist/handlers/tools/export.d.ts.map +1 -0
- package/dist/handlers/tools/export.js +89 -0
- package/dist/handlers/tools/export.js.map +1 -0
- package/dist/handlers/tools/github/helpers.d.ts +34 -0
- package/dist/handlers/tools/github/helpers.d.ts.map +1 -0
- package/dist/handlers/tools/github/helpers.js +52 -0
- package/dist/handlers/tools/github/helpers.js.map +1 -0
- package/dist/handlers/tools/github/insights-tools.d.ts +8 -0
- package/dist/handlers/tools/github/insights-tools.d.ts.map +1 -0
- package/dist/handlers/tools/github/insights-tools.js +104 -0
- package/dist/handlers/tools/github/insights-tools.js.map +1 -0
- package/dist/handlers/tools/github/issue-tools.d.ts +8 -0
- package/dist/handlers/tools/github/issue-tools.d.ts.map +1 -0
- package/dist/handlers/tools/github/issue-tools.js +359 -0
- package/dist/handlers/tools/github/issue-tools.js.map +1 -0
- package/dist/handlers/tools/github/kanban-tools.d.ts +8 -0
- package/dist/handlers/tools/github/kanban-tools.d.ts.map +1 -0
- package/dist/handlers/tools/github/kanban-tools.js +108 -0
- package/dist/handlers/tools/github/kanban-tools.js.map +1 -0
- package/dist/handlers/tools/github/milestone-tools.d.ts +9 -0
- package/dist/handlers/tools/github/milestone-tools.d.ts.map +1 -0
- package/dist/handlers/tools/github/milestone-tools.js +302 -0
- package/dist/handlers/tools/github/milestone-tools.js.map +1 -0
- package/dist/handlers/tools/github/mutation-tools.d.ts +12 -0
- package/dist/handlers/tools/github/mutation-tools.d.ts.map +1 -0
- package/dist/handlers/tools/github/mutation-tools.js +15 -0
- package/dist/handlers/tools/github/mutation-tools.js.map +1 -0
- package/dist/handlers/tools/github/read-tools.d.ts +8 -0
- package/dist/handlers/tools/github/read-tools.d.ts.map +1 -0
- package/dist/handlers/tools/github/read-tools.js +260 -0
- package/dist/handlers/tools/github/read-tools.js.map +1 -0
- package/dist/handlers/tools/github/schemas.d.ts +467 -0
- package/dist/handlers/tools/github/schemas.d.ts.map +1 -0
- package/dist/handlers/tools/github/schemas.js +335 -0
- package/dist/handlers/tools/github/schemas.js.map +1 -0
- package/dist/handlers/tools/github.d.ts +14 -0
- package/dist/handlers/tools/github.d.ts.map +1 -0
- package/dist/handlers/tools/github.js +28 -0
- package/dist/handlers/tools/github.js.map +1 -0
- package/dist/handlers/tools/index.d.ts +15 -20
- package/dist/handlers/tools/index.d.ts.map +1 -1
- package/dist/handlers/tools/index.js +117 -2909
- package/dist/handlers/tools/index.js.map +1 -1
- package/dist/handlers/tools/relationships.d.ts +8 -0
- package/dist/handlers/tools/relationships.d.ts.map +1 -0
- package/dist/handlers/tools/relationships.js +308 -0
- package/dist/handlers/tools/relationships.js.map +1 -0
- package/dist/handlers/tools/schemas.d.ts +108 -0
- package/dist/handlers/tools/schemas.d.ts.map +1 -0
- package/dist/handlers/tools/schemas.js +122 -0
- package/dist/handlers/tools/schemas.js.map +1 -0
- package/dist/handlers/tools/search.d.ts +8 -0
- package/dist/handlers/tools/search.d.ts.map +1 -0
- package/dist/handlers/tools/search.js +282 -0
- package/dist/handlers/tools/search.js.map +1 -0
- package/dist/handlers/tools/team.d.ts +11 -0
- package/dist/handlers/tools/team.d.ts.map +1 -0
- package/dist/handlers/tools/team.js +239 -0
- package/dist/handlers/tools/team.js.map +1 -0
- package/dist/server/McpServer.d.ts +4 -0
- package/dist/server/McpServer.d.ts.map +1 -1
- package/dist/server/McpServer.js +48 -297
- package/dist/server/McpServer.js.map +1 -1
- package/dist/server/Scheduler.d.ts +91 -0
- package/dist/server/Scheduler.d.ts.map +1 -0
- package/dist/server/Scheduler.js +201 -0
- package/dist/server/Scheduler.js.map +1 -0
- package/dist/transports/http.d.ts +66 -0
- package/dist/transports/http.d.ts.map +1 -0
- package/dist/transports/http.js +519 -0
- package/dist/transports/http.js.map +1 -0
- package/dist/types/entities.d.ts +101 -0
- package/dist/types/entities.d.ts.map +1 -0
- package/dist/types/entities.js +5 -0
- package/dist/types/entities.js.map +1 -0
- package/dist/types/filtering.d.ts +34 -0
- package/dist/types/filtering.d.ts.map +1 -0
- package/dist/types/filtering.js +5 -0
- package/dist/types/filtering.js.map +1 -0
- package/dist/types/github.d.ts +166 -0
- package/dist/types/github.d.ts.map +1 -0
- package/dist/types/github.js +5 -0
- package/dist/types/github.js.map +1 -0
- package/dist/types/index.d.ts +35 -292
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -2
- package/dist/types/index.js.map +1 -1
- package/dist/utils/error-helpers.d.ts +37 -0
- package/dist/utils/error-helpers.d.ts.map +1 -0
- package/dist/utils/error-helpers.js +47 -0
- package/dist/utils/error-helpers.js.map +1 -0
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +6 -3
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/security-utils.d.ts +0 -21
- package/dist/utils/security-utils.d.ts.map +1 -1
- package/dist/utils/security-utils.js +0 -47
- package/dist/utils/security-utils.js.map +1 -1
- package/dist/vector/VectorSearchManager.d.ts.map +1 -1
- package/dist/vector/VectorSearchManager.js +9 -32
- package/dist/vector/VectorSearchManager.js.map +1 -1
- package/docker-compose.yml +11 -2
- package/hooks/README.md +107 -0
- package/hooks/cursor/hooks.json +10 -0
- package/hooks/cursor/memory-journal.mdc +22 -0
- package/hooks/cursor/session-end.sh +19 -0
- package/hooks/kilo-code/session-end-mode.json +11 -0
- package/hooks/kiro/session-end.md +13 -0
- package/mcp-config-example.json +1 -0
- package/package.json +11 -9
- package/playwright.config.ts +29 -0
- package/releases/v4.5.0.md +116 -0
- package/releases/v5.0.0.md +105 -0
- package/scripts/generate-server-instructions.ts +176 -0
- package/scripts/server-instructions-function-body.ts +77 -0
- package/server.json +3 -3
- package/src/cli.ts +45 -1
- package/src/constants/ServerInstructions.ts +133 -73
- package/src/constants/icons.ts +8 -7
- package/src/constants/server-instructions.md +268 -0
- package/src/database/SqliteAdapter.ts +358 -192
- package/src/database/schema.ts +125 -0
- package/src/filtering/ToolFilter.ts +13 -2
- package/src/github/GitHubIntegration.ts +1 -3
- package/src/handlers/prompts/github.ts +209 -0
- package/src/handlers/prompts/index.ts +10 -499
- package/src/handlers/prompts/workflow.ts +314 -0
- package/src/handlers/resources/core.ts +528 -0
- package/src/handlers/resources/github.ts +358 -0
- package/src/handlers/resources/graph.ts +254 -0
- package/src/handlers/resources/index.ts +23 -1570
- package/src/handlers/resources/shared.ts +103 -0
- package/src/handlers/resources/team.ts +133 -0
- package/src/handlers/resources/templates.ts +374 -0
- package/src/handlers/tools/admin.ts +285 -0
- package/src/handlers/tools/analytics.ts +301 -0
- package/src/handlers/tools/backup.ts +242 -0
- package/src/handlers/tools/core.ts +350 -0
- package/src/handlers/tools/export.ts +115 -0
- package/src/handlers/tools/github/helpers.ts +86 -0
- package/src/handlers/tools/github/insights-tools.ts +119 -0
- package/src/handlers/tools/github/issue-tools.ts +439 -0
- package/src/handlers/tools/github/kanban-tools.ts +134 -0
- package/src/handlers/tools/github/milestone-tools.ts +392 -0
- package/src/handlers/tools/github/mutation-tools.ts +17 -0
- package/src/handlers/tools/github/read-tools.ts +328 -0
- package/src/handlers/tools/github/schemas.ts +369 -0
- package/src/handlers/tools/github.ts +36 -0
- package/src/handlers/tools/index.ts +144 -3325
- package/src/handlers/tools/relationships.ts +358 -0
- package/src/handlers/tools/schemas.ts +132 -0
- package/src/handlers/tools/search.ts +343 -0
- package/src/handlers/tools/team.ts +273 -0
- package/src/server/McpServer.ts +63 -358
- package/src/server/Scheduler.ts +278 -0
- package/src/transports/http.ts +635 -0
- package/src/types/entities.ts +145 -0
- package/src/types/filtering.ts +54 -0
- package/src/types/github.ts +180 -0
- package/src/types/index.ts +67 -375
- package/src/utils/error-helpers.ts +52 -0
- package/src/utils/logger.ts +6 -3
- package/src/utils/security-utils.ts +0 -52
- package/src/vector/VectorSearchManager.ts +9 -33
- package/tests/constants/icons.test.ts +1 -2
- package/tests/constants/server-instructions.test.ts +30 -4
- package/tests/database/sqlite-adapter.test.ts +91 -7
- package/tests/e2e/auth.spec.ts +154 -0
- package/tests/e2e/health.spec.ts +63 -0
- package/tests/e2e/protocols.spec.ts +134 -0
- package/tests/e2e/resources.spec.ts +103 -0
- package/tests/e2e/scheduler.spec.ts +79 -0
- package/tests/e2e/security.spec.ts +91 -0
- package/tests/e2e/sessions.spec.ts +95 -0
- package/tests/e2e/stateless.spec.ts +121 -0
- package/tests/e2e/tools.spec.ts +111 -0
- package/tests/filtering/tool-filter.test.ts +46 -0
- package/tests/handlers/error-path-coverage.test.ts +324 -0
- package/tests/handlers/github-resource-handlers.test.ts +453 -0
- package/tests/handlers/github-tool-handlers.test.ts +899 -0
- package/tests/handlers/prompt-handler-coverage.test.ts +106 -0
- package/tests/handlers/prompt-handlers.test.ts +40 -0
- package/tests/handlers/resource-handler-coverage.test.ts +181 -0
- package/tests/handlers/resource-handlers.test.ts +33 -9
- package/tests/handlers/search-tool-handlers.test.ts +272 -0
- package/tests/handlers/targeted-gap-closure.test.ts +387 -0
- package/tests/handlers/team-resource-handlers.test.ts +156 -0
- package/tests/handlers/team-tool-handlers.test.ts +301 -0
- package/tests/handlers/tool-handler-coverage.test.ts +469 -0
- package/tests/handlers/tool-handlers.test.ts +2 -2
- package/tests/security/sql-injection.test.ts +3 -54
- package/tests/server/mcp-server.test.ts +503 -8
- package/tests/server/scheduler.test.ts +400 -0
- package/tests/transports/http-transport.test.ts +620 -0
- package/tests/vector/vector-search-manager.test.ts +60 -0
- package/vitest.config.ts +4 -1
- package/.memory-journal-team.db +0 -0
- package/.vscode/settings.json +0 -84
package/CONTRIBUTING.md
CHANGED
|
@@ -12,36 +12,41 @@ Thank you for your interest in contributing to the Memory Journal MCP Server! Th
|
|
|
12
12
|
|
|
13
13
|
## 🛠️ Development Setup
|
|
14
14
|
|
|
15
|
-
###
|
|
15
|
+
### Prerequisites
|
|
16
|
+
|
|
17
|
+
- **Node.js 24+** (see `engines` in `package.json`)
|
|
18
|
+
- **npm** (comes with Node.js)
|
|
19
|
+
- **Git** (for version control and GitHub integration testing)
|
|
20
|
+
- **Docker** (optional, for container testing)
|
|
21
|
+
|
|
22
|
+
### Local Development
|
|
16
23
|
|
|
17
24
|
```bash
|
|
18
25
|
# Clone your fork
|
|
19
26
|
git clone https://github.com/YOUR_USERNAME/memory-journal-mcp.git
|
|
20
27
|
cd memory-journal-mcp
|
|
21
28
|
|
|
22
|
-
#
|
|
23
|
-
|
|
24
|
-
docker run --rm -v ./data:/app/data memory-journal-dev python src/server.py
|
|
29
|
+
# Install dependencies
|
|
30
|
+
npm install
|
|
25
31
|
|
|
26
|
-
#
|
|
27
|
-
|
|
28
|
-
```
|
|
32
|
+
# Build TypeScript
|
|
33
|
+
npm run build
|
|
29
34
|
|
|
30
|
-
|
|
35
|
+
# Run the test suite
|
|
36
|
+
npm test
|
|
31
37
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
cd memory-journal-mcp
|
|
38
|
+
# Run the full quality check
|
|
39
|
+
npm run lint && npm run typecheck
|
|
40
|
+
```
|
|
36
41
|
|
|
37
|
-
|
|
38
|
-
pip install -r requirements.txt
|
|
42
|
+
### Docker Development (Optional)
|
|
39
43
|
|
|
40
|
-
|
|
41
|
-
|
|
44
|
+
```bash
|
|
45
|
+
# Build the Docker image locally
|
|
46
|
+
docker build -f Dockerfile -t memory-journal-dev .
|
|
42
47
|
|
|
43
|
-
#
|
|
44
|
-
|
|
48
|
+
# Run with a data volume
|
|
49
|
+
docker run --rm -i -v ./data:/app/data memory-journal-dev
|
|
45
50
|
```
|
|
46
51
|
|
|
47
52
|
## 📋 What We're Looking For
|
|
@@ -50,10 +55,10 @@ We especially welcome contributions in these areas:
|
|
|
50
55
|
|
|
51
56
|
### 🎯 High Priority
|
|
52
57
|
|
|
53
|
-
- **New entry types** that make sense for developer workflows
|
|
54
|
-
- **Better Git/GitHub integrations** (more context, better performance)
|
|
55
|
-
- **Performance improvements** (faster search, reduced memory usage)
|
|
56
58
|
- **Bug fixes** and stability improvements
|
|
59
|
+
- **Performance improvements** (faster search, reduced memory usage)
|
|
60
|
+
- **Better Git/GitHub integrations** (more context, better performance)
|
|
61
|
+
- **New entry types** that make sense for developer workflows
|
|
57
62
|
|
|
58
63
|
### 🔍 Medium Priority
|
|
59
64
|
|
|
@@ -64,31 +69,49 @@ We especially welcome contributions in these areas:
|
|
|
64
69
|
|
|
65
70
|
### 💡 Future Features
|
|
66
71
|
|
|
67
|
-
- **Graph visualization**
|
|
72
|
+
- **Graph visualization** enhancements for entry relationships
|
|
68
73
|
- **Weekly/monthly auto-summaries**
|
|
69
|
-
- **Team collaboration**
|
|
74
|
+
- **Team collaboration** improvements
|
|
70
75
|
- **IDE integrations** beyond MCP
|
|
71
76
|
|
|
72
77
|
## 🧪 Testing Your Changes
|
|
73
78
|
|
|
74
|
-
###
|
|
79
|
+
### Automated Testing
|
|
75
80
|
|
|
76
81
|
```bash
|
|
77
|
-
#
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
#
|
|
82
|
+
# Run all tests
|
|
83
|
+
npm test
|
|
84
|
+
|
|
85
|
+
# Run tests in watch mode
|
|
86
|
+
npm run test:watch
|
|
87
|
+
|
|
88
|
+
# Run tests with coverage
|
|
89
|
+
npm run test:coverage
|
|
90
|
+
|
|
91
|
+
# Run benchmarks
|
|
92
|
+
npm run bench
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Quality Checks
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# Lint + type check (required before submitting)
|
|
99
|
+
npm run lint && npm run typecheck
|
|
100
|
+
|
|
101
|
+
# Format code with Prettier
|
|
102
|
+
npx prettier --write .
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Manual Testing with MCP Client
|
|
106
|
+
|
|
107
|
+
Add your local build to `~/.cursor/mcp.json`:
|
|
108
|
+
|
|
109
|
+
```json
|
|
87
110
|
{
|
|
88
111
|
"mcpServers": {
|
|
89
112
|
"memory-journal-dev": {
|
|
90
|
-
"command": "
|
|
91
|
-
"args": ["path/to/your/memory-journal-mcp/
|
|
113
|
+
"command": "node",
|
|
114
|
+
"args": ["path/to/your/memory-journal-mcp/dist/cli.js"]
|
|
92
115
|
}
|
|
93
116
|
}
|
|
94
117
|
}
|
|
@@ -96,40 +119,42 @@ print('✅ Server imports successfully')
|
|
|
96
119
|
|
|
97
120
|
### Docker Testing
|
|
98
121
|
|
|
99
|
-
|
|
100
|
-
#
|
|
101
|
-
docker build -f Dockerfile
|
|
102
|
-
docker run --rm
|
|
122
|
+
```bash
|
|
123
|
+
# Build and run locally
|
|
124
|
+
docker build -f Dockerfile -t memory-journal-dev .
|
|
125
|
+
docker run --rm -i -v ./data:/app/data memory-journal-dev
|
|
126
|
+
```
|
|
103
127
|
|
|
104
|
-
|
|
105
|
-
docker build -f Dockerfile -t test-full .
|
|
106
|
-
docker run --rm test-full python -c "print('Full build works!')"
|
|
107
|
-
```## 📝 Coding Standards
|
|
128
|
+
## 📝 Coding Standards
|
|
108
129
|
|
|
109
|
-
###
|
|
110
|
-
|
|
111
|
-
- **
|
|
112
|
-
- **
|
|
113
|
-
- **
|
|
114
|
-
- **
|
|
130
|
+
### TypeScript Code Style
|
|
131
|
+
|
|
132
|
+
- **Strict mode** — `tsconfig.json` enforces strict TypeScript
|
|
133
|
+
- **ESLint** — Run `npm run lint` to check, `npm run lint:fix` to auto-fix
|
|
134
|
+
- **Prettier** — Run `npx prettier --write .` for formatting
|
|
135
|
+
- **Type safety** — Avoid `any`; use proper types and Zod schemas
|
|
136
|
+
- **Modularity** — Keep files under ~500 lines; split into sub-modules when approaching the limit
|
|
137
|
+
- **Error handling** — Use `formatHandlerError()` for structured `{success, error}` responses in tool handlers
|
|
115
138
|
|
|
116
139
|
### Database Changes
|
|
117
|
-
|
|
118
|
-
- **
|
|
119
|
-
- **
|
|
120
|
-
- **
|
|
140
|
+
|
|
141
|
+
- **Schema migrations** — Update `src/database/schema.ts` for database changes
|
|
142
|
+
- **Backward compatibility** — Ensure existing data isn't broken; use `migrateSchema()` for column additions
|
|
143
|
+
- **Performance** — Consider index implications for new queries
|
|
144
|
+
- **Testing** — Verify with both empty and populated databases
|
|
121
145
|
|
|
122
146
|
### Docker Considerations
|
|
123
|
-
|
|
124
|
-
- **
|
|
125
|
-
- **
|
|
126
|
-
- **
|
|
147
|
+
|
|
148
|
+
- **Multi-stage builds** — Keep images lean
|
|
149
|
+
- **Security** — Run as non-root user, minimal privileges
|
|
150
|
+
- **Multi-platform** — Test on both amd64 and arm64 when possible
|
|
151
|
+
- **Documentation** — Update Docker guides if needed
|
|
127
152
|
|
|
128
153
|
## 🐛 Bug Reports
|
|
129
154
|
|
|
130
155
|
When reporting bugs, please include:
|
|
131
156
|
|
|
132
|
-
1. **Environment details** (OS,
|
|
157
|
+
1. **Environment details** (OS, Node.js version, npm version)
|
|
133
158
|
2. **Steps to reproduce** the issue
|
|
134
159
|
3. **Expected vs actual behavior**
|
|
135
160
|
4. **MCP client details** (Cursor version, configuration)
|
|
@@ -142,76 +167,86 @@ Use our [Bug Report template](.github/ISSUE_TEMPLATE/bug_report.md) for consiste
|
|
|
142
167
|
|
|
143
168
|
For new features, please provide:
|
|
144
169
|
|
|
145
|
-
1. **Use case description**
|
|
146
|
-
2. **Proposed solution**
|
|
147
|
-
3. **Developer workflow**
|
|
148
|
-
4. **Alternatives considered**
|
|
149
|
-
5. **Implementation notes**
|
|
170
|
+
1. **Use case description** — What problem does this solve?
|
|
171
|
+
2. **Proposed solution** — How should it work?
|
|
172
|
+
3. **Developer workflow** — How does this fit into dev work?
|
|
173
|
+
4. **Alternatives considered** — What other approaches did you think about?
|
|
174
|
+
5. **Implementation notes** — Any technical considerations
|
|
150
175
|
|
|
151
176
|
Use our [Feature Request template](.github/ISSUE_TEMPLATE/feature_request.md).
|
|
152
177
|
|
|
153
178
|
## 🔄 Pull Request Process
|
|
154
179
|
|
|
155
180
|
### Before Submitting
|
|
181
|
+
|
|
156
182
|
- [ ] **Fork** the repository and create a feature branch
|
|
157
|
-
- [ ] **Test** your changes
|
|
183
|
+
- [ ] **Test** your changes (`npm test`, `npm run lint && npm run typecheck`)
|
|
184
|
+
- [ ] **Format** your code (`npx prettier --write .`)
|
|
158
185
|
- [ ] **Update documentation** if you changed APIs or behavior
|
|
159
186
|
- [ ] **Add examples** for new features
|
|
160
187
|
- [ ] **Check** that existing functionality still works
|
|
161
188
|
|
|
162
189
|
### PR Description Should Include
|
|
190
|
+
|
|
163
191
|
- **Summary** of changes made
|
|
164
192
|
- **Testing** performed (how did you verify it works?)
|
|
165
193
|
- **Breaking changes** (if any)
|
|
166
194
|
- **Related issues** (fixes #123)
|
|
167
|
-
- **Screenshots** (for UI changes)
|
|
168
195
|
|
|
169
196
|
### Review Process
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
197
|
+
|
|
198
|
+
1. **Automated checks** must pass (lint, typecheck, tests)
|
|
199
|
+
2. **Maintainer review** — we'll provide feedback
|
|
200
|
+
3. **Address feedback** — make requested changes
|
|
201
|
+
4. **Merge** — once approved, we'll merge your PR
|
|
174
202
|
|
|
175
203
|
## 🎯 Development Tips
|
|
176
204
|
|
|
177
205
|
### Working with MCP
|
|
178
|
-
|
|
179
|
-
- **
|
|
180
|
-
- **
|
|
181
|
-
- **
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
#
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
206
|
+
|
|
207
|
+
- **Test in Cursor** — The primary MCP client environment
|
|
208
|
+
- **Check tool responses** — Ensure JSON responses are well-formed
|
|
209
|
+
- **Output schemas** — All tools have Zod output schemas; error responses must pass validation
|
|
210
|
+
- **Dual-schema pattern** — Relaxed schemas for SDK validation, strict schemas inside handlers
|
|
211
|
+
|
|
212
|
+
### Architecture Overview
|
|
213
|
+
|
|
214
|
+
```
|
|
215
|
+
src/
|
|
216
|
+
├── cli.ts # CLI entry point (Commander)
|
|
217
|
+
├── McpServer.ts # MCP server setup (tools, resources, prompts)
|
|
218
|
+
├── database/
|
|
219
|
+
│ ├── SqliteAdapter.ts # SQLite operations via sql.js
|
|
220
|
+
│ └── schema.ts # DDL + input types
|
|
221
|
+
├── handlers/
|
|
222
|
+
│ ├── tools/ # 42 tool handlers (9 groups)
|
|
223
|
+
│ ├── resources/ # 22 resource handlers
|
|
224
|
+
│ └── prompts/ # 15 prompt handlers
|
|
225
|
+
├── transports/
|
|
226
|
+
│ └── http.ts # HTTP/SSE transport layer
|
|
227
|
+
├── types/ # TypeScript type definitions
|
|
228
|
+
└── utils/ # Shared utilities
|
|
229
|
+
```
|
|
195
230
|
|
|
196
231
|
## 🤝 Community
|
|
197
232
|
|
|
198
|
-
- **Be respectful**
|
|
199
|
-
- **Ask questions**
|
|
200
|
-
- **Share ideas**
|
|
201
|
-
- **Help others**
|
|
233
|
+
- **Be respectful** — Follow our [Code of Conduct](CODE_OF_CONDUCT.md)
|
|
234
|
+
- **Ask questions** — Use GitHub Discussions for help
|
|
235
|
+
- **Share ideas** — Feature requests and feedback welcome
|
|
236
|
+
- **Help others** — Answer questions and review PRs
|
|
202
237
|
|
|
203
238
|
## 📞 Getting Help
|
|
204
239
|
|
|
205
|
-
- **GitHub Issues**
|
|
206
|
-
- **GitHub Discussions**
|
|
207
|
-
- **Documentation**
|
|
240
|
+
- **GitHub Issues** — Bug reports and feature requests
|
|
241
|
+
- **GitHub Discussions** — Questions and community chat
|
|
242
|
+
- **Documentation** — Check [README.md](README.md), [Wiki](https://github.com/neverinfamous/memory-journal-mcp/wiki), and Docker guides first
|
|
208
243
|
|
|
209
244
|
## 🏆 Recognition
|
|
210
245
|
|
|
211
246
|
Contributors are recognized in:
|
|
212
247
|
|
|
213
|
-
- **Release notes**
|
|
214
|
-
- **README**
|
|
215
|
-
- **Git history**
|
|
248
|
+
- **Release notes** — Major contributions highlighted
|
|
249
|
+
- **README** — Contributor acknowledgments
|
|
250
|
+
- **Git history** — Your commits are permanent record
|
|
216
251
|
|
|
217
252
|
Thank you for helping make Memory Journal MCP Server better for the developer community! 🚀
|