mcp-data-platform-v0.15.1
OAuth refresh tokens and authorization codes now persist across server restarts. Previously, the OAuth server used in-memory storage, so every restart invalidated all active tokens and forced clients (including Claude) to disconnect and re-authenticate. The platform now automatically uses PostgreSQL storage when database.dsn is configured, with a background cleanup routine for expired tokens.
OAuth PostgreSQL Storage
What changed
pkg/platform/platform.go:initOAuth() now selects the storage backend based on whether a database connection is available:
- Database configured (
database.dsnset): Usespkg/oauth/postgres/store.gobacked by the existingoauth_clients,oauth_authorization_codes, andoauth_refresh_tokenstables from migration 000001. Starts a cleanup goroutine (1-minute interval) for expired codes and tokens. Properly shut down viaplatform.Close(). - No database: Falls back to
oauth.MemoryStorage(identical to pre-v0.15.1 behavior).
New package: pkg/oauth/postgres/
PostgreSQL implementation of oauth.Storage with:
- Full CRUD for clients, authorization codes, and refresh tokens
StartCleanupRoutine(interval)/Close()lifecycle using cancel+done channel pattern- Soft-delete for clients (
active = false) - 86.1% test coverage via go-sqlmock
No migration required
The three OAuth tables already exist from migration 000001. They were previously created but never used (the in-memory store was hardcoded). No schema changes needed.
Vaporware Detection Tests
Two new tests in pkg/database/migrate/migrate_unit_test.go prevent dead database tables and dead packages from shipping:
TestMigrationTablesHaveConsumers: EveryCREATE TABLEin a migration must have corresponding DML (INSERT INTO,SELECT...FROM,UPDATE,DELETE FROM) in non-test Go source code.TestNoDeadPackages: Every Go package underpkg/with non-test source files must be imported by at least one non-test file inpkg/,cmd/, orinternal/.
These tests would have caught the OAuth storage gap before it shipped. Added as CLAUDE.md rule #5 "No Vaporware" under AI Verification Requirements.
Upgrading from v0.15.0
No configuration changes needed. If database.dsn is already configured (required for audit logging), OAuth storage automatically switches to PostgreSQL on startup. Existing clients will no longer need to disconnect and reconnect after server restarts.
Changelog
Others
Installation
Homebrew (macOS)
brew install txn2/tap/mcp-data-platformClaude Code CLI
claude mcp add mcp-data-platform -- mcp-data-platformDocker
docker pull ghcr.io/txn2/mcp-data-platform:v0.15.1Verification
All release artifacts are signed with Cosign. Verify with:
cosign verify-blob --bundle mcp-data-platform_0.15.1_linux_amd64.tar.gz.sigstore.json \
mcp-data-platform_0.15.1_linux_amd64.tar.gz