1.1 KiB
1.1 KiB
Claude Memory MCP
Stack
- Backend: Python 3.12, FastAPI, SQLModel
- Database: SQLite (local) + PostgreSQL (remote sync)
- Transport: MCP over NDJSON (stdio)
- Package manager: uv
Quick Start
uv sync
uv run python -m mcp.server # Start MCP server
uv run pytest # Run tests
Architecture
src/— MCP server implementationmcp/— MCP protocol handlersmigrations/— Alembic database migrationshooks/— Claude Code hook scriptsskills/— Claude Code skillsopenclaw-plugin/— OpenClaw integration
Key Patterns
- Non-blocking startup: MCP server startup must not block on sync/HTTP calls (15s timeout)
- Suppress stderr: Any stderr during startup causes Claude Code to reject the server
- NDJSON transport: One JSON object per line, NOT Content-Length framing
- Wrapper script: Use
~/.local/bin/claude-memory-mcp-wrapperto source secrets then exec
CI/CD
- Build: GitHub Actions (Docker image push to DockerHub)
- Deploy: Woodpecker CI (kubectl set image), repo ID 78
- Image tags: 8-char git SHA