Stack Exchange · Capability

Stack Exchange API v2.3 — Access Tokens

Access Tokens surface of the Stack Exchange API. 3 operations. Lead operation: Invalidate Access Tokens. Self-contained Naftiko capability covering one Stack Exchange business surface.

Run with Naftiko Stack ExchangeQ And AAccess Tokens

What You Can Do

GET
Invalidateaccesstokens — Invalidate Access Tokens
/v1/access-tokens/{accesstokens}/invalidate
GET
Readaccesstokens — Read Access Tokens
/v1/access-tokens/{accesstokens}/read
GET
Deauthenticateapp — De-Authenticate App
/v1/apps/{accesstokens}/de-authenticate

MCP Tools

invalidate-access-tokens

Invalidate Access Tokens

read-only idempotent
read-access-tokens

Read Access Tokens

read-only idempotent
de-authenticate-app

De-Authenticate App

read-only idempotent

Capability Spec

stack-exchange-access-tokens.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Stack Exchange API v2.3 — Access Tokens
  description: 'Access Tokens surface of the Stack Exchange API. 3 operations. Lead operation: Invalidate Access Tokens. Self-contained Naftiko capability covering one Stack Exchange business surface.'
  tags:
  - Stack Exchange
  - Q And A
  - Access Tokens
  created: '2026-05-29'
  modified: '2026-05-29'
binds:
- namespace: env
  keys:
    STACK_EXCHANGE_KEY: STACK_EXCHANGE_KEY
    STACK_EXCHANGE_ACCESS_TOKEN: STACK_EXCHANGE_ACCESS_TOKEN
capability:
  consumes:
  - type: http
    namespace: stack-exchange-access-tokens
    baseUri: https://api.stackexchange.com/2.3
    description: Stack Exchange API v2.3 — Access Tokens business capability. Self-contained, no shared references.
    authentication:
      type: apikey
      key: key
      value: '{{env.STACK_EXCHANGE_KEY}}'
      placement: query
    resources:
    - name: access-tokens-accesstokens-invalidate
      path: /access-tokens/{accessTokens}/invalidate
      operations:
      - name: invalidateAccessTokens
        method: GET
        description: Invalidate Access Tokens
        inputParameters:
        - name: accessTokens
          in: path
          type: string
          required: true
          description: Up to 100 semicolon-delimited access tokens to invalidate.
        - name: key
          in: query
          type: string
          required: false
          description: App key from stackapps.com. Raises the daily quota to 10,000/IP.
        - name: filter
          in: query
          type: string
          required: false
          description: Custom response filter id created via /filters/create.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: access-tokens-accesstokens-read
      path: /access-tokens/{accessTokens}/read
      operations:
      - name: readAccessTokens
        method: GET
        description: Read Access Tokens
        inputParameters:
        - name: accessTokens
          in: path
          type: string
          required: true
          description: Up to 100 semicolon-delimited access tokens to inspect.
        - name: key
          in: query
          type: string
          required: false
          description: App key from stackapps.com. Raises the daily quota to 10,000/IP.
        - name: filter
          in: query
          type: string
          required: false
          description: Custom response filter id created via /filters/create.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: apps-accesstokens-de-authenticate
      path: /apps/{accessTokens}/de-authenticate
      operations:
      - name: deauthenticateApp
        method: GET
        description: De-Authenticate App
        inputParameters:
        - name: accessTokens
          in: path
          type: string
          required: true
          description: accessTokens parameter
        - name: key
          in: query
          type: string
          required: false
          description: App key from stackapps.com. Raises the daily quota to 10,000/IP.
        - name: filter
          in: query
          type: string
          required: false
          description: Custom response filter id created via /filters/create.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
  exposes:
  - type: rest
    namespace: stack-exchange-access-tokens-rest
    port: 8080
    description: REST adapter for Stack Exchange API v2.3 — Access Tokens. One Spectral-compliant resource per consumed operation, prefixed with /v1.
    resources:
    - path: /v1/access-tokens/{accesstokens}/invalidate
      name: invalidate
      description: REST surface for access-tokens.
      operations:
      - method: GET
        name: invalidateAccessTokens
        description: Invalidate Access Tokens
        call: stack-exchange-access-tokens.invalidateAccessTokens
        with:
          accessTokens: rest.accessTokens
          key: rest.key
          filter: rest.filter
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/access-tokens/{accesstokens}/read
      name: read
      description: REST surface for access-tokens.
      operations:
      - method: GET
        name: readAccessTokens
        description: Read Access Tokens
        call: stack-exchange-access-tokens.readAccessTokens
        with:
          accessTokens: rest.accessTokens
          key: rest.key
          filter: rest.filter
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/apps/{accesstokens}/de-authenticate
      name: de-authenticate
      description: REST surface for apps.
      operations:
      - method: GET
        name: deauthenticateApp
        description: De-Authenticate App
        call: stack-exchange-access-tokens.deauthenticateApp
        with:
          accessTokens: rest.accessTokens
          key: rest.key
          filter: rest.filter
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: stack-exchange-access-tokens-mcp
    port: 9090
    transport: http
    description: MCP adapter for Stack Exchange API v2.3 — Access Tokens. One tool per consumed operation, routed inline through this capability's consumes block.
    tools:
    - name: invalidate-access-tokens
      description: Invalidate Access Tokens
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: stack-exchange-access-tokens.invalidateAccessTokens
      with:
        accessTokens: tools.accessTokens
        key: tools.key
        filter: tools.filter
      outputParameters:
      - type: object
        mapping: $.
    - name: read-access-tokens
      description: Read Access Tokens
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: stack-exchange-access-tokens.readAccessTokens
      with:
        accessTokens: tools.accessTokens
        key: tools.key
        filter: tools.filter
      outputParameters:
      - type: object
        mapping: $.
    - name: de-authenticate-app
      description: De-Authenticate App
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: stack-exchange-access-tokens.deauthenticateApp
      with:
        accessTokens: tools.accessTokens
        key: tools.key
        filter: tools.filter
      outputParameters:
      - type: object
        mapping: $.