@phake/mcp 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1759,7 +1759,7 @@ function buildUnauthorizedChallenge(args) {
1759
1759
  return {
1760
1760
  status: 401,
1761
1761
  headers: {
1762
- "WWW-Authenticate": `Bearer realm="MCP", authorization_uri="${resourceMd}"`,
1762
+ "WWW-Authenticate": `Bearer realm="MCP", resource_metadata="${resourceMd}"`,
1763
1763
  "Mcp-Session-Id": args.sid
1764
1764
  },
1765
1765
  body: {
@@ -2941,6 +2941,12 @@ function attachDiscoveryRoutes(router, config) {
2941
2941
  const metadata = protectedResourceMetadata(here, sid);
2942
2942
  return jsonResponse(metadata);
2943
2943
  });
2944
+ router.get("/.well-known/oauth-protected-resource/*", async (request) => {
2945
+ const here = new URL(request.url);
2946
+ const sid = here.searchParams.get("sid") ?? undefined;
2947
+ const metadata = protectedResourceMetadata(here, sid);
2948
+ return jsonResponse(metadata);
2949
+ });
2944
2950
  }
2945
2951
 
2946
2952
  // src/adapters/http-worker/routes.oauth.ts
package/dist/index.js CHANGED
@@ -82,7 +82,7 @@ import {
82
82
  withCancellation,
83
83
  withCors,
84
84
  workerDiscoveryStrategy
85
- } from "./index-zhw318hb.js";
85
+ } from "./index-qmejk5tj.js";
86
86
  // src/shared/config/env.ts
87
87
  function parseBoolean(value) {
88
88
  return String(value || "false").toLowerCase() === "true";
@@ -2,7 +2,7 @@ import {
2
2
  createWorkerRouter,
3
3
  initializeWorkerStorage,
4
4
  shimProcessEnv
5
- } from "../../index-zhw318hb.js";
5
+ } from "../../index-qmejk5tj.js";
6
6
  export {
7
7
  shimProcessEnv,
8
8
  initializeWorkerStorage,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phake/mcp",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/fuongz/phake-mcp"