Go library only. The TypeScript OAuth 2.1 server (
createMcpModule) takes storage callbacks you write, see MCP OAuth 2.1. The full Go guide is go/docs/mcp-oauth-sqlite.md, and the store is documented in SQLite storage.1
2
Open the database and build the server
You own the*sql.DB, so set the pragmas. New refuses a database without foreign keys. The busy timeout and immediate transactions make concurrent token requests wait, not fail with database is locked.Migrate applies migrations 0001 to 0034. The OAuth tables start at 0020.3
What is enforced
mcpresource is a separate module and can run in another process. Check module versions in the Go docs before you copy imports.