@ttoss/http-server-mcp 0.36.0 → 0.37.0
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/README.md +1 -1
- package/dist/index.cjs +2 -1
- package/dist/index.d.cts +6 -0
- package/dist/index.d.mts +6 -0
- package/dist/index.mjs +2 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -357,7 +357,7 @@ createMcpRouter(mcpServer, {
|
|
|
357
357
|
});
|
|
358
358
|
```
|
|
359
359
|
|
|
360
|
-
The `resource` field in the metadata document is automatically set to `resourceServerUrl + path` (e.g. `https://mcp.example.com/mcp` for the default path). This means MCP clients that follow `resource` to connect will land on the actual MCP endpoint rather than the bare origin.
|
|
360
|
+
The `resource` field in the metadata document is automatically set to `resourceServerUrl + path` (e.g. `https://mcp.example.com/mcp` for the default path). This means MCP clients that follow `resource` to connect will land on the actual MCP endpoint rather than the bare origin. Add `scopesSupported` to advertise the scopes this server accepts as `scopes_supported`, so clients request only what they need; unlike `requiredScopes`, it enforces nothing.
|
|
361
361
|
|
|
362
362
|
**With your own auth middleware** — use `createProtectedResourceMetadataMiddleware` as a standalone middleware, mounted _before_ your auth layer so discovery stays unauthenticated:
|
|
363
363
|
|
package/dist/index.cjs
CHANGED
|
@@ -1616,7 +1616,8 @@ var createMcpRouter = (server, options = {}) => {
|
|
|
1616
1616
|
const metadata = resourceUrl !== void 0 && auth.authorizationServerUrl !== void 0 ? {
|
|
1617
1617
|
document: (0, _ttoss_auth_core.protectedResourceMetadataDocument)({
|
|
1618
1618
|
resource: resourceUrl,
|
|
1619
|
-
authorizationServers: [auth.authorizationServerUrl]
|
|
1619
|
+
authorizationServers: [auth.authorizationServerUrl],
|
|
1620
|
+
scopesSupported: auth.scopesSupported
|
|
1620
1621
|
}),
|
|
1621
1622
|
paths: (0, _ttoss_auth_core.protectedResourceMetadataPaths)({
|
|
1622
1623
|
resource: resourceUrl
|
package/dist/index.d.cts
CHANGED
|
@@ -1518,6 +1518,12 @@ interface McpAuthOptions {
|
|
|
1518
1518
|
resourceServerUrl?: string;
|
|
1519
1519
|
/** URL of the OAuth Authorization Server that issues tokens for this resource. */
|
|
1520
1520
|
authorizationServerUrl?: string;
|
|
1521
|
+
/**
|
|
1522
|
+
* Scopes this MCP server accepts, advertised as `scopes_supported` in the
|
|
1523
|
+
* Protected Resource Metadata document so clients request only what they
|
|
1524
|
+
* need. Unlike `requiredScopes`, nothing is enforced from it.
|
|
1525
|
+
*/
|
|
1526
|
+
scopesSupported?: string[];
|
|
1521
1527
|
/**
|
|
1522
1528
|
* Expected audience — the resource indicator (RFC 8707) this MCP server
|
|
1523
1529
|
* identifies as. When set, the verified token's `aud` claim must include at
|
package/dist/index.d.mts
CHANGED
|
@@ -1519,6 +1519,12 @@ interface McpAuthOptions {
|
|
|
1519
1519
|
resourceServerUrl?: string;
|
|
1520
1520
|
/** URL of the OAuth Authorization Server that issues tokens for this resource. */
|
|
1521
1521
|
authorizationServerUrl?: string;
|
|
1522
|
+
/**
|
|
1523
|
+
* Scopes this MCP server accepts, advertised as `scopes_supported` in the
|
|
1524
|
+
* Protected Resource Metadata document so clients request only what they
|
|
1525
|
+
* need. Unlike `requiredScopes`, nothing is enforced from it.
|
|
1526
|
+
*/
|
|
1527
|
+
scopesSupported?: string[];
|
|
1522
1528
|
/**
|
|
1523
1529
|
* Expected audience — the resource indicator (RFC 8707) this MCP server
|
|
1524
1530
|
* identifies as. When set, the verified token's `aud` claim must include at
|
package/dist/index.mjs
CHANGED
|
@@ -1613,7 +1613,8 @@ var createMcpRouter = (server, options = {}) => {
|
|
|
1613
1613
|
const metadata = resourceUrl !== void 0 && auth.authorizationServerUrl !== void 0 ? {
|
|
1614
1614
|
document: protectedResourceMetadataDocument({
|
|
1615
1615
|
resource: resourceUrl,
|
|
1616
|
-
authorizationServers: [auth.authorizationServerUrl]
|
|
1616
|
+
authorizationServers: [auth.authorizationServerUrl],
|
|
1617
|
+
scopesSupported: auth.scopesSupported
|
|
1617
1618
|
}),
|
|
1618
1619
|
paths: protectedResourceMetadataPaths({
|
|
1619
1620
|
resource: resourceUrl
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/http-server-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.37.0",
|
|
4
4
|
"description": "Model Context Protocol (MCP) server integration for @ttoss/http-server",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"@modelcontextprotocol/node": "^2.0.0",
|
|
38
38
|
"@modelcontextprotocol/server": "^2.0.0",
|
|
39
39
|
"zod": "^4.4.3",
|
|
40
|
-
"@ttoss/auth
|
|
40
|
+
"@ttoss/http-server-auth": "^0.9.0",
|
|
41
41
|
"@ttoss/i18n-core": "^0.8.1",
|
|
42
|
-
"@ttoss/
|
|
43
|
-
"@ttoss/http-server
|
|
42
|
+
"@ttoss/auth-core": "^0.18.0",
|
|
43
|
+
"@ttoss/http-server": "^0.13.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@modelcontextprotocol/client": "^2.0.0",
|