The-Cortex-Hub/mcp-demo-streamable-http-with-auth
3.1
If you are the rightful owner of mcp-demo-streamable-http-with-auth and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The MCP HTTP Auth Server is a server implementation designed to handle authentication and authorization using the Model Context Protocol (MCP) and OAuth standards.
MCP HTTP Auth Server
Quick Start
Start the Server
uv run main.py
Test with MCP Inspector
npx @modelcontextprotocol/inspector http://127.0.0.1:5000/mcp
Test Endpoints
# Test MCP endpoint
curl -i http://127.0.0.1:5000/mcp
# Test OAuth protected resource discovery
curl -s http://127.0.0.1:5000/.well-known/oauth-protected-resource | jq
# Test OAuth authorization server discovery
curl -s http://127.0.0.1:5000/.well-known/oauth-authorization-server | jq
Workflow for Testing OAuth
- Run one of the clear methods above
- Close Cursor completely
- Reopen Cursor
- Try connecting to your MCP server again
- The authentication flow will start fresh
Configuration
The server uses the following environment variables (with defaults):
MCP_HOST: Server host (default: "127.0.0.1")MCP_PORT: Server port (default: 5000)MCP_PATH: MCP endpoint path (default: "/mcp")GOOGLE_CLIENT_ID: Google OAuth client IDGOOGLE_CLIENT_SECRET: Google OAuth client secretREQUIRED_SCOPES: OAuth scopes (default: "openid https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile")