@vendure/mcp-plugin 3.8.0-minor-bootstrap.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/lib/api/api-extensions.d.ts +2 -0
- package/lib/api/api-extensions.js +239 -0
- package/lib/api/api-extensions.js.map +1 -0
- package/lib/api/mcp-actor.service.d.ts +19 -0
- package/lib/api/mcp-actor.service.js +52 -0
- package/lib/api/mcp-actor.service.js.map +1 -0
- package/lib/api/mcp-admin.resolver.d.ts +105 -0
- package/lib/api/mcp-admin.resolver.js +463 -0
- package/lib/api/mcp-admin.resolver.js.map +1 -0
- package/lib/api/mcp-shop.resolver.d.ts +25 -0
- package/lib/api/mcp-shop.resolver.js +74 -0
- package/lib/api/mcp-shop.resolver.js.map +1 -0
- package/lib/check-options.d.ts +7 -0
- package/lib/check-options.js +130 -0
- package/lib/check-options.js.map +1 -0
- package/lib/constants.d.ts +48 -0
- package/lib/constants.js +72 -0
- package/lib/constants.js.map +1 -0
- package/lib/delete-in-batches.d.ts +5 -0
- package/lib/delete-in-batches.js +28 -0
- package/lib/delete-in-batches.js.map +1 -0
- package/lib/entities/index.d.ts +5 -0
- package/lib/entities/index.js +22 -0
- package/lib/entities/index.js.map +1 -0
- package/lib/entities/mcp-authorization-code.entity.d.ts +33 -0
- package/lib/entities/mcp-authorization-code.entity.js +77 -0
- package/lib/entities/mcp-authorization-code.entity.js.map +1 -0
- package/lib/entities/mcp-authorization-request.entity.d.ts +31 -0
- package/lib/entities/mcp-authorization-request.entity.js +73 -0
- package/lib/entities/mcp-authorization-request.entity.js.map +1 -0
- package/lib/entities/mcp-oauth-client.entity.d.ts +56 -0
- package/lib/entities/mcp-oauth-client.entity.js +70 -0
- package/lib/entities/mcp-oauth-client.entity.js.map +1 -0
- package/lib/entities/mcp-oauth-grant.entity.d.ts +77 -0
- package/lib/entities/mcp-oauth-grant.entity.js +121 -0
- package/lib/entities/mcp-oauth-grant.entity.js.map +1 -0
- package/lib/entities/mcp-tool-call-log.entity.d.ts +50 -0
- package/lib/entities/mcp-tool-call-log.entity.js +101 -0
- package/lib/entities/mcp-tool-call-log.entity.js.map +1 -0
- package/lib/events/mcp-tool-call.event.d.ts +17 -0
- package/lib/events/mcp-tool-call.event.js +23 -0
- package/lib/events/mcp-tool-call.event.js.map +1 -0
- package/lib/get-client-ip.d.ts +2 -0
- package/lib/get-client-ip.js +10 -0
- package/lib/get-client-ip.js.map +1 -0
- package/lib/get-language-code.d.ts +3 -0
- package/lib/get-language-code.js +12 -0
- package/lib/get-language-code.js.map +1 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.js +26 -0
- package/lib/index.js.map +1 -0
- package/lib/internal-types.d.ts +27 -0
- package/lib/internal-types.js +3 -0
- package/lib/internal-types.js.map +1 -0
- package/lib/logging/mcp-tool-call-log-retention.service.d.ts +8 -0
- package/lib/logging/mcp-tool-call-log-retention.service.js +54 -0
- package/lib/logging/mcp-tool-call-log-retention.service.js.map +1 -0
- package/lib/logging/mcp-tool-call-log.service.d.ts +24 -0
- package/lib/logging/mcp-tool-call-log.service.js +128 -0
- package/lib/logging/mcp-tool-call-log.service.js.map +1 -0
- package/lib/oauth/cimd/cimd-client-resolver.service.d.ts +18 -0
- package/lib/oauth/cimd/cimd-client-resolver.service.js +109 -0
- package/lib/oauth/cimd/cimd-client-resolver.service.js.map +1 -0
- package/lib/oauth/cimd/cimd-document.d.ts +11 -0
- package/lib/oauth/cimd/cimd-document.js +66 -0
- package/lib/oauth/cimd/cimd-document.js.map +1 -0
- package/lib/oauth/cimd/cimd-fetch.d.ts +14 -0
- package/lib/oauth/cimd/cimd-fetch.js +192 -0
- package/lib/oauth/cimd/cimd-fetch.js.map +1 -0
- package/lib/oauth/cimd/cimd-url.d.ts +5 -0
- package/lib/oauth/cimd/cimd-url.js +94 -0
- package/lib/oauth/cimd/cimd-url.js.map +1 -0
- package/lib/oauth/grant-session.service.d.ts +19 -0
- package/lib/oauth/grant-session.service.js +141 -0
- package/lib/oauth/grant-session.service.js.map +1 -0
- package/lib/oauth/oauth-error.d.ts +18 -0
- package/lib/oauth/oauth-error.js +60 -0
- package/lib/oauth/oauth-error.js.map +1 -0
- package/lib/oauth/oauth-metadata.service.d.ts +34 -0
- package/lib/oauth/oauth-metadata.service.js +107 -0
- package/lib/oauth/oauth-metadata.service.js.map +1 -0
- package/lib/oauth/oauth-retention.service.d.ts +23 -0
- package/lib/oauth/oauth-retention.service.js +103 -0
- package/lib/oauth/oauth-retention.service.js.map +1 -0
- package/lib/oauth/oauth-types.d.ts +61 -0
- package/lib/oauth/oauth-types.js +32 -0
- package/lib/oauth/oauth-types.js.map +1 -0
- package/lib/oauth/oauth-utils.d.ts +20 -0
- package/lib/oauth/oauth-utils.js +111 -0
- package/lib/oauth/oauth-utils.js.map +1 -0
- package/lib/oauth/oauth.controller.d.ts +31 -0
- package/lib/oauth/oauth.controller.js +132 -0
- package/lib/oauth/oauth.controller.js.map +1 -0
- package/lib/oauth/oauth.service.d.ts +69 -0
- package/lib/oauth/oauth.service.js +650 -0
- package/lib/oauth/oauth.service.js.map +1 -0
- package/lib/oauth/token-hash.d.ts +6 -0
- package/lib/oauth/token-hash.js +21 -0
- package/lib/oauth/token-hash.js.map +1 -0
- package/lib/plugin.d.ts +54 -0
- package/lib/plugin.js +171 -0
- package/lib/plugin.js.map +1 -0
- package/lib/rate-limit/ip-bucket-key.d.ts +1 -0
- package/lib/rate-limit/ip-bucket-key.js +35 -0
- package/lib/rate-limit/ip-bucket-key.js.map +1 -0
- package/lib/rate-limit/mcp-oauth-rate-limit.guard.d.ts +20 -0
- package/lib/rate-limit/mcp-oauth-rate-limit.guard.js +63 -0
- package/lib/rate-limit/mcp-oauth-rate-limit.guard.js.map +1 -0
- package/lib/rate-limit/mcp-rate-limiter.service.d.ts +47 -0
- package/lib/rate-limit/mcp-rate-limiter.service.js +248 -0
- package/lib/rate-limit/mcp-rate-limiter.service.js.map +1 -0
- package/lib/registry/bm25.d.ts +12 -0
- package/lib/registry/bm25.js +60 -0
- package/lib/registry/bm25.js.map +1 -0
- package/lib/registry/mcp-tool-execution.service.d.ts +45 -0
- package/lib/registry/mcp-tool-execution.service.js +72 -0
- package/lib/registry/mcp-tool-execution.service.js.map +1 -0
- package/lib/registry/mcp-tool-registry.service.d.ts +89 -0
- package/lib/registry/mcp-tool-registry.service.js +668 -0
- package/lib/registry/mcp-tool-registry.service.js.map +1 -0
- package/lib/registry/mcp-tool-schema.service.d.ts +42 -0
- package/lib/registry/mcp-tool-schema.service.js +229 -0
- package/lib/registry/mcp-tool-schema.service.js.map +1 -0
- package/lib/registry/registry-types.d.ts +32 -0
- package/lib/registry/registry-types.js +3 -0
- package/lib/registry/registry-types.js.map +1 -0
- package/lib/resolve-options.d.ts +7 -0
- package/lib/resolve-options.js +85 -0
- package/lib/resolve-options.js.map +1 -0
- package/lib/shared/endpoint-paths.d.ts +8 -0
- package/lib/shared/endpoint-paths.js +12 -0
- package/lib/shared/endpoint-paths.js.map +1 -0
- package/lib/shared/loopback.d.ts +2 -0
- package/lib/shared/loopback.js +9 -0
- package/lib/shared/loopback.js.map +1 -0
- package/lib/shop-session/mcp-shop-session.service.d.ts +47 -0
- package/lib/shop-session/mcp-shop-session.service.js +132 -0
- package/lib/shop-session/mcp-shop-session.service.js.map +1 -0
- package/lib/tasks/mcp-oauth-retention.task.d.ts +9 -0
- package/lib/tasks/mcp-oauth-retention.task.js +21 -0
- package/lib/tasks/mcp-oauth-retention.task.js.map +1 -0
- package/lib/tasks/mcp-tool-call-log-retention.task.d.ts +7 -0
- package/lib/tasks/mcp-tool-call-log-retention.task.js +22 -0
- package/lib/tasks/mcp-tool-call-log-retention.task.js.map +1 -0
- package/lib/tools/built-in/active-order.service.d.ts +26 -0
- package/lib/tools/built-in/active-order.service.js +125 -0
- package/lib/tools/built-in/active-order.service.js.map +1 -0
- package/lib/tools/built-in/admin/add-customer-to-group.tool.d.ts +23 -0
- package/lib/tools/built-in/admin/add-customer-to-group.tool.js +68 -0
- package/lib/tools/built-in/admin/add-customer-to-group.tool.js.map +1 -0
- package/lib/tools/built-in/admin/add-note-to-order.tool.d.ts +104 -0
- package/lib/tools/built-in/admin/add-note-to-order.tool.js +66 -0
- package/lib/tools/built-in/admin/add-note-to-order.tool.js.map +1 -0
- package/lib/tools/built-in/admin/adjust-stock.tool.d.ts +26 -0
- package/lib/tools/built-in/admin/adjust-stock.tool.js +88 -0
- package/lib/tools/built-in/admin/adjust-stock.tool.js.map +1 -0
- package/lib/tools/built-in/admin/cancel-order.tool.d.ts +17 -0
- package/lib/tools/built-in/admin/cancel-order.tool.js +60 -0
- package/lib/tools/built-in/admin/cancel-order.tool.js.map +1 -0
- package/lib/tools/built-in/admin/channel-access.d.ts +2 -0
- package/lib/tools/built-in/admin/channel-access.js +9 -0
- package/lib/tools/built-in/admin/channel-access.js.map +1 -0
- package/lib/tools/built-in/admin/create-customer.tool.d.ts +41 -0
- package/lib/tools/built-in/admin/create-customer.tool.js +57 -0
- package/lib/tools/built-in/admin/create-customer.tool.js.map +1 -0
- package/lib/tools/built-in/admin/create-fulfillment.tool.d.ts +118 -0
- package/lib/tools/built-in/admin/create-fulfillment.tool.js +156 -0
- package/lib/tools/built-in/admin/create-fulfillment.tool.js.map +1 -0
- package/lib/tools/built-in/admin/create-product.tool.d.ts +52 -0
- package/lib/tools/built-in/admin/create-product.tool.js +61 -0
- package/lib/tools/built-in/admin/create-product.tool.js.map +1 -0
- package/lib/tools/built-in/admin/create-variant.tool.d.ts +48 -0
- package/lib/tools/built-in/admin/create-variant.tool.js +79 -0
- package/lib/tools/built-in/admin/create-variant.tool.js.map +1 -0
- package/lib/tools/built-in/admin/entity-field-schemas.d.ts +36 -0
- package/lib/tools/built-in/admin/entity-field-schemas.js +63 -0
- package/lib/tools/built-in/admin/entity-field-schemas.js.map +1 -0
- package/lib/tools/built-in/admin/get-customer.tool.d.ts +28 -0
- package/lib/tools/built-in/admin/get-customer.tool.js +55 -0
- package/lib/tools/built-in/admin/get-customer.tool.js.map +1 -0
- package/lib/tools/built-in/admin/get-order.tool.d.ts +100 -0
- package/lib/tools/built-in/admin/get-order.tool.js +68 -0
- package/lib/tools/built-in/admin/get-order.tool.js.map +1 -0
- package/lib/tools/built-in/admin/get-product.tool.d.ts +69 -0
- package/lib/tools/built-in/admin/get-product.tool.js +77 -0
- package/lib/tools/built-in/admin/get-product.tool.js.map +1 -0
- package/lib/tools/built-in/admin/get-stock-levels.tool.d.ts +23 -0
- package/lib/tools/built-in/admin/get-stock-levels.tool.js +61 -0
- package/lib/tools/built-in/admin/get-stock-levels.tool.js.map +1 -0
- package/lib/tools/built-in/admin/index.d.ts +25 -0
- package/lib/tools/built-in/admin/index.js +54 -0
- package/lib/tools/built-in/admin/index.js.map +1 -0
- package/lib/tools/built-in/admin/list-channels.tool.d.ts +24 -0
- package/lib/tools/built-in/admin/list-channels.tool.js +56 -0
- package/lib/tools/built-in/admin/list-channels.tool.js.map +1 -0
- package/lib/tools/built-in/admin/list-customer-groups.tool.d.ts +23 -0
- package/lib/tools/built-in/admin/list-customer-groups.tool.js +52 -0
- package/lib/tools/built-in/admin/list-customer-groups.tool.js.map +1 -0
- package/lib/tools/built-in/admin/list-customers.tool.d.ts +62 -0
- package/lib/tools/built-in/admin/list-customers.tool.js +66 -0
- package/lib/tools/built-in/admin/list-customers.tool.js.map +1 -0
- package/lib/tools/built-in/admin/list-orders.tool.d.ts +142 -0
- package/lib/tools/built-in/admin/list-orders.tool.js +87 -0
- package/lib/tools/built-in/admin/list-orders.tool.js.map +1 -0
- package/lib/tools/built-in/admin/list-products.tool.d.ts +63 -0
- package/lib/tools/built-in/admin/list-products.tool.js +71 -0
- package/lib/tools/built-in/admin/list-products.tool.js.map +1 -0
- package/lib/tools/built-in/admin/refund-order.tool.d.ts +38 -0
- package/lib/tools/built-in/admin/refund-order.tool.js +115 -0
- package/lib/tools/built-in/admin/refund-order.tool.js.map +1 -0
- package/lib/tools/built-in/admin/set-active-channel.tool.d.ts +22 -0
- package/lib/tools/built-in/admin/set-active-channel.tool.js +84 -0
- package/lib/tools/built-in/admin/set-active-channel.tool.js.map +1 -0
- package/lib/tools/built-in/admin/translation-schemas.d.ts +12 -0
- package/lib/tools/built-in/admin/translation-schemas.js +17 -0
- package/lib/tools/built-in/admin/translation-schemas.js.map +1 -0
- package/lib/tools/built-in/admin/update-customer.tool.d.ts +42 -0
- package/lib/tools/built-in/admin/update-customer.tool.js +59 -0
- package/lib/tools/built-in/admin/update-customer.tool.js.map +1 -0
- package/lib/tools/built-in/admin/update-order-state.tool.d.ts +16 -0
- package/lib/tools/built-in/admin/update-order-state.tool.js +58 -0
- package/lib/tools/built-in/admin/update-order-state.tool.js.map +1 -0
- package/lib/tools/built-in/admin/update-product.tool.d.ts +53 -0
- package/lib/tools/built-in/admin/update-product.tool.js +68 -0
- package/lib/tools/built-in/admin/update-product.tool.js.map +1 -0
- package/lib/tools/built-in/admin/update-variant.tool.d.ts +46 -0
- package/lib/tools/built-in/admin/update-variant.tool.js +77 -0
- package/lib/tools/built-in/admin/update-variant.tool.js.map +1 -0
- package/lib/tools/built-in/admin/upload-asset.tool.d.ts +32 -0
- package/lib/tools/built-in/admin/upload-asset.tool.js +56 -0
- package/lib/tools/built-in/admin/upload-asset.tool.js.map +1 -0
- package/lib/tools/built-in/catalog-query.service.d.ts +21 -0
- package/lib/tools/built-in/catalog-query.service.js +128 -0
- package/lib/tools/built-in/catalog-query.service.js.map +1 -0
- package/lib/tools/built-in/custom-field-input.service.d.ts +10 -0
- package/lib/tools/built-in/custom-field-input.service.js +64 -0
- package/lib/tools/built-in/custom-field-input.service.js.map +1 -0
- package/lib/tools/built-in/email-schema.d.ts +2 -0
- package/lib/tools/built-in/email-schema.js +12 -0
- package/lib/tools/built-in/email-schema.js.map +1 -0
- package/lib/tools/built-in/id-schema.d.ts +3 -0
- package/lib/tools/built-in/id-schema.js +11 -0
- package/lib/tools/built-in/id-schema.js.map +1 -0
- package/lib/tools/built-in/int32-schema.d.ts +4 -0
- package/lib/tools/built-in/int32-schema.js +8 -0
- package/lib/tools/built-in/int32-schema.js.map +1 -0
- package/lib/tools/built-in/list-helpers.d.ts +48 -0
- package/lib/tools/built-in/list-helpers.js +76 -0
- package/lib/tools/built-in/list-helpers.js.map +1 -0
- package/lib/tools/built-in/order-list-helpers.d.ts +20 -0
- package/lib/tools/built-in/order-list-helpers.js +48 -0
- package/lib/tools/built-in/order-list-helpers.js.map +1 -0
- package/lib/tools/built-in/providers.d.ts +2 -0
- package/lib/tools/built-in/providers.js +7 -0
- package/lib/tools/built-in/providers.js.map +1 -0
- package/lib/tools/built-in/remote-asset.d.ts +4 -0
- package/lib/tools/built-in/remote-asset.js +54 -0
- package/lib/tools/built-in/remote-asset.js.map +1 -0
- package/lib/tools/built-in/serializer.service.d.ts +327 -0
- package/lib/tools/built-in/serializer.service.js +413 -0
- package/lib/tools/built-in/serializer.service.js.map +1 -0
- package/lib/tools/built-in/shop/add-to-cart.tool.d.ts +21 -0
- package/lib/tools/built-in/shop/add-to-cart.tool.js +100 -0
- package/lib/tools/built-in/shop/add-to-cart.tool.js.map +1 -0
- package/lib/tools/built-in/shop/address-schema.d.ts +15 -0
- package/lib/tools/built-in/shop/address-schema.js +20 -0
- package/lib/tools/built-in/shop/address-schema.js.map +1 -0
- package/lib/tools/built-in/shop/apply-coupon-code.tool.d.ts +17 -0
- package/lib/tools/built-in/shop/apply-coupon-code.tool.js +62 -0
- package/lib/tools/built-in/shop/apply-coupon-code.tool.js.map +1 -0
- package/lib/tools/built-in/shop/collection-lookup.d.ts +15 -0
- package/lib/tools/built-in/shop/collection-lookup.js +35 -0
- package/lib/tools/built-in/shop/collection-lookup.js.map +1 -0
- package/lib/tools/built-in/shop/get-cart.tool.d.ts +94 -0
- package/lib/tools/built-in/shop/get-cart.tool.js +55 -0
- package/lib/tools/built-in/shop/get-cart.tool.js.map +1 -0
- package/lib/tools/built-in/shop/get-collection.tool.d.ts +42 -0
- package/lib/tools/built-in/shop/get-collection.tool.js +64 -0
- package/lib/tools/built-in/shop/get-collection.tool.js.map +1 -0
- package/lib/tools/built-in/shop/get-eligible-payment-methods.tool.d.ts +26 -0
- package/lib/tools/built-in/shop/get-eligible-payment-methods.tool.js +58 -0
- package/lib/tools/built-in/shop/get-eligible-payment-methods.tool.js.map +1 -0
- package/lib/tools/built-in/shop/get-eligible-shipping-methods.tool.d.ts +30 -0
- package/lib/tools/built-in/shop/get-eligible-shipping-methods.tool.js +59 -0
- package/lib/tools/built-in/shop/get-eligible-shipping-methods.tool.js.map +1 -0
- package/lib/tools/built-in/shop/get-my-account.tool.d.ts +22 -0
- package/lib/tools/built-in/shop/get-my-account.tool.js +57 -0
- package/lib/tools/built-in/shop/get-my-account.tool.js.map +1 -0
- package/lib/tools/built-in/shop/get-order.tool.d.ts +100 -0
- package/lib/tools/built-in/shop/get-order.tool.js +67 -0
- package/lib/tools/built-in/shop/get-order.tool.js.map +1 -0
- package/lib/tools/built-in/shop/get-product.tool.d.ts +57 -0
- package/lib/tools/built-in/shop/get-product.tool.js +81 -0
- package/lib/tools/built-in/shop/get-product.tool.js.map +1 -0
- package/lib/tools/built-in/shop/index.d.ts +19 -0
- package/lib/tools/built-in/shop/index.js +42 -0
- package/lib/tools/built-in/shop/index.js.map +1 -0
- package/lib/tools/built-in/shop/list-collections.tool.d.ts +42 -0
- package/lib/tools/built-in/shop/list-collections.tool.js +75 -0
- package/lib/tools/built-in/shop/list-collections.tool.js.map +1 -0
- package/lib/tools/built-in/shop/list-my-orders.tool.d.ts +100 -0
- package/lib/tools/built-in/shop/list-my-orders.tool.js +63 -0
- package/lib/tools/built-in/shop/list-my-orders.tool.js.map +1 -0
- package/lib/tools/built-in/shop/place-order.tool.d.ts +188 -0
- package/lib/tools/built-in/shop/place-order.tool.js +152 -0
- package/lib/tools/built-in/shop/place-order.tool.js.map +1 -0
- package/lib/tools/built-in/shop/product-search-query.d.ts +4 -0
- package/lib/tools/built-in/shop/product-search-query.js +34 -0
- package/lib/tools/built-in/shop/product-search-query.js.map +1 -0
- package/lib/tools/built-in/shop/remove-coupon-code.tool.d.ts +17 -0
- package/lib/tools/built-in/shop/remove-coupon-code.tool.js +63 -0
- package/lib/tools/built-in/shop/remove-coupon-code.tool.js.map +1 -0
- package/lib/tools/built-in/shop/remove-from-cart.tool.d.ts +17 -0
- package/lib/tools/built-in/shop/remove-from-cart.tool.js +58 -0
- package/lib/tools/built-in/shop/remove-from-cart.tool.js.map +1 -0
- package/lib/tools/built-in/shop/search-products.tool.d.ts +48 -0
- package/lib/tools/built-in/shop/search-products.tool.js +95 -0
- package/lib/tools/built-in/shop/search-products.tool.js.map +1 -0
- package/lib/tools/built-in/shop/set-checkout-details.tool.d.ts +56 -0
- package/lib/tools/built-in/shop/set-checkout-details.tool.js +187 -0
- package/lib/tools/built-in/shop/set-checkout-details.tool.js.map +1 -0
- package/lib/tools/built-in/shop/set-shipping-method.tool.d.ts +17 -0
- package/lib/tools/built-in/shop/set-shipping-method.tool.js +58 -0
- package/lib/tools/built-in/shop/set-shipping-method.tool.js.map +1 -0
- package/lib/tools/built-in/shop/update-cart-line.tool.d.ts +18 -0
- package/lib/tools/built-in/shop/update-cart-line.tool.js +60 -0
- package/lib/tools/built-in/shop/update-cart-line.tool.js.map +1 -0
- package/lib/tools/built-in/string-schemas.d.ts +4 -0
- package/lib/tools/built-in/string-schemas.js +13 -0
- package/lib/tools/built-in/string-schemas.js.map +1 -0
- package/lib/transport/mcp-server.factory.d.ts +13 -0
- package/lib/transport/mcp-server.factory.js +32 -0
- package/lib/transport/mcp-server.factory.js.map +1 -0
- package/lib/transport/mcp-transport.controller.d.ts +77 -0
- package/lib/transport/mcp-transport.controller.js +442 -0
- package/lib/transport/mcp-transport.controller.js.map +1 -0
- package/lib/types.d.ts +432 -0
- package/lib/types.js +3 -0
- package/lib/types.js.map +1 -0
- package/package.json +42 -0
- package/src/dashboard/components/activity-block.tsx +72 -0
- package/src/dashboard/components/actor-cell.tsx +31 -0
- package/src/dashboard/components/connection-dialog.tsx +106 -0
- package/src/dashboard/components/empty-cell.tsx +7 -0
- package/src/dashboard/components/grants-block.tsx +218 -0
- package/src/dashboard/components/stats-block.tsx +275 -0
- package/src/dashboard/components/tools-block.tsx +274 -0
- package/src/dashboard/components/tooltip-button.tsx +28 -0
- package/src/dashboard/components/use-mcp-table-state.ts +47 -0
- package/src/dashboard/i18n/ar.po +311 -0
- package/src/dashboard/i18n/bg.po +311 -0
- package/src/dashboard/i18n/cs.po +311 -0
- package/src/dashboard/i18n/de.po +311 -0
- package/src/dashboard/i18n/en.po +311 -0
- package/src/dashboard/i18n/es.po +311 -0
- package/src/dashboard/i18n/fa.po +311 -0
- package/src/dashboard/i18n/fr.po +311 -0
- package/src/dashboard/i18n/he.po +311 -0
- package/src/dashboard/i18n/hr.po +311 -0
- package/src/dashboard/i18n/hu.po +311 -0
- package/src/dashboard/i18n/it.po +311 -0
- package/src/dashboard/i18n/ja.po +311 -0
- package/src/dashboard/i18n/ko.po +311 -0
- package/src/dashboard/i18n/nb.po +311 -0
- package/src/dashboard/i18n/ne.po +311 -0
- package/src/dashboard/i18n/nl.po +311 -0
- package/src/dashboard/i18n/pl.po +311 -0
- package/src/dashboard/i18n/pt_BR.po +311 -0
- package/src/dashboard/i18n/pt_PT.po +311 -0
- package/src/dashboard/i18n/ro.po +311 -0
- package/src/dashboard/i18n/ru.po +311 -0
- package/src/dashboard/i18n/sv.po +311 -0
- package/src/dashboard/i18n/tr.po +311 -0
- package/src/dashboard/i18n/uk.po +311 -0
- package/src/dashboard/i18n/uz.po +311 -0
- package/src/dashboard/i18n/zh_Hans.po +311 -0
- package/src/dashboard/i18n/zh_Hant.po +311 -0
- package/src/dashboard/index.tsx +30 -0
- package/src/dashboard/mcp-activity-route.tsx +38 -0
- package/src/dashboard/mcp-authorize-route.tsx +369 -0
- package/src/dashboard/mcp-grants-route.tsx +38 -0
- package/src/dashboard/mcp-overview-route.tsx +46 -0
- package/src/dashboard/mcp-server-redirect-route.tsx +15 -0
- package/src/dashboard/mcp-tools-route.tsx +38 -0
- package/src/dashboard/mcp.graphql.ts +127 -0
- package/src/dashboard/published-files.spec.ts +54 -0
- package/src/dashboard/tsconfig.json +9 -0
- package/src/shared/endpoint-paths.ts +8 -0
- package/src/shared/loopback.ts +6 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-transport.controller.js","sourceRoot":"","sources":["../../src/transport/mcp-transport.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qDAKoC;AACpC,yDAA6F;AAC7F,2CAcwB;AACxB,wCAQuB;AAIvB,4CAAoF;AACpF,oDAA+C;AAC/C,4DAAgE;AAEhE,sDAAkE;AAClE,4EAA0E;AAC1E,0DAAyD;AACzD,qFAAqG;AACrG,qFAA+E;AAC/E,uFAAiF;AAEjF,6DAAiE;AAEjE,sFAAsF;AACtF,MAAM,iBAAiB,GAAG,WAAW,CAAC;AAgBtC,sHAAsH;AAE/G,IAAM,8BAA8B,GAApC,MAAM,8BAA+B,SAAQ,4BAAqB;IAGrE,YAAY,aAA4B;QACpC,KAAK,CAAC,aAAa,CAAC,CAAC;QACrB,IAAI,CAAC,kBAAkB,GAAG,aAAa,CAAC,UAAU,CAAC,eAAe,CAAC;IACvE,CAAC;IAED,KAAK,CAAC,SAA+B,EAAE,IAAmB;QACtD,OAAO,KAAK,CAAC,KAAK,CACd,IAAI,4BAAmB,CACnB,OAAO,IAAI,CAAC,kBAAkB,0EAA0E,CAC3G,EACD,IAAI,CACP,CAAC;IACN,CAAC;CACJ,CAAA;AAhBY,wEAA8B;yCAA9B,8BAA8B;IAD1C,IAAA,cAAK,EAAC,2BAAoB,CAAC;qCAIG,oBAAa;GAH/B,8BAA8B,CAgB1C;AAED;;;;;;;GAOG;AAGI,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAK/B,YACqB,YAA6B,EAC7B,QAAgC,EAChC,WAAkC,EAClC,aAA4B,EACA,OAAiC,EAC7D,WAAkC,EAClC,cAA8B,EAC9B,aAAs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KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IACnD,CAAC;CACJ,CAAA;AArcY,wDAAsB;AAkDzB;IADL,IAAA,aAAI,EAAC,MAAM,CAAC;IACG,WAAA,IAAA,YAAG,GAAE,CAAA;IAAoB,WAAA,IAAA,YAAG,GAAE,CAAA;IAAiB,WAAA,IAAA,aAAI,GAAE,CAAA;;;;sDAGpE;AAGK;IADL,IAAA,aAAI,EAAC,OAAO,CAAC;IACG,WAAA,IAAA,YAAG,GAAE,CAAA;IAAoB,WAAA,IAAA,YAAG,GAAE,CAAA;IAAiB,WAAA,IAAA,aAAI,GAAE,CAAA;;;;uDAErE;AAGD;IADC,IAAA,YAAG,EAAC,MAAM,CAAC;IACH,WAAA,IAAA,YAAG,GAAE,CAAA;;;;qDAGb;AAGD;IADC,IAAA,YAAG,EAAC,OAAO,CAAC;IACH,WAAA,IAAA,YAAG,GAAE,CAAA;;;;sDAEd;iCArEQ,sBAAsB;IAFlC,IAAA,mBAAU,EAAC,8BAA8B,CAAC;IAC1C,IAAA,mBAAU,EAAC,KAAK,CAAC;IAWT,WAAA,IAAA,eAAM,EAAC,8BAAkB,CAAC,CAAA;qCAJI,+BAAe;QACnB,kDAAsB;QACnB,gDAAqB;QACnB,oBAAa,UAEf,gDAAqB;QAClB,qBAAc;QACf,gDAAuB;GAblD,sBAAsB,CAqclC"}
|
package/lib/types.d.ts
ADDED
|
@@ -0,0 +1,432 @@
|
|
|
1
|
+
import type { ToolAnnotations } from '@modelcontextprotocol/server';
|
|
2
|
+
import { type ScheduledTaskConfig } from '@vendure/core';
|
|
3
|
+
import { McpJsonSchema, McpToolBehavior, McpToolset } from '@vendure/mcp-sdk';
|
|
4
|
+
/**
|
|
5
|
+
* @description
|
|
6
|
+
* Controls which tools are returned by the MCP `tools/list` call.
|
|
7
|
+
*
|
|
8
|
+
* - `discovery` exposes a small, stable set of meta-tools (`search_tools` and
|
|
9
|
+
* `execute_tool`) that let an agent search for registered Vendure tools
|
|
10
|
+
* (results ranked by keyword relevance) and execute them by name.
|
|
11
|
+
* - `direct` exposes every callable Vendure tool directly to the agent.
|
|
12
|
+
*
|
|
13
|
+
* @docsCategory core plugins/McpPlugin
|
|
14
|
+
* @since 3.8.0
|
|
15
|
+
*/
|
|
16
|
+
export type McpToolExposureMode = 'direct' | 'discovery';
|
|
17
|
+
/**
|
|
18
|
+
* @description
|
|
19
|
+
* OAuth-related options for {@link McpPlugin}.
|
|
20
|
+
*
|
|
21
|
+
* @docsCategory core plugins/McpPlugin
|
|
22
|
+
* @since 3.8.0
|
|
23
|
+
*/
|
|
24
|
+
export interface McpOauthOptions {
|
|
25
|
+
/**
|
|
26
|
+
* @description
|
|
27
|
+
* Server secret used to HMAC-hash OAuth tokens at rest. Required to enable OAuth. Supply it via
|
|
28
|
+
* an environment variable, generated once with `openssl rand -base64 32`.
|
|
29
|
+
*
|
|
30
|
+
* Rotating this secret invalidates all active OAuth tokens, forcing clients to re-authorize.
|
|
31
|
+
* The Vendure sessions behind existing grants become unreachable; the retention task deletes
|
|
32
|
+
* them once their grants expire.
|
|
33
|
+
*/
|
|
34
|
+
tokenSecret: string;
|
|
35
|
+
/**
|
|
36
|
+
* @description
|
|
37
|
+
* The public origin of this Vendure server, such as `https://shop.example.com`. OAuth clients
|
|
38
|
+
* read this server's login and token endpoints from `/.well-known/...` directly under it, so
|
|
39
|
+
* it must be a scheme and host with no path. The server refuses to start otherwise. If a
|
|
40
|
+
* proxy serves Vendure under a path, use a subdomain or forward `/.well-known/*` to Vendure.
|
|
41
|
+
*
|
|
42
|
+
* @default 'http://localhost:<apiOptions.port>'
|
|
43
|
+
*/
|
|
44
|
+
issuer?: string;
|
|
45
|
+
/**
|
|
46
|
+
* @default 900
|
|
47
|
+
*/
|
|
48
|
+
accessTokenTtlSeconds?: number;
|
|
49
|
+
/**
|
|
50
|
+
* @description
|
|
51
|
+
* Every refresh resets this clock, so what it really sets is how long a client may go
|
|
52
|
+
* quiet before its grant dies and the cleanup job deletes the Vendure session behind it.
|
|
53
|
+
*
|
|
54
|
+
* @default 2592000
|
|
55
|
+
*/
|
|
56
|
+
refreshTokenTtlSeconds?: number;
|
|
57
|
+
/**
|
|
58
|
+
* @default 60
|
|
59
|
+
*/
|
|
60
|
+
authorizationCodeTtlSeconds?: number;
|
|
61
|
+
/**
|
|
62
|
+
* @description
|
|
63
|
+
* Lifetime of a pending authorization request (consent window), in seconds.
|
|
64
|
+
*
|
|
65
|
+
* @default 600
|
|
66
|
+
*/
|
|
67
|
+
authorizationRequestTtlSeconds?: number;
|
|
68
|
+
/**
|
|
69
|
+
* @description
|
|
70
|
+
* Path (relative to `issuer`) of the admin consent page that approves
|
|
71
|
+
* admin-scoped authorization requests. Must start with a single `/`. The Vendure
|
|
72
|
+
* server serves this page itself, so a full URL here is refused at startup.
|
|
73
|
+
*
|
|
74
|
+
* @default '/dashboard/mcp/authorize'
|
|
75
|
+
*/
|
|
76
|
+
adminConsentPath?: string;
|
|
77
|
+
/**
|
|
78
|
+
* @description
|
|
79
|
+
* Absolute URL of the storefront consent page that approves customer-scoped
|
|
80
|
+
* authorization requests. Required only if you want customers to authorize MCP
|
|
81
|
+
* clients; a deployment that uses the admin toolset alone does not need it.
|
|
82
|
+
*/
|
|
83
|
+
storefrontConsentUrl?: string;
|
|
84
|
+
/**
|
|
85
|
+
* @description
|
|
86
|
+
* Allows a client to identify itself with a `client_id` URL that points at the local machine
|
|
87
|
+
* (`localhost`, `127.0.0.1` or `::1`) over plain HTTP, so a metadata document served by your
|
|
88
|
+
* own development setup can be fetched.
|
|
89
|
+
*
|
|
90
|
+
* Leave this off anywhere reachable by others: with it on, anyone who can reach the authorize
|
|
91
|
+
* endpoint can make the server open a connection, with no credentials, to any port on the
|
|
92
|
+
* machine it runs on. The server refuses to start with this enabled when `NODE_ENV` is
|
|
93
|
+
* `production`.
|
|
94
|
+
*
|
|
95
|
+
* @default false
|
|
96
|
+
*/
|
|
97
|
+
allowLoopbackCimdDocuments?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* @description
|
|
100
|
+
* How long a dead grant, expired or revoked, is kept before the row is deleted. It is the
|
|
101
|
+
* only OAuth record worth auditing, so it outlives the rest.
|
|
102
|
+
*
|
|
103
|
+
* Deleting a grant also clears the link from every tool-call log that points at it. Set this
|
|
104
|
+
* at or above {@link McpLoggingOptions.ttlDays} if your logs should keep that link.
|
|
105
|
+
*
|
|
106
|
+
* Must be non-negative. Set to `0` to retain dead grants forever.
|
|
107
|
+
*
|
|
108
|
+
* @default 30 (days)
|
|
109
|
+
*/
|
|
110
|
+
grantRetentionDays?: number;
|
|
111
|
+
/**
|
|
112
|
+
* @description
|
|
113
|
+
* When the cleanup job runs. It clears out expired authorization requests and codes, grants
|
|
114
|
+
* dead for longer than `grantRetentionDays`, and the Vendure session behind each expired
|
|
115
|
+
* grant. That grant keeps working against the ordinary GraphQL APIs until then, so running
|
|
116
|
+
* the job less often widens that gap. Revoking a grant kills its session at once.
|
|
117
|
+
*
|
|
118
|
+
* @default cron => cron.everyDayAt(3, 30)
|
|
119
|
+
*/
|
|
120
|
+
retentionSchedule?: McpRetentionSchedule;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* @description
|
|
124
|
+
* Per-scope request-rate limits for MCP calls, expressed in requests per minute (`rpm`). A value
|
|
125
|
+
* of `0` means unlimited. Every limit except `oauthIp` is counted separately for the admin and
|
|
126
|
+
* shop endpoints. An over-limit request is refused with HTTP `429` and a `Retry-After` header,
|
|
127
|
+
* except an over-limit tool call inside an open session, which returns an `isError` tool result
|
|
128
|
+
* instead.
|
|
129
|
+
*
|
|
130
|
+
* @docsCategory core plugins/McpPlugin
|
|
131
|
+
* @since 3.8.0
|
|
132
|
+
*/
|
|
133
|
+
export interface McpRateLimitOptions {
|
|
134
|
+
/**
|
|
135
|
+
* @description
|
|
136
|
+
* Requests per minute allowed per MCP session. A signed-in caller is counted by their
|
|
137
|
+
* Vendure session. An anonymous `/mcp/shop` caller is counted by client IP instead.
|
|
138
|
+
*
|
|
139
|
+
* @default { rpm: 60 }
|
|
140
|
+
*/
|
|
141
|
+
perSession?: {
|
|
142
|
+
rpm: number;
|
|
143
|
+
};
|
|
144
|
+
/**
|
|
145
|
+
* @description
|
|
146
|
+
* Requests per minute allowed per signed-in user, counted across every session and OAuth
|
|
147
|
+
* client acting for that user. Authorizing again can start a new session and client record,
|
|
148
|
+
* but the user bucket keeps counting through both, since the user's id does not change.
|
|
149
|
+
* Anonymous callers have no user, so `anonymousIp` covers them instead.
|
|
150
|
+
*
|
|
151
|
+
* @default { rpm: 120 }
|
|
152
|
+
*/
|
|
153
|
+
perUser?: {
|
|
154
|
+
rpm: number;
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* @description
|
|
158
|
+
* Requests per minute allowed per registered OAuth client, counted across every user of that
|
|
159
|
+
* client. One client record can serve all of a store's shoppers, so the default is sized for a
|
|
160
|
+
* whole application's traffic. `perUser` limits an individual instead. A client identified by
|
|
161
|
+
* a metadata document URL (CIMD) gets one record per URL. Requests with no OAuth grant, such as
|
|
162
|
+
* in-process or anonymous calls, have no client bucket.
|
|
163
|
+
*
|
|
164
|
+
* @default { rpm: 3000 }
|
|
165
|
+
*/
|
|
166
|
+
perClient?: {
|
|
167
|
+
rpm: number;
|
|
168
|
+
};
|
|
169
|
+
/**
|
|
170
|
+
* @description
|
|
171
|
+
* Requests per minute allowed per tool, keyed by tool name. `0` means unlimited. Each caller
|
|
172
|
+
* has its own bucket per tool: an OAuth caller is counted by client plus session, an anonymous
|
|
173
|
+
* caller by client IP. A new authorization creates a new session, so its per-tool counters
|
|
174
|
+
* start fresh. `oauthIp` bounds how often one address can re-authorize, while `perUser` keeps
|
|
175
|
+
* counting across authorizations.
|
|
176
|
+
*
|
|
177
|
+
* @default { place_order: { rpm: 5 }, create_product: { rpm: 10 }, refund_order: { rpm: 5 }, cancel_order: { rpm: 5 } }
|
|
178
|
+
*/
|
|
179
|
+
perTool?: Record<string, {
|
|
180
|
+
rpm: number;
|
|
181
|
+
}>;
|
|
182
|
+
/**
|
|
183
|
+
* @description
|
|
184
|
+
* Requests per minute allowed per client IP for anonymous `/mcp/shop` calls. `false`
|
|
185
|
+
* disables the limit. Behind a reverse proxy, enable Vendure's `trustProxy` so
|
|
186
|
+
* `req.ip` reports the client address rather than the proxy's.
|
|
187
|
+
*
|
|
188
|
+
* @default { rpm: 60 }
|
|
189
|
+
*/
|
|
190
|
+
anonymousIp?: {
|
|
191
|
+
rpm: number;
|
|
192
|
+
} | false;
|
|
193
|
+
/**
|
|
194
|
+
* @description
|
|
195
|
+
* Requests per minute allowed per client IP across the whole OAuth HTTP surface. Every route
|
|
196
|
+
* on the OAuth controller shares this one bucket, including the `.well-known` metadata
|
|
197
|
+
* documents. The same limit also caps failed bearer-token authentications on the MCP
|
|
198
|
+
* endpoints, in a separate per-IP bucket, so an address over its limit is refused before its
|
|
199
|
+
* token costs a database lookup. `false` disables the limit. Behind a reverse proxy, enable
|
|
200
|
+
* Vendure's `trustProxy` so `req.ip` reports the client address rather than the proxy's.
|
|
201
|
+
*
|
|
202
|
+
* @default { rpm: 60 }
|
|
203
|
+
*/
|
|
204
|
+
oauthIp?: {
|
|
205
|
+
rpm: number;
|
|
206
|
+
} | false;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* @description
|
|
210
|
+
* Protects the MCP transport against DNS rebinding. Both options take bare hostnames, never
|
|
211
|
+
* full URLs or header values. Omitting an option, or giving it an empty array, applies no
|
|
212
|
+
* check at all.
|
|
213
|
+
*
|
|
214
|
+
* @docsCategory core plugins/McpPlugin
|
|
215
|
+
* @since 3.8.0
|
|
216
|
+
*/
|
|
217
|
+
export interface McpDnsRebindingOptions {
|
|
218
|
+
/**
|
|
219
|
+
* @description
|
|
220
|
+
* Hostnames the `Host` header of an MCP request may name. Drop the port, and bracket an
|
|
221
|
+
* IPv6 address, for example `[::1]`. A request naming any other host is refused with HTTP
|
|
222
|
+
* `403` before the MCP handler runs.
|
|
223
|
+
*/
|
|
224
|
+
allowedHosts?: string[];
|
|
225
|
+
/**
|
|
226
|
+
* @description
|
|
227
|
+
* Hostnames the `Origin` header of an MCP request may name. Drop the scheme and the port, and
|
|
228
|
+
* bracket an IPv6 address, for example `[::1]`. A request naming any other origin is refused
|
|
229
|
+
* with HTTP `403` before the MCP handler runs.
|
|
230
|
+
*
|
|
231
|
+
* A request with no `Origin` header passes, since non-browser MCP clients don't send one, so
|
|
232
|
+
* this option constrains browsers only, not every caller.
|
|
233
|
+
*/
|
|
234
|
+
allowedOrigins?: string[];
|
|
235
|
+
}
|
|
236
|
+
export type McpRetentionSchedule = ScheduledTaskConfig['schedule'];
|
|
237
|
+
/** How much of each MCP tool call {@link McpLoggingOptions.capture} persists. */
|
|
238
|
+
export type McpLogCapture = 'metadata' | 'full';
|
|
239
|
+
/**
|
|
240
|
+
* @description
|
|
241
|
+
* Operator-supplied redaction for {@link McpLoggingOptions.redact}.
|
|
242
|
+
*
|
|
243
|
+
* @docsCategory core plugins/McpPlugin
|
|
244
|
+
* @since 3.8.0
|
|
245
|
+
*/
|
|
246
|
+
export type McpLogRedactFn = (entry: {
|
|
247
|
+
toolName: string;
|
|
248
|
+
input: unknown;
|
|
249
|
+
output: unknown;
|
|
250
|
+
}) => {
|
|
251
|
+
input: unknown;
|
|
252
|
+
output: unknown;
|
|
253
|
+
};
|
|
254
|
+
/**
|
|
255
|
+
* @description
|
|
256
|
+
* Controls how MCP tool calls are logged and retained. Every call that runs a tool is recorded as
|
|
257
|
+
* an {@link McpToolCallLog} row and published as an `McpToolCallEvent`. Calls refused before the
|
|
258
|
+
* tool runs, such as an unknown or switched-off tool, invalid arguments, a missing permission, or
|
|
259
|
+
* a rate limit, leave no row and no event. So does the confirmation preview of a destructive tool.
|
|
260
|
+
*
|
|
261
|
+
* @docsCategory core plugins/McpPlugin
|
|
262
|
+
* @since 3.8.0
|
|
263
|
+
*/
|
|
264
|
+
export interface McpLoggingOptions {
|
|
265
|
+
/**
|
|
266
|
+
* @description
|
|
267
|
+
* How many days to retain tool-call logs. Must be non-negative. Set to `0` to retain all logs.
|
|
268
|
+
*
|
|
269
|
+
* @default 30 (days)
|
|
270
|
+
*/
|
|
271
|
+
ttlDays?: number;
|
|
272
|
+
/**
|
|
273
|
+
* @description
|
|
274
|
+
* How much of each tool call is stored on its log row. `metadata` stores the tool name, the
|
|
275
|
+
* actor, the status, the duration and the related IDs. `full` also stores the call's `input`
|
|
276
|
+
* and `output`, which may hold personal data. Supply `redact` to sanitize those, and see
|
|
277
|
+
* `maxBodyBytes` for the size cap applied to each.
|
|
278
|
+
*
|
|
279
|
+
* @default 'metadata'
|
|
280
|
+
*/
|
|
281
|
+
capture?: McpLogCapture;
|
|
282
|
+
/**
|
|
283
|
+
* @description
|
|
284
|
+
* Function that rewrites a call's `input` and `output` before they are stored. Runs only
|
|
285
|
+
* when `capture` is `'full'`. If it throws, the call is still recorded, both bodies are
|
|
286
|
+
* stored as `null`, and a warning is logged.
|
|
287
|
+
*
|
|
288
|
+
* @example
|
|
289
|
+
* ```ts
|
|
290
|
+
* redact: ({ input, output }) => ({
|
|
291
|
+
* input,
|
|
292
|
+
* output: { ...output, customer: undefined }
|
|
293
|
+
* })
|
|
294
|
+
* ```
|
|
295
|
+
*/
|
|
296
|
+
redact?: McpLogRedactFn;
|
|
297
|
+
/**
|
|
298
|
+
* @description
|
|
299
|
+
* The largest `input` or `output` body stored on a log row, in bytes, measured after redaction
|
|
300
|
+
* and JSON serialization. Applies only when `capture` is `'full'`. A larger body is replaced
|
|
301
|
+
* with a marker recording the reason and the real size, so the audit row is still written. The
|
|
302
|
+
* default fits within the 65,535-byte limit of a MySQL `TEXT` column.
|
|
303
|
+
*
|
|
304
|
+
* @default 64000
|
|
305
|
+
*/
|
|
306
|
+
maxBodyBytes?: number;
|
|
307
|
+
/**
|
|
308
|
+
* @description
|
|
309
|
+
* Schedule for the cleanup job that deletes expired tool-call logs. Accepts a cron
|
|
310
|
+
* expression string, or a function that builds one.
|
|
311
|
+
*
|
|
312
|
+
* @default cron => cron.everyDayAt(2, 30)
|
|
313
|
+
*/
|
|
314
|
+
retentionSchedule?: McpRetentionSchedule;
|
|
315
|
+
/**
|
|
316
|
+
* @description
|
|
317
|
+
* Whether each tool-call log row stores the caller's IP address. Off by default because an
|
|
318
|
+
* IP address is personal data. Behind a reverse proxy, enable Vendure's `trustProxy` so the
|
|
319
|
+
* stored address is the caller's rather than the proxy's.
|
|
320
|
+
*
|
|
321
|
+
* @default false
|
|
322
|
+
*/
|
|
323
|
+
captureClientIp?: boolean;
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* @description
|
|
327
|
+
* Options passed to {@link McpPlugin.init}.
|
|
328
|
+
*
|
|
329
|
+
* @docsCategory core plugins/McpPlugin
|
|
330
|
+
* @since 3.8.0
|
|
331
|
+
*/
|
|
332
|
+
export interface McpPluginOptions {
|
|
333
|
+
/**
|
|
334
|
+
* @description
|
|
335
|
+
* Which tools the MCP `tools/list` call returns. See {@link McpToolExposureMode} for the
|
|
336
|
+
* available modes. In-process listing through {@link McpToolExecutionService} always lists
|
|
337
|
+
* the real tools and ignores this.
|
|
338
|
+
*
|
|
339
|
+
* @default 'direct'
|
|
340
|
+
*/
|
|
341
|
+
toolExposure?: McpToolExposureMode;
|
|
342
|
+
/**
|
|
343
|
+
* @description
|
|
344
|
+
* Controls HTTP access to the `/mcp/shop` endpoint and the shop toolset.
|
|
345
|
+
*
|
|
346
|
+
* - `'anonymous'` (default): the endpoint accepts anonymous callers as well as
|
|
347
|
+
* OAuth-authenticated customers.
|
|
348
|
+
* - `'authenticated'`: the endpoint requires an OAuth Bearer token. Token-less
|
|
349
|
+
* requests receive a 401 with the standard auth challenge.
|
|
350
|
+
* - `'disabled'`: the endpoint responds 404 and customer OAuth authorization
|
|
351
|
+
* requests are refused.
|
|
352
|
+
*
|
|
353
|
+
* In-process tool execution via {@link McpToolExecutionService} is not affected.
|
|
354
|
+
*
|
|
355
|
+
* @default 'anonymous'
|
|
356
|
+
*/
|
|
357
|
+
shopAccess?: 'disabled' | 'authenticated' | 'anonymous';
|
|
358
|
+
/**
|
|
359
|
+
* @description
|
|
360
|
+
* Leave this out and the anonymous shop endpoint still works, but anything needing a token
|
|
361
|
+
* fails with `400 MCP OAuth is not configured`. That covers the admin endpoint, the
|
|
362
|
+
* authenticated shop endpoint, and the OAuth endpoints themselves.
|
|
363
|
+
*/
|
|
364
|
+
oauth?: McpOauthOptions;
|
|
365
|
+
rateLimits?: McpRateLimitOptions;
|
|
366
|
+
dnsRebinding?: McpDnsRebindingOptions;
|
|
367
|
+
logging?: McpLoggingOptions;
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* @description
|
|
371
|
+
* A tool as described to a caller, carrying everything a model needs to decide whether to call it.
|
|
372
|
+
* Returned by {@link McpToolExecutionService.listTools} and by the `search_tools` discovery meta-tool.
|
|
373
|
+
*
|
|
374
|
+
* @docsCategory core plugins/McpPlugin
|
|
375
|
+
* @since 3.8.0
|
|
376
|
+
*/
|
|
377
|
+
export interface McpToolSummary {
|
|
378
|
+
/**
|
|
379
|
+
* @description
|
|
380
|
+
* The tool's unique snake_case name within its toolset, e.g. `search_products`.
|
|
381
|
+
*/
|
|
382
|
+
name: string;
|
|
383
|
+
/**
|
|
384
|
+
* @description
|
|
385
|
+
* Human-readable title declared by the tool. The same value is copied onto
|
|
386
|
+
* `annotations.title`.
|
|
387
|
+
*/
|
|
388
|
+
title?: string;
|
|
389
|
+
/**
|
|
390
|
+
* @description
|
|
391
|
+
* What the tool does, written for an AI agent to read.
|
|
392
|
+
*/
|
|
393
|
+
description: string;
|
|
394
|
+
/**
|
|
395
|
+
* @description
|
|
396
|
+
* Which Vendure API the tool works over: `shop` for the Shop API, `admin` for the Admin API.
|
|
397
|
+
*/
|
|
398
|
+
toolset: McpToolset;
|
|
399
|
+
/**
|
|
400
|
+
* @description
|
|
401
|
+
* What the tool does to data: `readonly` only reads it, `mutating` changes it, and
|
|
402
|
+
* `destructive` changes it and needs a confirmation round-trip before running.
|
|
403
|
+
*/
|
|
404
|
+
behavior: McpToolBehavior;
|
|
405
|
+
/**
|
|
406
|
+
* @description
|
|
407
|
+
* MCP annotations derived from `behavior`. `readOnlyHint` and `idempotentHint` are true for
|
|
408
|
+
* a `readonly` tool. `destructiveHint` is true for a `destructive` tool.
|
|
409
|
+
*/
|
|
410
|
+
annotations: ToolAnnotations;
|
|
411
|
+
/**
|
|
412
|
+
* @description
|
|
413
|
+
* The input schema a call must satisfy: the tool's declared schema plus, for a destructive
|
|
414
|
+
* tool, the optional `confirm` field the registry injects.
|
|
415
|
+
*/
|
|
416
|
+
inputSchema: McpJsonSchema;
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* The kind of Vendure user who gave consent, recorded on an MCP OAuth grant and on the
|
|
420
|
+
* authorization code it came from. Consent always requires someone signed in, so there is
|
|
421
|
+
* no anonymous case here.
|
|
422
|
+
*/
|
|
423
|
+
export type McpGrantUserType = 'customer' | 'admin';
|
|
424
|
+
/**
|
|
425
|
+
* Who a logged MCP tool call ran as. `'anonymous'` covers calls to the shop endpoint with
|
|
426
|
+
* nobody signed in.
|
|
427
|
+
*/
|
|
428
|
+
export type McpActorType = McpGrantUserType | 'anonymous';
|
|
429
|
+
/**
|
|
430
|
+
* Terminal outcome of a single MCP tool call recorded in {@link McpToolCallLog}.
|
|
431
|
+
*/
|
|
432
|
+
export type McpToolCallStatus = 'success' | 'error';
|
package/lib/types.js
ADDED
package/lib/types.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vendure/mcp-plugin",
|
|
3
|
+
"version": "3.8.0-minor-bootstrap.0",
|
|
4
|
+
"license": "GPL-3.0-or-later",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"types": "lib/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"lib/**/*",
|
|
9
|
+
"src/dashboard/**/*",
|
|
10
|
+
"src/shared/**/*"
|
|
11
|
+
],
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/vendurehq/vendure"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"watch": "tsc -p ./tsconfig.build.json --watch",
|
|
18
|
+
"build": "rimraf lib && tsc -p ./tsconfig.build.json",
|
|
19
|
+
"codegen:dashboard": "ts-node codegen/generate-schema-types.ts",
|
|
20
|
+
"lint": "eslint --fix .",
|
|
21
|
+
"test": "vitest --config vitest.config.mts --run",
|
|
22
|
+
"e2e": "cross-env PACKAGE=mcp-plugin vitest --config ../../e2e-common/vitest.config.mts --run",
|
|
23
|
+
"e2e:watch": "cross-env PACKAGE=mcp-plugin vitest --config ../../e2e-common/vitest.config.mts"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://www.vendure.io/",
|
|
26
|
+
"funding": "https://github.com/sponsors/michaelbromley",
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public"
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@modelcontextprotocol/node": "2.0.0",
|
|
32
|
+
"@modelcontextprotocol/server": "2.0.0",
|
|
33
|
+
"@vendure/mcp-sdk": "^3.8.0-minor-bootstrap.0",
|
|
34
|
+
"zod": "^4.2.0"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@modelcontextprotocol/client": "2.0.0",
|
|
38
|
+
"@types/express": "^5.0.1",
|
|
39
|
+
"@vendure/common": "^3.8.0-minor-bootstrap.0",
|
|
40
|
+
"@vendure/core": "^3.8.0-minor-bootstrap.0"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Trans } from '@lingui/react/macro';
|
|
2
|
+
import { Badge, PaginatedListDataTable } from '@vendure/dashboard';
|
|
3
|
+
|
|
4
|
+
import { mcpToolCallLogsQuery } from '../mcp.graphql';
|
|
5
|
+
|
|
6
|
+
import { ActorCell } from './actor-cell';
|
|
7
|
+
import { EmptyCell } from './empty-cell';
|
|
8
|
+
import { useMcpTableState } from './use-mcp-table-state';
|
|
9
|
+
|
|
10
|
+
export function ActivityBlock() {
|
|
11
|
+
const tableState = useMcpTableState({
|
|
12
|
+
defaultSorting: [{ id: 'createdAt', desc: true }],
|
|
13
|
+
defaultVisibility: { id: false, pluginSource: false },
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<PaginatedListDataTable
|
|
18
|
+
listQuery={mcpToolCallLogsQuery}
|
|
19
|
+
{...tableState}
|
|
20
|
+
// No bulk actions on this panel, so no row-selection checkboxes.
|
|
21
|
+
includeSelectionColumn={false}
|
|
22
|
+
customizeColumns={{
|
|
23
|
+
createdAt: { header: () => <Trans>Time</Trans> },
|
|
24
|
+
toolName: {
|
|
25
|
+
header: () => <Trans>Tool</Trans>,
|
|
26
|
+
cell: ({ row }) => <span className="font-mono text-sm">{row.original.toolName}</span>,
|
|
27
|
+
},
|
|
28
|
+
actor: {
|
|
29
|
+
header: () => <Trans>Actor</Trans>,
|
|
30
|
+
meta: { dependencies: ['actorType', 'actorName', 'customerId'] },
|
|
31
|
+
cell: ({ row }) => (
|
|
32
|
+
<ActorCell
|
|
33
|
+
actorType={row.original.actorType}
|
|
34
|
+
actorName={row.original.actorName ?? null}
|
|
35
|
+
customerId={row.original.customerId ?? null}
|
|
36
|
+
/>
|
|
37
|
+
),
|
|
38
|
+
},
|
|
39
|
+
actorType: {
|
|
40
|
+
header: () => <Trans>Actor type</Trans>,
|
|
41
|
+
cell: ({ row }) => <Badge variant="outline">{row.original.actorType}</Badge>,
|
|
42
|
+
},
|
|
43
|
+
// Fetched only to feed the Actor cell; neither has a database column to sort or filter by.
|
|
44
|
+
actorName: { meta: { disabled: true } },
|
|
45
|
+
customerId: { meta: { disabled: true } },
|
|
46
|
+
status: {
|
|
47
|
+
header: () => <Trans>Status</Trans>,
|
|
48
|
+
cell: ({ row }) => (
|
|
49
|
+
<Badge variant={row.original.status === 'success' ? 'success' : 'destructive'}>
|
|
50
|
+
{row.original.status}
|
|
51
|
+
</Badge>
|
|
52
|
+
),
|
|
53
|
+
},
|
|
54
|
+
durationMs: {
|
|
55
|
+
header: () => <Trans>Duration</Trans>,
|
|
56
|
+
cell: ({ row }) =>
|
|
57
|
+
row.original.durationMs == null ? <EmptyCell /> : `${row.original.durationMs} ms`,
|
|
58
|
+
},
|
|
59
|
+
}}
|
|
60
|
+
// Columns not listed here still show up, just appended after these.
|
|
61
|
+
defaultColumnOrder={[
|
|
62
|
+
'createdAt',
|
|
63
|
+
'toolName',
|
|
64
|
+
'actor',
|
|
65
|
+
'actorType',
|
|
66
|
+
'status',
|
|
67
|
+
'durationMs',
|
|
68
|
+
'pluginSource',
|
|
69
|
+
]}
|
|
70
|
+
/>
|
|
71
|
+
);
|
|
72
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Trans } from '@lingui/react/macro';
|
|
2
|
+
import { DetailPageButton } from '@vendure/dashboard';
|
|
3
|
+
|
|
4
|
+
import { EmptyCell } from './empty-cell';
|
|
5
|
+
|
|
6
|
+
// Customers link to their customer page; administrators have no such page, so they show as plain text.
|
|
7
|
+
export function ActorCell({
|
|
8
|
+
actorType,
|
|
9
|
+
actorName,
|
|
10
|
+
customerId,
|
|
11
|
+
}: {
|
|
12
|
+
actorType: string | null;
|
|
13
|
+
actorName: string | null;
|
|
14
|
+
customerId: string | null;
|
|
15
|
+
}) {
|
|
16
|
+
if (actorType === 'anonymous') {
|
|
17
|
+
return (
|
|
18
|
+
<span className="text-sm text-muted-foreground">
|
|
19
|
+
<Trans>Anonymous</Trans>
|
|
20
|
+
</span>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
// A missing name means the account was deleted since, not that nobody was signed in.
|
|
24
|
+
if (!actorName) {
|
|
25
|
+
return <EmptyCell />;
|
|
26
|
+
}
|
|
27
|
+
if (customerId) {
|
|
28
|
+
return <DetailPageButton href={`/customers/${customerId}`} label={actorName} className="px-0" />;
|
|
29
|
+
}
|
|
30
|
+
return <span className="text-sm">{actorName}</span>;
|
|
31
|
+
}
|