You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MCP Auth Proxy is a secure OAuth 2.1 authentication proxy for Model Context Protocol (MCP) servers. MCP servers are expected to support not only standard OAuth 2.1 flows but also Dynamic Client support (e.g., dynamic client registration) and authentication-related .well-known metadata. On top of that, different MCP clients handle tokens differently, which makes implementation tricky.
23
35
24
-
MCP Auth Proxy sits in front of your MCP services and enforces sign-in with OAuth providers (such as Google or GitHub) before users can access protected MCP resources.
36
+
MCP Auth Proxy sits in front of your MCP services and enforces sign-in with OAuth providers (such as Google or GitHub) or password before users can access protected MCP resources.
25
37
26
38
## Note
27
39
@@ -38,16 +50,16 @@ For a simpler approach to publish local MCP servers over OAuth, consider [MCP Wa
38
50
|`EXTERNAL_URL`| No | External URL for OAuth callbacks |`http://localhost:8081`|
39
51
|`PROXY_URL`| No | Target MCP server URL |`http://localhost:8080`|
40
52
|`GLOBAL_SECRET`| No | Global secret for session encryption |`supersecret`|
41
-
|`GOOGLE_CLIENT_ID`| No*| Google OAuth client ID | - |
42
-
|`GOOGLE_CLIENT_SECRET`| No*| Google OAuth client secret | - |
43
-
|`GOOGLE_ALLOWED_USERS`| No*| Comma-separated list of allowed Google emails | - |
44
-
|`GITHUB_CLIENT_ID`| No*| GitHub OAuth client ID | - |
Copy file name to clipboardExpand all lines: main.go
+10-2Lines changed: 10 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,8 @@ func main() {
27
27
vargithubClientIDstring
28
28
vargithubClientSecretstring
29
29
vargithubAllowedUsersstring
30
+
varpasswordstring
31
+
varpasswordHashstring
30
32
31
33
rootCmd:=&cobra.Command{
32
34
Use: "mcp-warp",
@@ -59,6 +61,8 @@ func main() {
59
61
githubClientID,
60
62
githubClientSecret,
61
63
githubAllowedUsersList,
64
+
password,
65
+
passwordHash,
62
66
); err!=nil {
63
67
panic(err)
64
68
}
@@ -70,17 +74,21 @@ func main() {
70
74
rootCmd.Flags().StringVarP(&externalURL, "external-url", "e", getEnvWithDefault("EXTERNAL_URL", "http://localhost:8081"), "External URL for the proxy")
71
75
rootCmd.Flags().StringVarP(&proxyURL, "proxy-url", "p", getEnvWithDefault("PROXY_URL", "http://localhost:8080"), "Proxy URL for the proxy")
72
76
rootCmd.Flags().StringVarP(&globalSecret, "global-secret", "s", getEnvWithDefault("GLOBAL_SECRET", "supersecret"), "Global secret for the proxy")
rootCmd.Flags().StringVar(&googleAllowedUsers, "google-allowed-users", getEnvWithDefault("GOOGLE_ALLOWED_USERS", ""), "Comma-separated list of allowed Google users (emails)")
rootCmd.Flags().StringVar(&githubAllowedUsers, "github-allowed-users", getEnvWithDefault("GITHUB_ALLOWED_USERS", ""), "Comma-separated list of allowed GitHub users (usernames)")
83
87
88
+
// Password authentication
89
+
rootCmd.Flags().StringVar(&password, "password", getEnvWithDefault("PASSWORD", ""), "Plain text password for authentication (will be hashed with bcrypt)")
90
+
rootCmd.Flags().StringVar(&passwordHash, "password-hash", getEnvWithDefault("PASSWORD_HASH", ""), "Bcrypt hash of password for authentication")
0 commit comments