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.
The MCP authorization spec splits the work. Your authorization server signs owners in, registers clients and issues tokens. The MCP server is an OAuth resource server, and it must:.
The spec notes authorization servers and clients should support OAuth Client ID Metadata Documents for client registration. Dynamic Client Registration is deprecated and kept for older authorization servers. Check which your provider supports.
The complete project, with tests that run it against a stand-in authorization server, is on GitHub as gregale-dev/mcp-server-typescript-oauth.
A tsconfig.json with "module": "nodenext", "outDir": "dist" and "rootDir": "src" compiles src/server.ts:.
According to recent reports, the metadata lookup assumes an issuer URL with no path. If yours has one, such as Keycloak's /realms/, fetch the metadata URL your provider documents instead.
In version 2 of the TypeScript SDK, requireBearerAuth, mcpAuthMetadataRouter and getOAuthProtectedResourceMetadataUrl are in the @modelcontextprotocol/express package.
It has been revealed that access: public matters here. Callers present your OAuth tokens, not Gregale API keys, and on Hobby and above an app without it asks every caller for a Gregale API key before the request reaches your code.
Gregale installs dependencies from the lockfile, runs the build script and starts the app with the start script. Then check what an unauthenticated client sees:.
It has been revealed that A tool call must finish within the app's request timeout. It is 30 seconds for an app deployed with gregale deploy; Hobby allows up to 60 and Scale up to 900:.
Sources indicate that gregale's own Node starter, gregale mcp server init --auth external-oauth, checks tokens the same way, and gregale mcp server deploy adds a catalog check before each upcoming version takes traffic. See Host an MCP server.
We deployed this server on Gregale on 2026-11-27. The authorization server was a stand-in app that published RFC 8414 metadata and an ES256 key set, and we signed the test tokens ourselves.
It has been revealed that sources, checked 2026-11-24: Cloudflare remote MCP server guide, Cloudflare MCP authorization, Deploy MCP servers to Vercel, Host MCP servers on Cloud Run, Deploy MCP servers in AgentCore Runtime. The MCP authorization spec was checked on 2026-11-27.
MCP hosting is available on the Hobby, Pro and Scale plans. Hobby costs $10 a month for 5 apps with 512 MB each and 200 GB-RAM-hours. Between calls the server pauses, and paused seconds are not billed. See Gregale pricing, Host an MCP server and How scaling to zero works.
What does the MCP spec require of a server that uses OAuth?
The MCP server is an OAuth resource server. It publishes protected resource metadata (RFC 9728), answers calls without a valid token with 401 and a WWW-Authenticate header that points to that metadata, and accepts only tokens issued for its own URL (RFC 8707). Sign-in, consent and token issuance are the authorization server’s job.
Which TypeScript SDK helpers handle MCP authorization?
In a recent development, in @modelcontextprotocol/sdk 1.x, mcpAuthMetadataRouter serves the protected resource metadata and requireBearerAuth sends the 401 and 403 answers. In version 2 of the SDK they are in @modelcontextprotocol/express. You supply the token verifier, for example jose checking JWTs against your authorization server’s keys.
Why does an OAuth-protected MCP server need access: public on Gregale?
Callers present your OAuth tokens, not Gregale API keys. On Hobby and above, an app without access: public asks every caller for a Gregale API key before the request reaches your code.
How fast does a parked MCP server answer the first call?
In our test the snapshot restore took 65 ms, the instance was running 115 ms into the wake, and an authenticated tools/call returned its first byte at 368 ms, including fetching the authorization server’s keys.
Which Gregale plan does a TypeScript MCP server need?
It has been revealed that MCP hosting is available on the Hobby, Pro and Scale plans. Our server used 112 MB, well inside Hobby’s 512 MB per app.
