GitHub · Capability

GitHub Repos API — Collaborators

GitHub Repos API — Collaborators. 4 operations. Lead operation: List Repository Collaborators. Self-contained Naftiko capability covering one Github business surface.

Run with Naftiko GithubCollaborators

What You Can Do

GET
Listrepositorycollaborators — List Repository Collaborators
/v1/repos/{owner}/{repo}/collaborators
GET
Checkifuserisrepositorycollaborator — Check If User Is Repository Collaborator
/v1/repos/{owner}/{repo}/collaborators/{username}
PUT
Addrepositorycollaborator — Add Repository Collaborator
/v1/repos/{owner}/{repo}/collaborators/{username}
DELETE
Removerepositorycollaborator — Remove Repository Collaborator
/v1/repos/{owner}/{repo}/collaborators/{username}

MCP Tools

list-repository-collaborators

List Repository Collaborators

read-only idempotent
check-if-user-is-repository

Check If User Is Repository Collaborator

read-only idempotent
add-repository-collaborator

Add Repository Collaborator

idempotent
remove-repository-collaborator

Remove Repository Collaborator

idempotent

Capability Spec

temp-collaborators.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: GitHub Repos API — Collaborators
  description: 'GitHub Repos API — Collaborators. 4 operations. Lead operation: List Repository Collaborators. Self-contained
    Naftiko capability covering one Github business surface.'
  tags:
  - Github
  - Collaborators
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    GITHUB_API_KEY: GITHUB_API_KEY
capability:
  consumes:
  - type: http
    namespace: temp-collaborators
    baseUri: ''
    description: GitHub Repos API — Collaborators business capability. Self-contained, no shared references.
    resources:
    - name: repos-owner-repo-collaborators
      path: /repos/{owner}/{repo}/collaborators
      operations:
      - name: listrepositorycollaborators
        method: GET
        description: List Repository Collaborators
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: affiliation
          in: query
          type: string
          description: Filter collaborators returned by their affiliation. `outside` means all outside collaborators of an
            organization-owned repository. `direct` means all collaborat
        - name: permission
          in: query
          type: string
          description: Filter collaborators by the permissions they have on the repository. If not specified, all collaborators
            will be returned.
        - name: Authorization
          in: header
          type: string
        - name: X-GitHub-Api-Version
          in: header
          type: string
        - name: Accept
          in: header
          type: string
    - name: repos-owner-repo-collaborators-username
      path: /repos/{owner}/{repo}/collaborators/{username}
      operations:
      - name: checkifuserisrepositorycollaborator
        method: GET
        description: Check If User Is Repository Collaborator
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: Authorization
          in: header
          type: string
        - name: X-GitHub-Api-Version
          in: header
          type: string
        - name: Accept
          in: header
          type: string
      - name: addrepositorycollaborator
        method: PUT
        description: Add Repository Collaborator
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: Authorization
          in: header
          type: string
        - name: X-GitHub-Api-Version
          in: header
          type: string
        - name: Accept
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: removerepositorycollaborator
        method: DELETE
        description: Remove Repository Collaborator
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: Authorization
          in: header
          type: string
        - name: X-GitHub-Api-Version
          in: header
          type: string
        - name: Accept
          in: header
          type: string
    authentication:
      type: bearer
      token: '{{env.GITHUB_API_KEY}}'
  exposes:
  - type: rest
    namespace: temp-collaborators-rest
    port: 8080
    description: REST adapter for GitHub Repos API — Collaborators. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/repos/{owner}/{repo}/collaborators
      name: repos-owner-repo-collaborators
      description: REST surface for repos-owner-repo-collaborators.
      operations:
      - method: GET
        name: listrepositorycollaborators
        description: List Repository Collaborators
        call: temp-collaborators.listrepositorycollaborators
        with:
          affiliation: rest.affiliation
          permission: rest.permission
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/repos/{owner}/{repo}/collaborators/{username}
      name: repos-owner-repo-collaborators-username
      description: REST surface for repos-owner-repo-collaborators-username.
      operations:
      - method: GET
        name: checkifuserisrepositorycollaborator
        description: Check If User Is Repository Collaborator
        call: temp-collaborators.checkifuserisrepositorycollaborator
        with:
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: addrepositorycollaborator
        description: Add Repository Collaborator
        call: temp-collaborators.addrepositorycollaborator
        with:
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: removerepositorycollaborator
        description: Remove Repository Collaborator
        call: temp-collaborators.removerepositorycollaborator
        with:
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: temp-collaborators-mcp
    port: 9090
    transport: http
    description: MCP adapter for GitHub Repos API — Collaborators. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: list-repository-collaborators
      description: List Repository Collaborators
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: temp-collaborators.listrepositorycollaborators
      with:
        affiliation: tools.affiliation
        permission: tools.permission
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
      outputParameters:
      - type: object
        mapping: $.
    - name: check-if-user-is-repository
      description: Check If User Is Repository Collaborator
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: temp-collaborators.checkifuserisrepositorycollaborator
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
      outputParameters:
      - type: object
        mapping: $.
    - name: add-repository-collaborator
      description: Add Repository Collaborator
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: temp-collaborators.addrepositorycollaborator
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: remove-repository-collaborator
      description: Remove Repository Collaborator
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: temp-collaborators.removerepositorycollaborator
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
      outputParameters:
      - type: object
        mapping: $.