* feat: add MCP Apps extension (io.modelcontextprotocol/ui) support Adds support for the MCP Apps protocol extension, which lets servers expose interactive HTML UIs as resources rendered by spec-conforming clients (e.g. Goose) in sandboxed iframes. - Generic extension plumbing: ServerExtensionInterface and Builder::enableExtension(), with extensions advertised under capabilities.extensions during the initialize handshake. ClientCapabilities/ServerCapabilities gain an extensions field. - Schema DTOs under Mcp\Schema\Extension\Apps: the McpApps marker, UiToolMeta, ToolVisibility enum, UiResourceContentMeta, UiResourceCsp, and UiResourcePermissions (with empty-object presence markers per spec). - A worked weather example under examples/server/mcp-apps/ with a minimal spec-conforming view (ui/initialize handshake, postMessage JSONRPCMessage objects, and ResizeObserver-driven size reporting). - docs/extensions.md guide with pointers from index.md and examples.md to the ext-apps repository for the TypeScript SDK and richer view-side patterns. - Unit and inspector snapshot test coverage. Spec: https://github.com/modelcontextprotocol/ext-apps * Type UiToolMeta visibility as ToolVisibility enum Also fix UiResourceContentMeta::jsonSerialize() return phpdoc. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Address review nitpicks for MCP Apps extension Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Apply PR review feedback for MCP Apps extension Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Add regression tests and CHANGELOG entry for capabilities extensions - Pin the is_array() guards on extensions in ServerCapabilities and ClientCapabilities::fromArray() with explicit non-array payload tests. - Pin the isset()-rejects-null contract in UiResourcePermissions::fromArray(). - Surface the new extensions field on both capability classes in CHANGELOG. - Inline the ?: idiom in Builder::build() to match the surrounding style. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
96 lines
3.6 KiB
JSON
96 lines
3.6 KiB
JSON
{
|
|
"name": "mcp/sdk",
|
|
"description": "Model Context Protocol SDK for Client and Server applications in PHP",
|
|
"license": "Apache-2.0",
|
|
"type": "library",
|
|
"authors": [
|
|
{
|
|
"name": "Christopher Hertel",
|
|
"email": "mail@christopher-hertel.de"
|
|
},
|
|
{
|
|
"name": "Kyrian Obikwelu",
|
|
"email": "koshnawaza@gmail.com"
|
|
},
|
|
{
|
|
"name": "Tobias Nyholm",
|
|
"email": "tobias.nyholm@gmail.com"
|
|
}
|
|
],
|
|
"require": {
|
|
"php": "^8.1",
|
|
"ext-fileinfo": "*",
|
|
"opis/json-schema": "^2.4",
|
|
"php-http/discovery": "^1.20",
|
|
"phpdocumentor/reflection-docblock": "^5.6 || ^6.0",
|
|
"psr/clock": "^1.0",
|
|
"psr/container": "^1.0 || ^2.0",
|
|
"psr/event-dispatcher": "^1.0",
|
|
"psr/http-client": "^1.0",
|
|
"psr/http-factory": "^1.1",
|
|
"psr/http-message": "^1.1 || ^2.0",
|
|
"psr/http-server-handler": "^1.0",
|
|
"psr/http-server-middleware": "^1.0",
|
|
"psr/log": "^1.0 || ^2.0 || ^3.0",
|
|
"symfony/uid": "^5.4 || ^6.4 || ^7.3 || ^8.0"
|
|
},
|
|
"suggest": {
|
|
"symfony/finder": "Required for file-based discovery."
|
|
},
|
|
"require-dev": {
|
|
"ext-openssl": "*",
|
|
"composer/semver": "^3.0",
|
|
"firebase/php-jwt": "^6.10 || ^7.0",
|
|
"laminas/laminas-httphandlerrunner": "^2.12",
|
|
"nyholm/psr7": "^1.8",
|
|
"nyholm/psr7-server": "^1.1",
|
|
"phar-io/composer-distributor": "^1.0.2",
|
|
"php-cs-fixer/shim": "^3.91",
|
|
"phpdocumentor/shim": "^3",
|
|
"phpstan/phpstan": "^2.1",
|
|
"phpunit/phpunit": "^10.5",
|
|
"psr/simple-cache": "^2.0 || ^3.0",
|
|
"symfony/cache": "^5.4 || ^6.4 || ^7.3 || ^8.0",
|
|
"symfony/console": "^5.4 || ^6.4 || ^7.3 || ^8.0",
|
|
"symfony/finder": "^5.4 || ^6.4 || ^7.3 || ^8.0",
|
|
"symfony/http-client": "^5.4 || ^6.4 || ^7.3 || ^8.0",
|
|
"symfony/process": "^5.4 || ^6.4 || ^7.3 || ^8.0"
|
|
},
|
|
"autoload": {
|
|
"psr-4": {
|
|
"Mcp\\": "src/"
|
|
}
|
|
},
|
|
"autoload-dev": {
|
|
"psr-4": {
|
|
"Mcp\\Example\\Server\\CachedDiscovery\\": "examples/server/cached-discovery/",
|
|
"Mcp\\Example\\Server\\ClientCommunication\\": "examples/server/client-communication/",
|
|
"Mcp\\Example\\Server\\ClientLogging\\": "examples/server/client-logging/",
|
|
"Mcp\\Example\\Server\\CombinedRegistration\\": "examples/server/combined-registration/",
|
|
"Mcp\\Example\\Server\\Elicitation\\": "examples/server/elicitation/",
|
|
"Mcp\\Example\\Server\\ComplexToolSchema\\": "examples/server/complex-tool-schema/",
|
|
"Mcp\\Example\\Server\\Conformance\\": "examples/server/conformance/",
|
|
"Mcp\\Example\\Server\\CustomDependencies\\": "examples/server/custom-dependencies/",
|
|
"Mcp\\Example\\Server\\CustomMethodHandlers\\": "examples/server/custom-method-handlers/",
|
|
"Mcp\\Example\\Server\\DiscoveryCalculator\\": "examples/server/discovery-calculator/",
|
|
"Mcp\\Example\\Server\\DiscoveryUserProfile\\": "examples/server/discovery-userprofile/",
|
|
"Mcp\\Example\\Server\\EnvVariables\\": "examples/server/env-variables/",
|
|
"Mcp\\Example\\Server\\ExplicitRegistration\\": "examples/server/explicit-registration/",
|
|
"Mcp\\Example\\Server\\McpApps\\": "examples/server/mcp-apps/",
|
|
"Mcp\\Example\\Server\\OAuthKeycloak\\": "examples/server/oauth-keycloak/",
|
|
"Mcp\\Example\\Server\\OAuthMicrosoft\\": "examples/server/oauth-microsoft/",
|
|
"Mcp\\Example\\Server\\SchemaShowcase\\": "examples/server/schema-showcase/",
|
|
"Mcp\\Tests\\": "tests/"
|
|
},
|
|
"classmap": [
|
|
"tests/Unit/Capability/Discovery/Fixtures/AlternativeFileNameToolHandler.class.inc"
|
|
]
|
|
},
|
|
"config": {
|
|
"allow-plugins": {
|
|
"php-http/discovery": false,
|
|
"phpdocumentor/shim": true
|
|
},
|
|
"sort-packages": true
|
|
}
|
|
}
|