Skip to main content

Overview

Feature Comparison

Core MCP Features

Authentication & Security

Storage & State

Deployment & Runtime

Developer Experience

OAuth Flow Details


When to Use Which

Use @phake/mcp when:

  • You need built-in authentication (OAuth, Google, API key, Bearer)
  • Deploying to Cloudflare Workers with KV storage
  • Want encrypted token storage at rest
  • Need proactive token refresh
  • Want quick scaffold with bun create @phake/mcp
  • Need CIMD client validation

Use Official SDK when:

  • Minimal protocol implementation needed
  • Custom auth flow required
  • No storage/encryption needs
  • Using different frameworks/languages

Code Comparison

Registering a Tool

@phake/mcp:
Official SDK:

Architecture Summary


Migration Path

If switching from Official SDK to @phake/mcp:
  1. Replace McpServer with createMCPServer
  2. Replace server.registerTool with defineTool + pass to server
  3. Configure AUTH_STRATEGY for auth needs
  4. Set up TOKENS KV binding for storage
  5. Add RS_TOKENS_ENC_KEY for encryption