naftiko: 1.0.0-alpha2 info: label: Fastly Client-Side Protection — Websites and Pages description: Manage protected websites and pages in Fastly Client-Side Protection (CSP) for defending against Magecart and formjacking. tags: [Fastly, Client-Side Protection, Security] created: '2026-05-22' modified: '2026-05-22' binds: - namespace: env keys: { FASTLY_API_KEY: FASTLY_API_KEY } capability: consumes: - type: http namespace: client-side-protection-websites baseUri: https://api.fastly.com description: CSP websites and pages CRUD. resources: - name: websites path: /client-side-protection/websites operations: - { name: listwebsites, method: GET, description: List websites, outputRawFormat: json, outputParameters: [ { name: result, type: object, value: $. } ] } - { name: createwebsite, method: POST, description: Create website, outputRawFormat: json, outputParameters: [ { name: result, type: object, value: $. } ] } - name: website path: /client-side-protection/websites/{website_id} operations: - { name: getwebsite, method: GET, description: Get website, outputRawFormat: json, outputParameters: [ { name: result, type: object, value: $. } ] } - { name: updatewebsite, method: PATCH, description: Update website, outputRawFormat: json, outputParameters: [ { name: result, type: object, value: $. } ] } - { name: deletewebsite, method: DELETE, description: Delete website, outputRawFormat: json, outputParameters: [ { name: result, type: object, value: $. } ] } - name: pages path: /client-side-protection/websites/{website_id}/pages operations: - { name: listpages, method: GET, description: List pages, outputRawFormat: json, outputParameters: [ { name: result, type: object, value: $. } ] } - { name: createpage, method: POST, description: Create page, outputRawFormat: json, outputParameters: [ { name: result, type: object, value: $. } ] } authentication: { type: apikey, key: Fastly-Key, value: '{{env.FASTLY_API_KEY}}', placement: header } exposes: - type: rest namespace: client-side-protection-websites-rest port: 8080 description: REST adapter. resources: - path: /v1/client-side-protection/websites name: websites description: CSP websites collection. operations: - { method: GET, name: listwebsites, description: List websites, call: client-side-protection-websites.listwebsites, outputParameters: [ { type: object, mapping: $. } ] } - { method: POST, name: createwebsite, description: Create website, call: client-side-protection-websites.createwebsite, outputParameters: [ { type: object, mapping: $. } ] } - path: /v1/client-side-protection/websites/{website-id} name: website description: Single CSP website. operations: - { method: GET, name: getwebsite, description: Get website, call: client-side-protection-websites.getwebsite, outputParameters: [ { type: object, mapping: $. } ] } - { method: PATCH, name: updatewebsite, description: Update website, call: client-side-protection-websites.updatewebsite, outputParameters: [ { type: object, mapping: $. } ] } - { method: DELETE, name: deletewebsite, description: Delete website, call: client-side-protection-websites.deletewebsite, outputParameters: [ { type: object, mapping: $. } ] } - path: /v1/client-side-protection/websites/{website-id}/pages name: pages description: CSP pages collection. operations: - { method: GET, name: listpages, description: List pages, call: client-side-protection-websites.listpages, outputParameters: [ { type: object, mapping: $. } ] } - { method: POST, name: createpage, description: Create page, call: client-side-protection-websites.createpage, outputParameters: [ { type: object, mapping: $. } ] } - type: mcp namespace: client-side-protection-websites-mcp port: 9090 transport: http description: MCP adapter. tools: - { name: list-csp-websites, description: List Fastly CSP websites, hints: { readOnly: true, destructive: false, idempotent: true }, call: client-side-protection-websites.listwebsites, outputParameters: [ { type: object, mapping: $. } ] } - { name: create-csp-website, description: Create a Fastly CSP website, hints: { readOnly: false, destructive: false, idempotent: false }, call: client-side-protection-websites.createwebsite, outputParameters: [ { type: object, mapping: $. } ] } - { name: get-csp-website, description: Get a Fastly CSP website, hints: { readOnly: true, destructive: false, idempotent: true }, call: client-side-protection-websites.getwebsite, outputParameters: [ { type: object, mapping: $. } ] } - { name: update-csp-website, description: Update a Fastly CSP website, hints: { readOnly: false, destructive: false, idempotent: true }, call: client-side-protection-websites.updatewebsite, outputParameters: [ { type: object, mapping: $. } ] } - { name: delete-csp-website, description: Delete a Fastly CSP website, hints: { readOnly: false, destructive: true, idempotent: true }, call: client-side-protection-websites.deletewebsite, outputParameters: [ { type: object, mapping: $. } ] } - { name: list-csp-pages, description: List Fastly CSP pages for a website, hints: { readOnly: true, destructive: false, idempotent: true }, call: client-side-protection-websites.listpages, outputParameters: [ { type: object, mapping: $. } ] } - { name: create-csp-page, description: Create a Fastly CSP page, hints: { readOnly: false, destructive: false, idempotent: false }, call: client-side-protection-websites.createpage, outputParameters: [ { type: object, mapping: $. } ] }