memory-sqlite
Production-ready MCP memory server with SQLite WAL for thread-safe concurrent access. Drop-in replacement for @modelcontextprotocol/server-memory. Prevents race conditions and data loss in multi-session AI agent environments. ACID-compliant knowledge grap
Installation
npx @pepk/mcp-memory-sqliteAsk AI about memory-sqlite
Powered by Claude Β· Grounded in docs
I know everything about memory-sqlite. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
GitHub Actions Workflows
This directory contains CI/CD workflows for the @daichi-kudo/mcp-memory-sqlite package.
π Files
workflows/ci.yml- Continuous Integration workflowworkflows/release.yml- Release and npm publishing workflowSETUP.md- Detailed setup instructionsPIPELINE_DIAGRAM.md- Visual pipeline diagrams
π Quick Start
Windows Users
SETUP_COMMANDS.bat
Linux/macOS Users
bash SETUP_COMMANDS.sh
This will:
- Install required development dependencies
- Update package.json with CI-friendly scripts
- Verify everything works locally
π Manual Setup
If you prefer to set up manually, follow these steps:
1. Install Dependencies
npm install -D \
@typescript-eslint/eslint-plugin \
@typescript-eslint/parser \
eslint \
rimraf
2. Update package.json
Add these scripts to package.json:
{
"scripts": {
"typecheck": "tsc --noEmit",
"lint": "eslint src --ext .ts && tsc --noEmit",
"test": "echo \"No tests yet\" && exit 0",
"test:ci": "npm run typecheck && npm run lint && npm run test",
"clean": "rimraf dist",
"prepublishOnly": "npm run clean && npm run build"
}
}
3. Configure npm Token
- Generate token at https://www.npmjs.com/settings/[username]/tokens
- Choose "Automation" type
- Copy the token
- Add to GitHub repository:
- Settings β Secrets and variables β Actions
- New repository secret:
NPM_TOKEN
4. Verify Locally
npm run typecheck # Should pass β
npm run lint # Should pass β
npm run build # Should create dist/ β
npm test # Should pass β
5. Commit and Push
git add .
git commit -m "ci: add GitHub Actions workflows"
git push origin master
π Workflows
CI Workflow (ci.yml)
Triggers:
- Push to
mainordevelop - Pull requests to
mainordevelop
Jobs:
- Lint and type check
- Build package
- Test on multiple platforms (Ubuntu, Windows, macOS) with Node 20 & 22
- Verify build artifacts are committed
Duration: ~2-3 minutes
Release Workflow (release.yml)
Triggers:
- GitHub release published
- Tags matching
v*pattern
Steps:
- Run full CI checks
- Build package
- Publish to npm with provenance
- Create release summary
Duration: ~3-5 minutes
π¦ Publishing Releases
Create a Tag
git tag v1.0.0
git push origin v1.0.0
Create GitHub Release (Recommended)
- Go to repository β Releases β Draft a new release
- Choose tag: v1.0.0
- Add release notes:
## What's New
- Initial release
- SQLite-based MCP memory server
- WAL mode for concurrency
## Installation
npm install @daichi-kudo/mcp-memory-sqlite
- Click "Publish release"
The workflow will automatically publish to npm! π
π Monitoring
View Workflow Runs
- Go to repository β Actions tab
- Click on a workflow run to see details
- Each job shows real-time logs
Check npm Package
After release, verify at:
π οΈ Troubleshooting
CI Fails: Type Errors
npm run typecheck # See errors locally
# Fix errors
npm run typecheck # Verify fixed
CI Fails: Lint Errors
npm run lint # See lint errors
npm run lint -- --fix # Auto-fix
CI Fails: Build Check
The build-check job fails if committed dist/ doesn't match the build output.
Fix:
npm run clean
npm run build
git add dist/
git commit -m "chore: update build artifacts"
git push
Release Fails: npm Publish
Common causes:
- NPM_TOKEN not set or invalid
- Package version already published
- Package name not available
- No publish permissions for
@daichi-kudoscope
Solutions:
- Verify NPM_TOKEN in GitHub secrets
- Bump version in package.json
- Check package availability on npm
- Verify npm scope access
better-sqlite3 Build Fails
The native module should rebuild automatically. If it fails:
- Check Node.js version compatibility
- Verify platform has build tools (CI runners have them)
- Check better-sqlite3 documentation for platform support
π Matrix Testing
The CI workflow tests on 6 combinations:
| OS | Node 20 | Node 22 |
|---|---|---|
| Ubuntu | β | β |
| Windows | β | β |
| macOS | β | β |
This ensures the package works across all supported platforms.
π Security
npm Provenance
The release workflow uses npm provenance, which:
- Cryptographically links the package to the source code
- Proves the package was built by GitHub Actions
- Prevents tampering between build and publish
- Improves supply chain security
Secret Management
- NPM_TOKEN is stored as a GitHub secret
- Never exposed in logs
- Can be rotated without code changes
- Scoped to publish permissions only
π Additional Resources
π Support
If you encounter issues:
- Check the Troubleshooting section
- Review workflow logs in the Actions tab
- Consult the detailed guides in this directory
- Open an issue on GitHub
Happy CI/CD! π
