Google User MCP
Authenticates users with Google OAuth and returns the display name of the currently authenticated user.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Google User MCPWhat is my Google display name?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Google user MCP
Google OAuth でユーザーを認証し、認証したユーザーの表示名を返す Streamable HTTP MCP
サーバーです。提供するツールは get_current_user だけです。
Google OAuth の準備
Google Cloud Console で OAuth 同意画面を設定します。
OAuth 2.0 クライアントを作成し、使用する MCP クライアントのリダイレクト URI を登録します。
同じクライアント ID を MCP クライアントと、このサーバーの
GOOGLE_CLIENT_IDに設定します。MCP クライアントには必要に応じてクライアントシークレットも設定します。サーバー側には不要です。
Google は Dynamic Client Registration を提供しないため、MCP クライアントには事前登録した
クライアント ID を設定してください。認証では openid profile スコープを使用します。
Related MCP server: Remote MCP Server on Cloudflare
設定
.env.example を .env にコピーします。プロジェクト直下の .env は起動時に自動で読み込まれ、
すでに設定されている環境変数は上書きしません。
cp .env.example .env環境変数 | 必須 | 説明 |
| はい | Google Cloud で作成した OAuth 2.0 クライアント ID。 |
| 本番では推奨 | 公開 MCP URL。既定値は |
| いいえ | listen 先。既定値は |
本番の MCP_SERVER_URL には HTTPS URL を指定してください。
ローカルでNode.jsサーバーを実行
Node.js 20.12 以上と pnpm が必要です。
pnpm install
pnpm build
pnpm startMCP エンドポイントは MCP_SERVER_URL です。アクセストークンの OAuth クライアント、期限、
スコープを Google の token info endpoint で検証し、Google OpenID Connect の userinfo endpoint
から認証ユーザーの表示名を取得します。
Cloudflare Workersへデプロイ
Workers版も同じGoogle OAuth検証と get_current_user ツールを使用します。公開URLはリクエスト
から自動的に判定されるため、Workersには MCP_SERVER_URL、HOST、PORT の設定は不要です。
WranglerでCloudflareへログインします。
pnpm exec wrangler loginGoogle OAuthクライアントIDをWorkerのsecretとして登録します。
pnpm exec wrangler secret put GOOGLE_CLIENT_IDデプロイします。
pnpm worker:deploy
デプロイ完了時に表示されるURLの末尾へ /mcp を付けたものがMCPエンドポイントです。たとえば
Worker URLが https://auth-mcp.example.workers.dev の場合は
https://auth-mcp.example.workers.dev/mcp です。
ローカルでWorkers版を動かす場合は、既存の .env から GOOGLE_CLIENT_ID が読み込まれます。
pnpm worker:dev既定のMCPエンドポイントは http://localhost:8787/mcp です。GoogleはDynamic Client
Registrationを提供しないため、接続するMCPクライアントには同じGoogle OAuthクライアントIDと、
そのクライアント用にGoogle Cloud Consoleへ登録したリダイレクトURIを設定してください。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityCmaintenanceA Cloudflare Workers-based implementation of the Model Context Protocol (MCP) server that enables tool usage in Claude through OAuth authentication.
- Flicense-qualityCmaintenanceEnables deploying a Model Context Protocol (MCP) server on Cloudflare Workers with built-in OAuth authentication. It allows local clients like Claude Desktop to securely connect to and use remote tools through an HTTP/SSE transport.
- Flicense-qualityCmaintenanceEnables deploying and running a Model Context Protocol (MCP) server on Cloudflare Workers with built-in OAuth authentication. It allows users to host and access tools remotely via Server-Sent Events (SSE) transport from clients like Claude Desktop.
- Alicense-qualityDmaintenanceEnables AI clients to interact with Google services (Gmail, Calendar, Drive, Tasks, YouTube, Contacts) via OAuth-authenticated Cloudflare Workers, allowing actions like sending emails, managing events, and searching files.14MIT
Related MCP Connectors
Google-OAuth-gated LLM gateway: verify a Google ID token, then run a Gemini (Vertex AI) completion f
Streamable HTTP MCP server for Google Calendar and Sheets with OAuth login.
Hosted Google Calendar MCP server for AI agents. No self-hosting or Google Cloud setup.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/usuijuice/auth-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server