Menu

Host a TypeScript MCP server with OAuth 2.1: Cloudflare Workers, Cloud Run or scale-to-zero microVMs
📰

Host a TypeScript MCP server with OAuth 2.1: Cloudflare Workers, Cloud Run or scale-to-zero microVMs

DEV Community: serverless·Hüseyin Poyraz Küçükarslan·about 9 hours ago
#o2TrnqBy
Long article (2067 words) — no AI summary yet.
Reading 0:00
15s threshold

Originally published on gregale.dev . I build Gregale, so read this as a vendor's page. Competitor details come from each vendor's own docs, linked in the post. This post was written with AI assistance.

A remote MCP server written with the official TypeScript SDK can check OAuth 2.1 access tokens itself: the SDK publishes the protected resource metadata MCP clients look for, and rejects calls without a valid token, while your authorization server handles sign-in. On Gregale the server pauses between calls, so idle time is not billed. In our test, an authenticated tool call to a server that had been parked returned its first byte in 368 ms, and the server used 112 MB of memory.

What the MCP spec asks of the server

The MCP authorization spec splits the work. Your authorization server signs users in, registers clients and issues tokens. The MCP server is an OAuth resource server, and it must:

Publish protected resource metadata (RFC 9728), naming the authorization server that issues its tokens.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.