Cloudflare · Capability

Cloudflare KV API — Key-Value Pairs

Cloudflare KV API — Key-Value Pairs. 3 operations. Lead operation: Cloudflare Read Key-value Pair. Self-contained Naftiko capability covering one Cloudflare business surface.

Run with Naftiko CloudflareKey-Value Pairs

What You Can Do

GET
Readkvvalue — Cloudflare Read Key-value Pair
/v1/accounts/{account-id}/storage/kv/namespaces/{namespace-id}/values/{key-name}
PUT
Writekvvalue — Cloudflare Write Key-value Pair
/v1/accounts/{account-id}/storage/kv/namespaces/{namespace-id}/values/{key-name}
DELETE
Deletekvvalue — Cloudflare Delete Key-value Pair
/v1/accounts/{account-id}/storage/kv/namespaces/{namespace-id}/values/{key-name}

MCP Tools

cloudflare-read-key-value-pair

Cloudflare Read Key-value Pair

read-only idempotent
cloudflare-write-key-value-pair

Cloudflare Write Key-value Pair

idempotent
cloudflare-delete-key-value-pair

Cloudflare Delete Key-value Pair

idempotent

Capability Spec

kv-key-value-pairs.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Cloudflare KV API — Key-Value Pairs
  description: 'Cloudflare KV API — Key-Value Pairs. 3 operations. Lead operation: Cloudflare Read Key-value Pair. Self-contained
    Naftiko capability covering one Cloudflare business surface.'
  tags:
  - Cloudflare
  - Key-Value Pairs
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    CLOUDFLARE_API_KEY: CLOUDFLARE_API_KEY
capability:
  consumes:
  - type: http
    namespace: kv-key-value-pairs
    baseUri: https://api.cloudflare.com/client/v4
    description: Cloudflare KV API — Key-Value Pairs business capability. Self-contained, no shared references.
    resources:
    - name: accounts-account_id-storage-kv-namespaces-namespace_id-values-key_name
      path: /accounts/{account_id}/storage/kv/namespaces/{namespace_id}/values/{key_name}
      operations:
      - name: readkvvalue
        method: GET
        description: Cloudflare Read Key-value Pair
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: writekvvalue
        method: PUT
        description: Cloudflare Write Key-value Pair
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: expiration
          in: query
          type: integer
          description: Unix timestamp for when the key should expire.
        - name: expiration_ttl
          in: query
          type: integer
          description: Seconds until the key expires.
      - name: deletekvvalue
        method: DELETE
        description: Cloudflare Delete Key-value Pair
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.CLOUDFLARE_API_KEY}}'
  exposes:
  - type: rest
    namespace: kv-key-value-pairs-rest
    port: 8080
    description: REST adapter for Cloudflare KV API — Key-Value Pairs. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/accounts/{account-id}/storage/kv/namespaces/{namespace-id}/values/{key-name}
      name: accounts-account-id-storage-kv-namespaces-namespace-id-values-key-name
      description: REST surface for accounts-account_id-storage-kv-namespaces-namespace_id-values-key_name.
      operations:
      - method: GET
        name: readkvvalue
        description: Cloudflare Read Key-value Pair
        call: kv-key-value-pairs.readkvvalue
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: writekvvalue
        description: Cloudflare Write Key-value Pair
        call: kv-key-value-pairs.writekvvalue
        with:
          expiration: rest.expiration
          expiration_ttl: rest.expiration_ttl
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletekvvalue
        description: Cloudflare Delete Key-value Pair
        call: kv-key-value-pairs.deletekvvalue
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: kv-key-value-pairs-mcp
    port: 9090
    transport: http
    description: MCP adapter for Cloudflare KV API — Key-Value Pairs. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: cloudflare-read-key-value-pair
      description: Cloudflare Read Key-value Pair
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: kv-key-value-pairs.readkvvalue
      outputParameters:
      - type: object
        mapping: $.
    - name: cloudflare-write-key-value-pair
      description: Cloudflare Write Key-value Pair
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: kv-key-value-pairs.writekvvalue
      with:
        expiration: tools.expiration
        expiration_ttl: tools.expiration_ttl
      outputParameters:
      - type: object
        mapping: $.
    - name: cloudflare-delete-key-value-pair
      description: Cloudflare Delete Key-value Pair
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: kv-key-value-pairs.deletekvvalue
      outputParameters:
      - type: object
        mapping: $.