@@ -6,10 +6,11 @@ import {
6
6
createAuthHandlers ,
7
7
handleTokenExchangeCallback ,
8
8
} from '@repo/mcp-common/src/cloudflare-oauth-handler'
9
+ import { RequiredScopes } from '@repo/mcp-common/src/scopes'
9
10
import { CloudflareMCPServer } from '@repo/mcp-common/src/server'
10
11
import { registerAccountTools } from '@repo/mcp-common/src/tools/account'
12
+ import { MetricsTracker } from '@repo/mcp-observability'
11
13
12
- import { MetricsTracker } from '../../../packages/mcp-observability/src'
13
14
import { registerDEXTools } from './tools/dex'
14
15
15
16
import type { AccountSchema , UserSchema } from '@repo/mcp-common/src/cloudflare-oauth-handler'
@@ -88,15 +89,13 @@ export class CloudflareDEXMCP extends McpAgent<Env, State, Props> {
88
89
}
89
90
90
91
const DexScopes = {
91
- 'account:read' : 'See your account info such as account details, analytics, and memberships.' ,
92
- 'user:read' : 'See your user info such as name, email address, and account memberships.' ,
92
+ ...RequiredScopes ,
93
93
'dex:read' : 'See Cloudflare Cloudflare DEX data for your account' ,
94
94
offline_access : 'Grants refresh tokens for long-lived access.' ,
95
95
} as const
96
96
97
97
export default new OAuthProvider ( {
98
98
apiRoute : '/sse' ,
99
- // @ts -ignore
100
99
apiHandler : CloudflareDEXMCP . mount ( '/sse' ) ,
101
100
// @ts -ignore
102
101
defaultHandler : createAuthHandlers ( { scopes : DexScopes , metrics } ) ,
0 commit comments