Add your description here
Project description
MCP B2C OAuth
A project for implementing Google OAuth2 client app B2C authentication for the MCP platform.
Overview
This project provides integration with Google OAuth2 for authentication and authorization within the MCP (Model Context Protocol) platform. It enables secure user authentication through Google's identity platform.
Features
- Google OAuth2 integration
- OAuth 2.0 authentication flow
- Token management
- User profile retrieval
- Role-based access control
Installation
uv sync
Configuration
Modify .env file in the root directory with the following variables:
MCP_CLIENT_ID=<YOUR_GOOGLE_CLIENT_ID>
MCP_CLIENT_SECRET=<YOUR_GOOGLE_CLIENT_SECRET>
Usage
Start the development server:
uv run .
Authentication Flow
- User is redirected to Google OAuth2 login page
- After successful authentication, Google redirects to the callback URL
- Application validates the received token
- User session is established
API Reference
Authentication Endpoints
GET /callback- Handles the OAuth callbackGET /.well-known/oauth-authorization-server- Auth Server Details-
GET /authorize- Used by MCP Clients to authorize with the server
-
GET /token- Used by MCP Clients to get token from code
-
GET /register- Used by MCP Clients to register themselves to server
Development
Prerequisites
- Python 3.13+
- Google Cloud Platform account with OAuth 2.0 client credentials
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contact
Name - kv.coder@gmail.com
Project Link: https://github.com/ksankaran/mcp-b2c-oauth
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file iflow_mcp_ksankaran_mcp_b2c_oauth-0.1.1.tar.gz.
File metadata
- Download URL: iflow_mcp_ksankaran_mcp_b2c_oauth-0.1.1.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b79972b3287c263b6284db146fe64711c5ff2b8a0a9d670da37f976c6926209
|
|
| MD5 |
3ee51315eb3593cf9138ab8fec03ac05
|
|
| BLAKE2b-256 |
f9e21db73b4eb0ca0792d491404668ce417d00f9a4e67485048e115ef258baec
|
File details
Details for the file iflow_mcp_ksankaran_mcp_b2c_oauth-0.1.1-py3-none-any.whl.
File metadata
- Download URL: iflow_mcp_ksankaran_mcp_b2c_oauth-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9384486604d8be18fc672c1016c9ce20f7a3f4dcaa72072e51e32058ecc8575d
|
|
| MD5 |
4d2bb3124a4bc0a0ff4aba82f36cb263
|
|
| BLAKE2b-256 |
6ce9c13a02c36862829c4a13c9a944467f132959c396ccc5e0f092f907869ed2
|