Skip to content

Commit 5cf3353

Browse files
authored
Merge pull request #733 from CodingCatDev/dev
fix(site): MCP 2026-07-28 Inspector checks, non-PKCE offline_access token exchange, and OAuth debug logging
2 parents 6016b99 + c843ad0 commit 5cf3353

8 files changed

Lines changed: 1093 additions & 109 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
CREATE TABLE IF NOT EXISTS oauth_debug_log (
2+
id TEXT PRIMARY KEY,
3+
createdAt INTEGER NOT NULL,
4+
method TEXT NOT NULL,
5+
path TEXT NOT NULL,
6+
query TEXT,
7+
headers TEXT,
8+
requestBody TEXT,
9+
responseStatus INTEGER,
10+
responseBody TEXT
11+
);

‎apps/site/src/lib/auth.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ export function getAuth(origin: string, d1?: D1Database) {
9191
jwt(),
9292
mcp({
9393
resource: `${origin}/mcp`,
94+
resources: [`${origin}/mcp`, origin],
95+
clientRegistrationDefaultResources: [`${origin}/mcp`, origin],
9496
loginPage: "/sign-in",
9597
consentPage: "/oauth2/consent",
9698
allowDynamicClientRegistration: true,

‎apps/site/src/pages/.well-known/oauth-protected-resource.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const GET: APIRoute = async ({ locals }) => {
99
const origin = locals.siteUrl.origin;
1010

1111
const protectedResource = {
12-
resource: origin,
12+
resource: `${origin}/mcp`,
1313
authorization_servers: [origin],
1414
scopes_supported: [
1515
"openid",

0 commit comments

Comments
 (0)