OAuth 2.1 MCP Authentication Demo

A Model Context Protocol server with Google OAuth 2.1 authentication

This project demonstrates how to build a secure MCP server that implements OAuth 2.1 authentication with Google, supporting both VS Code extensions and Claude Desktop integrations. ✅ FULLY COMPATIBLE with mcp-remote for both local development and remote deployments!

Testing the Server

Various ways to test the MCP server functionality

Live Server Testing

Get this from Google OAuth flow or OAuth 2.0 Playground

Testing Methods

Web Interface

Use this page to test server functionality with a web interface

Direct MCP Calls

Make direct HTTP requests to the MCP endpoint

Example:
{
  "url": "https://mcp-auth-demo-rust.vercel.app/api/mcp",
  "method": "POST",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer YOUR_GOOGLE_ID_TOKEN"
  },
  "body": {
    "jsonrpc": "2.0",
    "method": "tools/call",
    "params": {
      "name": "say_hello",
      "arguments": {
        "name": "Test"
      }
    },
    "id": 1
  }
}

OAuth Playground

Test OAuth flow using Google's OAuth 2.0 Playground