The mcp-apps-server example shows how to configure the CSP in the resource's _meta field:
|
metaProvider = CspMetaProvider.class) |
But the example is incorrect. The _meta.ui.csp fields should be set on the resource response, not the resource definition.
This is stated explicitly in the MCP Apps Documentation.
The
mcp-apps-serverexample shows how to configure the CSP in the resource's_metafield:spring-ai-examples/model-context-protocol/mcp-apps-server/src/main/java/com/example/mcpappsserver/DiceApp.java
Line 27 in 1a13f73
But the example is incorrect. The
_meta.ui.cspfields should be set on the resource response, not the resource definition.This is stated explicitly in the MCP Apps Documentation.