JupyterHub · Capability

JupyterHub REST API — OAuth2

JupyterHub REST API — OAuth2. 2 operations. Lead operation: JupyterHub OAuth2 authorize. Self-contained Naftiko capability covering one Jupyterhub business surface.

Run with Naftiko JupyterhubOAuth2

What You Can Do

GET
Oauth2authorize — JupyterHub OAuth2 authorize
/v1/oauth2/authorize
POST
Oauth2token — JupyterHub OAuth2 token
/v1/oauth2/token

MCP Tools

jupyterhub-oauth2-authorize

JupyterHub OAuth2 authorize

read-only idempotent
jupyterhub-oauth2-token

JupyterHub OAuth2 token

Capability Spec

rest-oauth2.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: JupyterHub REST API — OAuth2
  description: 'JupyterHub REST API — OAuth2. 2 operations. Lead operation: JupyterHub OAuth2 authorize. Self-contained Naftiko
    capability covering one Jupyterhub business surface.'
  tags:
  - Jupyterhub
  - OAuth2
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    JUPYTERHUB_API_KEY: JUPYTERHUB_API_KEY
capability:
  consumes:
  - type: http
    namespace: rest-oauth2
    baseUri: http://localhost:8000/hub/api
    description: JupyterHub REST API — OAuth2 business capability. Self-contained, no shared references.
    resources:
    - name: oauth2-authorize
      path: /oauth2/authorize
      operations:
      - name: oauth2authorize
        method: GET
        description: JupyterHub OAuth2 authorize
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: oauth2-token
      path: /oauth2/token
      operations:
      - name: oauth2token
        method: POST
        description: JupyterHub OAuth2 token
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.JUPYTERHUB_API_KEY}}'
  exposes:
  - type: rest
    namespace: rest-oauth2-rest
    port: 8080
    description: REST adapter for JupyterHub REST API — OAuth2. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/oauth2/authorize
      name: oauth2-authorize
      description: REST surface for oauth2-authorize.
      operations:
      - method: GET
        name: oauth2authorize
        description: JupyterHub OAuth2 authorize
        call: rest-oauth2.oauth2authorize
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/oauth2/token
      name: oauth2-token
      description: REST surface for oauth2-token.
      operations:
      - method: POST
        name: oauth2token
        description: JupyterHub OAuth2 token
        call: rest-oauth2.oauth2token
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: rest-oauth2-mcp
    port: 9090
    transport: http
    description: MCP adapter for JupyterHub REST API — OAuth2. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: jupyterhub-oauth2-authorize
      description: JupyterHub OAuth2 authorize
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: rest-oauth2.oauth2authorize
      outputParameters:
      - type: object
        mapping: $.
    - name: jupyterhub-oauth2-token
      description: JupyterHub OAuth2 token
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: rest-oauth2.oauth2token
      outputParameters:
      - type: object
        mapping: $.