Skip to content

Commit 0dbfd0c

Browse files
sharpninjaclaude
andcommitted
Unify mcp-director and mcp-web IdentityServer clients into single public client
Merges the separate mcp-director (device code + password) and mcp-web (code flow) clients into one unified mcp-director client supporting all three grant types with PKCE, redirect URIs for mcp-web ports 39983/39984, and bumps McpServerTools submodule. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 9d83243 commit 0dbfd0c

2 files changed

Lines changed: 8 additions & 18 deletions

File tree

src/McpServer.Support.Mcp/Identity/IdentityServerConfig.cs

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -45,31 +45,17 @@ public static IEnumerable<DuendeClient> GetClients(IdentityServerOptions options
4545
AllowedScopes = { options.ApiScopeName },
4646
},
4747

48-
// Interactive client for CLI tools (Device Authorization + Password flows)
48+
// Unified public client for CLI tools, web UI, and browser-based flows
4949
new DuendeClient
5050
{
5151
ClientId = "mcp-director",
52-
ClientName = "MCP Director CLI",
52+
ClientName = "MCP Director",
5353
AllowedGrantTypes =
5454
{
55+
GrantType.AuthorizationCode,
5556
"urn:ietf:params:oauth:grant-type:device_code",
5657
GrantType.ResourceOwnerPassword,
5758
},
58-
RequireClientSecret = false,
59-
AllowedScopes = { "openid", "profile", "email", "roles", options.ApiScopeName },
60-
AllowOfflineAccess = true,
61-
AccessTokenLifetime = 3600,
62-
RefreshTokenUsage = TokenUsage.ReUse,
63-
RefreshTokenExpiration = TokenExpiration.Sliding,
64-
SlidingRefreshTokenLifetime = 86400,
65-
},
66-
67-
// Web/SPA client for pairing UI and browser-based access
68-
new DuendeClient
69-
{
70-
ClientId = "mcp-web",
71-
ClientName = "MCP Web Client",
72-
AllowedGrantTypes = GrantTypes.Code,
7359
RequirePkce = true,
7460
RequireClientSecret = false,
7561
RedirectUris =
@@ -89,6 +75,10 @@ public static IEnumerable<DuendeClient> GetClients(IdentityServerOptions options
8975
},
9076
AllowedScopes = { "openid", "profile", "email", "roles", options.ApiScopeName },
9177
AllowOfflineAccess = true,
78+
AccessTokenLifetime = 3600,
79+
RefreshTokenUsage = TokenUsage.ReUse,
80+
RefreshTokenExpiration = TokenExpiration.Sliding,
81+
SlidingRefreshTokenLifetime = 86400,
9282
},
9383
];
9484
}

0 commit comments

Comments
 (0)