fix: MCP Oauth scopes for windsurf (#57)

This commit is contained in:
Manoj 2025-08-24 20:00:21 +05:30 committed by GitHub
parent 5d3bdf9bca
commit c98804b9bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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) => ({