fix: scopes for windsurf

This commit is contained in:
Manoj K 2025-08-24 19:58:39 +05:30
parent 5d3bdf9bca
commit 9ebee6cb99
3 changed files with 12 additions and 2 deletions

View File

@ -100,6 +100,8 @@ export const action = async ({ request }: ActionFunctionArgs) => {
"mcp",
"mcp:read",
"mcp:write",
"mcp.read",
"mcp.write",
];
const requestedScopes = Array.isArray(allowedScopes)

View File

@ -35,7 +35,7 @@ export async function action({ request }: ActionFunctionArgs) {
responseTypes: response_types || ["code"],
clientType: "mcp", // Special flag for MCP clients
requirePkce: true,
allowedScopes: "mcp",
allowedScopes: "mcp,mcp.read,mcp.write,mcp:read,mcp:write",
});
return json({

View File

@ -297,7 +297,7 @@ export class OAuth2Service {
];
// MCP-related scopes
const mcpScopes = ["mcp", "mcp:read", "mcp:write"];
const mcpScopes = ["mcp", "mcp:read", "mcp:write", "mcp.read", "mcp.write"];
const hasAuthScopes = scopes.some((s) => authScopes.includes(s));
const hasIntegrationScopes = scopes.some((s) =>
@ -359,6 +359,14 @@ export class OAuth2Service {
description: "Write to MCP endpoints",
icon: "pencil",
},
"mcp.read": {
description: "Read MCP endpoints",
icon: "eye",
},
"mcp.write": {
description: "Write to MCP endpoints",
icon: "pencil",
},
};
return scopes.map((scope) => ({