Learnings from building our public MCP server
Wealthfront built a public MCP server so users can connect their cash and investing accounts to AI applications, using Streamable HTTP transport with synchronous calls only, all capabilities exposed as tools with per-tool scope enforcement, and OAuth for authentication. For OAuth client registration they weighed Client ID Metadata Documents, which few agents support, against Dynamic Client Registration (RFC 7591), which carries abuse and DoS hardening scope. They chose user-generated client IDs bound to the creating user, trading setup friction for a faster, safer launch. Testing showed that intent-based tools beat entity-based CRUD-style tools, and that precise parameter and output descriptions prevent agents from misreading fields like an internal accountId.
Related posts
- Every app needs an MCP server, and you can build it with Neon
Neon easyNovice
An MCP server lets users drive an app from AI assistants like ChatGPT, Claude and Cursor through tools the app defines, which keeps authorization and validation in app code instead of exposing the UI or raw database access. A production server needs a public HTTPS endpoint, OAuth 2.1 with Client ID Metadata Documents to identify users, per-user database access, and tool annotations to be listed in plugin stores. Neon's pitch covers each piece: Neon Functions host the server next to Postgres, Managed Better Auth's OAuth provider plugin issues tokens whose `sub` matches user IDs in the same database, and branches isolate development. A demo app (a 5x5 shared grid with a single paint_square tool) shows the whole build done through prompts to a coding agent.
- Bringing MCP to the Cloud
Neon mediumAdept
Neon moved its MCP server from a locally spawned stdio process authenticated by a long-lived API key to a hosted server at mcp.neon.tech, using SSE for server-to-client messages and HTTP POST to a /messages endpoint routed by an in-memory session map. Authentication uses OAuth 2.1: the MCP server acts as an OAuth server to MCP clients, with dynamic client registration, PKCE and refresh tokens, and as an OAuth client to Neon upstream. Each session gets its own MCP server instance scoped to the user's Neon token. The server runs as a Docker image on Fly. Open issues include the Node.js dependency introduced by mcp-remote and clients restarting the OAuth flow instead of using refresh tokens.
- Managed Better Auth is now an OAuth provider, with MCP support
Neon mediumAdept
Neon's Managed Better Auth now supports the OAuth Provider plugin, turning an auth instance into an OAuth 2.1 authorization server that both companion apps and MCP clients can use to sign users in. Neon runs the discovery endpoints, JWKS, token issuance and refresh, and client onboarding via Client ID Metadata Documents or optional dynamic registration. You host the login and consent pages and the resource server, where the new @neon/oauth SDK checks token signature, issuer and audience, with adapters for Express, Hono, Next.js and node:http. OAuth configuration is per branch, and each branch gets its own issuer while sharing signing keys, so preview-branch tokens are rejected by production verifiers that pin the issuer.
- Build "Sign in with Your App" using Supabase Auth
Supabase mediumAdeptSupabase Auth can now act as an OAuth 2.1 and OpenID Connect identity provider, letting a project offer "Sign in with [Your App]" to third-party apps, MCP-based AI agents, partner integrations and enterprise SSO. It uses the authorization code flow with PKCE, issues JWT access tokens carrying a client_id claim alongside the usual user_id and role, and also provides ID tokens, a UserInfo endpoint, refresh tokens, a JWKS endpoint and discovery documents at /.well-known/oauth-authorization-server and /.well-known/openid-configuration. MCP clients can register themselves through dynamic client registration. Existing login methods, Custom Access Token Hooks and Row Level Security all apply to OAuth tokens, so RLS policies can limit each client to specific data by checking the client_id claim. Granular scopes are planned but not yet available.
- Building the Hugging Face MCP Server
Hugging Face mediumAdeptHugging Face's hosted MCP server at hf.co/mcp runs in production on Streamable HTTP in a stateless, direct-response configuration. That choice permits simple horizontal scaling, since per-user tool selections and Gradio Spaces are looked up per request from HF_TOKEN or OAuth credentials. The write-up compares STDIO, deprecated HTTP+SSE, and the Streamable HTTP patterns (direct response, request-scoped streams, server push), including which MCP features each supports and when sessions are needed. It also explains why real-time tool-list-change notifications are impractical for a public server and reports operational findings: VSCode polling the endpoint when served an HTML page, roughly 100 control messages per tool call, and 164 distinct clients in a week, about half connecting via mcp-remote.