Drop-in OAuth Provider for Personal FastMCP Servers on All Claude Platforms

What This Solves
A developer built a personal memory server using mem0 that Claude can read and write to, creating a personal knowledge vault. While getting it working on Claude Code was straightforward, making it function across Claude.ai web, mobile, and Desktop platforms presented authentication challenges.
The core problem: Claude.ai custom connectors require full OAuth 2.1 compliance. FastMCP provides either an in-memory test provider (unsuitable for production) or a proxy requiring setup of external identity providers like Google, GitHub, or Auth0. For a server intended only for personal use, setting up Auth0 was undesirable overhead.
The Solution
The developer created a single-file authentication provider written in Python that handles the entire OAuth flow without external services. Key features include:
- Dynamic Client Registration (DCR)
- PKCE (Proof Key for Code Exchange)
- Token persistence
- Complete OAuth 2.1 implementation
The provider restricts redirect URIs to claude.ai and localhost only, preventing unauthorized access even though client registration remains open (a Claude.ai requirement that took time to understand).
Implementation Details and Gotchas
The developer encountered several undocumented issues during implementation:
- FastAPI's BaseHTTPMiddleware silently breaks streaming responses, requiring workarounds
- Tool naming conflicts: If tools are named generically (like "add_memory" or "search"), Claude will use its own built-in memory functions instead of calling your server tools. The solution is to prefix tool names distinctively
- Serverless database connections: Neon Postgres (and likely other serverless databases) drop idle connections. Creating a single connection at startup causes tools to randomly fail after a few minutes
- DCR configuration: Dynamic Client Registration is disabled by default in FastMCP. Without enabling it, the /register endpoint returns 404, and Claude.ai silently fails to connect without any error messages
Availability
The solution is available on GitHub at github.com/crumrine/fastmcp-personal-auth as a single Python file under MIT license. This provides a practical alternative for developers who want their personal FastMCP servers to work across all Claude platforms without the complexity of external identity providers.
📖 Read the full source: r/ClaudeAI
👀 See Also

200+ App Design Specs in Markdown – Drag into Claude or Cursor for Exact UI Clones
A curated library of 200+ popular apps as structured markdown design specs with exact hex codes, type scale, spacing, every screen state, and nav graph. Drop into Claude, Cursor, or any AI agent to generate SwiftUI, Jetpack Compose, or Expo UI clones without guessing colors or spacing.

Claude to PDF Chrome Extension Exports Long Conversations with Formatting Intact
A developer has released a free Chrome extension called Claude to PDF that captures full conversation history from Claude AI chats and preserves code blocks, LaTeX math, and table formatting when exporting to PDF.

nan-forget: Local AI coding memory in a single SQLite file
nan-forget is a memory tool for AI coding agents that stores context in a single SQLite file (~3MB) with no background services. It uses a 3-stage retrieval pipeline and works across Claude Code, Cursor, and terminal via CLI.

Claude Code Built Treelo: A Free Video Transcription Tool
A video editor used Claude Code to build Treelo, a free tool that transcribes video/audio files, removes filler words, allows SFX placement at exact timestamps, and exports SRT for Premiere or ASS for DaVinci Resolve.