LocalCan secures MCP servers with OAuth 2.1
This tutorial guides developers through securing a Model Context Protocol (MCP) server with OAuth 2.1 using Scalekit and LocalCan. It demonstrates configuring Scalekit with Dynamic Client Registration, building a Hono resource server to validate tokens, and connecting the authenticated server to Claude using persistent public URLs.
Stable public URLs are no longer just a luxury for sharing work but are now a core security requirement for testing cloud-to-local agentic integrations.
* Unlike traditional SaaS apps where you are the client, MCP reverses the relationship, requiring you to host or delegate an authorization server that issues tokens scoped to your server's audience.
* Rolling your own OAuth server is security-critical and complex; using purpose-built tools like Scalekit or open-source alternatives like Keycloak is highly recommended.
* Rotating subdomains introduce friction by forcing developers to re-register their OAuth callback configurations on every environment restart.
DISCOVERED
1h ago
2026-06-08
PUBLISHED
2h ago
2026-06-08
RELEVANCE
AUTHOR
LocalCanApp