GitHub · Capability

GitHub User API — Memberships

GitHub User API — Memberships. 3 operations. Lead operation: GitHub List Organization Memberships for the Authenticated User. Self-contained Naftiko capability covering one Github business surface.

Run with Naftiko GithubMemberships

What You Can Do

GET
Listorganizationmembershipsfortheauthenticateduser — GitHub List Organization Memberships for the Authenticated User
/v1/user/memberships/orgs
GET
Getanorganizationmembershipfortheauthenticateduser — GitHub Get an Organization Membership for the Authenticated User
/v1/user/memberships/orgs/{org}
PATCH
Updateanorganizationmembershipfortheauthenticateduser — GitHub Update an Organization Membership for the Authenticated User
/v1/user/memberships/orgs/{org}

MCP Tools

github-list-organization-memberships-authenticated

GitHub List Organization Memberships for the Authenticated User

read-only idempotent
github-get-organization-membership-authenticated

GitHub Get an Organization Membership for the Authenticated User

read-only idempotent
github-update-organization-membership-authenticated

GitHub Update an Organization Membership for the Authenticated User

idempotent

Capability Spec

users-memberships.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: GitHub User API — Memberships
  description: 'GitHub User API — Memberships. 3 operations. Lead operation: GitHub List Organization Memberships for the
    Authenticated User. Self-contained Naftiko capability covering one Github business surface.'
  tags:
  - Github
  - Memberships
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    GITHUB_API_KEY: GITHUB_API_KEY
capability:
  consumes:
  - type: http
    namespace: users-memberships
    baseUri: ''
    description: GitHub User API — Memberships business capability. Self-contained, no shared references.
    resources:
    - name: user-memberships-orgs
      path: /user/memberships/orgs
      operations:
      - name: listorganizationmembershipsfortheauthenticateduser
        method: GET
        description: GitHub List Organization Memberships for the Authenticated User
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: state
          in: query
          type: string
          description: Indicates the state of the memberships to return. If not specified, the API returns both active and
            pending memberships.
        - name: Authorization
          in: header
          type: string
        - name: X-GitHub-Api-Version
          in: header
          type: string
        - name: Accept
          in: header
          type: string
    - name: user-memberships-orgs-org
      path: /user/memberships/orgs/{org}
      operations:
      - name: getanorganizationmembershipfortheauthenticateduser
        method: GET
        description: GitHub Get an Organization Membership for the Authenticated User
        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: updateanorganizationmembershipfortheauthenticateduser
        method: PATCH
        description: GitHub Update an Organization Membership for the Authenticated User
        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: true
    authentication:
      type: bearer
      token: '{{env.GITHUB_API_KEY}}'
  exposes:
  - type: rest
    namespace: users-memberships-rest
    port: 8080
    description: REST adapter for GitHub User API — Memberships. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/user/memberships/orgs
      name: user-memberships-orgs
      description: REST surface for user-memberships-orgs.
      operations:
      - method: GET
        name: listorganizationmembershipsfortheauthenticateduser
        description: GitHub List Organization Memberships for the Authenticated User
        call: users-memberships.listorganizationmembershipsfortheauthenticateduser
        with:
          state: rest.state
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/user/memberships/orgs/{org}
      name: user-memberships-orgs-org
      description: REST surface for user-memberships-orgs-org.
      operations:
      - method: GET
        name: getanorganizationmembershipfortheauthenticateduser
        description: GitHub Get an Organization Membership for the Authenticated User
        call: users-memberships.getanorganizationmembershipfortheauthenticateduser
        with:
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: updateanorganizationmembershipfortheauthenticateduser
        description: GitHub Update an Organization Membership for the Authenticated User
        call: users-memberships.updateanorganizationmembershipfortheauthenticateduser
        with:
          Authorization: rest.Authorization
          X-GitHub-Api-Version: rest.X-GitHub-Api-Version
          Accept: rest.Accept
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: users-memberships-mcp
    port: 9090
    transport: http
    description: MCP adapter for GitHub User API — Memberships. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: github-list-organization-memberships-authenticated
      description: GitHub List Organization Memberships for the Authenticated User
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: users-memberships.listorganizationmembershipsfortheauthenticateduser
      with:
        state: tools.state
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
      outputParameters:
      - type: object
        mapping: $.
    - name: github-get-organization-membership-authenticated
      description: GitHub Get an Organization Membership for the Authenticated User
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: users-memberships.getanorganizationmembershipfortheauthenticateduser
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
      outputParameters:
      - type: object
        mapping: $.
    - name: github-update-organization-membership-authenticated
      description: GitHub Update an Organization Membership for the Authenticated User
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: users-memberships.updateanorganizationmembershipfortheauthenticateduser
      with:
        Authorization: tools.Authorization
        X-GitHub-Api-Version: tools.X-GitHub-Api-Version
        Accept: tools.Accept
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.