@ian-pascoe/pi-mcp 0.3.0 → 0.3.2
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.
- package/dist/pi-mcp-cli.js +620 -595
- package/package.json +2 -2
- package/src/mcp-oauth.ts +5 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ian-pascoe/pi-mcp",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A complete Model Context Protocol Host for Pi",
|
|
6
6
|
"keywords": [
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@modelcontextprotocol/server": "^2.0.0",
|
|
44
|
-
"esbuild": "0.
|
|
44
|
+
"esbuild": "0.28.2"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"@earendil-works/pi-ai": "*",
|
package/src/mcp-oauth.ts
CHANGED
|
@@ -12,7 +12,7 @@ import type {
|
|
|
12
12
|
StoredOAuthClientInformation,
|
|
13
13
|
StoredOAuthTokens,
|
|
14
14
|
} from "@modelcontextprotocol/client";
|
|
15
|
-
import { auth, resourceUrlFromServerUrl } from "@modelcontextprotocol/client";
|
|
15
|
+
import { auth, checkResourceAllowed, resourceUrlFromServerUrl } from "@modelcontextprotocol/client";
|
|
16
16
|
import { type McpAuthBinding, type McpAuthEntry, McpAuthStore } from "./mcp-auth-store.js";
|
|
17
17
|
import type { McpStoreJsonObject, McpStoreJsonValue } from "./mcp-settings-store.js";
|
|
18
18
|
|
|
@@ -384,7 +384,10 @@ export class McpOAuthProvider implements OAuthClientProvider {
|
|
|
384
384
|
resource !== undefined &&
|
|
385
385
|
(typeof resource !== "string" ||
|
|
386
386
|
!URL.canParse(resource) ||
|
|
387
|
-
|
|
387
|
+
!checkResourceAllowed({
|
|
388
|
+
configuredResource: resource,
|
|
389
|
+
requestedResource: resourceUrlFromServerUrl(this.options.serverUrl),
|
|
390
|
+
}))
|
|
388
391
|
) {
|
|
389
392
|
return undefined;
|
|
390
393
|
}
|