48
/ 100
1 month ago
glama

MCP OAuth2.1 with AWS Cognito Example

Demonstrates how to secure an MCP server with OAuth 2.1 using AWS Cognito, with support for dynamic client registration and client ID metadata documents.

Is this your MCP?

Claim it to get a verified publisher badge, a free copy of our full audit findings, and direct contact for any high-priority issues we find.

Install from

M8ven verifies MCPs across every public registry — install directly from whichever one you prefer.

// key findings
No credential exfiltration, no sensitive file access, no obfuscation
Static analysis found nothing flowing your secrets to unexpected places.
Open source with a license and README
Anyone can audit the code, the license is declared, and the publisher documents what it does.
🔐
You'll be asked for 2 credentials: COGNITO_CLIENT_SECRET, OAUTH_CLIENT_SECRET
These are read from process.env at runtime. Make sure you trust where they’ll be sent.
// required environment variables
This server reads these from process.env. You'll be asked to provide them before it can run.
configAUTO_CLIENT_CALLBACK_URL
configAUTO_CLIENT_PORT
configAUTO_CLIENT_URL
configAWS_REGION
configCLIENT_CALLBACK_URL
configCLIENT_URL
configCOGNITO_AUTH_SERVER_URL
configCOGNITO_CLIENT_ID
🔐 secretCOGNITO_CLIENT_SECRET
configCOGNITO_DOMAIN
configCOGNITO_ISSUER
configCOGNITO_REGION
configCOGNITO_USER_POOL_ID
configDCR_ENDPOINT
configLOGOUT_URL
configMCP_SERVER_URL
configMETADATA_CLIENT_PORT
configMETADATA_CLIENT_URL
configOAUTH_CLIENT_ID
🔐 secretOAUTH_CLIENT_SECRET
configOAUTH_REDIRECT_URI
configOAUTH_SCOPE
configPORT
configPROJECT_NAME
configSKIP_CONFIRMATION
configSTACK_NAME
// full audit trail
The full breakdown of what we checked, the deductions that landed, the network hosts, the dependency advisories, and concrete fix guidance is available to verified publishers.
// improvement guidance — verified publishers only
We have 1 concrete improvement we can share with the publisher of this MCP. Each comes with specific guidance to raise the trust score.
// embed badge in your README
[![M8ven Score](https://m8ven.ai/badge/mcp/empires-security-mcp-oauth2-aws-cognito-l48rgn)](https://m8ven.ai/mcp/empires-security-mcp-oauth2-aws-cognito-l48rgn)
commit: 3ab540c43e7ee38f2a32ed4c5a1e482a06269258
code hash: 5f384477fa375619387bc261b2c8c2356c46c74572c0e6966ffa2210d9d805f2
verified: 6/13/2026, 10:03:44 AM
view raw JSON →