naftiko: 1.0.0-alpha2 info: label: GitHub User API — Organizations description: 'GitHub User API — Organizations. 6 operations. Lead operation: GitHub List Organization Memberships for the Authenticated User. Self-contained Naftiko capability covering one Github business surface.' tags: - Github - Organizations created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: GITHUB_API_KEY: GITHUB_API_KEY capability: consumes: - type: http namespace: users-organizations baseUri: '' description: GitHub User API — Organizations 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 - name: user-orgs path: /user/orgs operations: - name: listorganizationsfortheauthenticateduser method: GET description: GitHub List Organizations 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: users-username-events-orgs-org path: /users/{username}/events/orgs/{org} operations: - name: listorganizationeventsfortheauthenticateduser method: GET description: GitHub List Organization Events 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: users-username-orgs path: /users/{username}/orgs operations: - name: listorganizationsforuser method: GET description: GitHub List Organizations for 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 authentication: type: bearer token: '{{env.GITHUB_API_KEY}}' exposes: - type: rest namespace: users-organizations-rest port: 8080 description: REST adapter for GitHub User API — Organizations. 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-organizations.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-organizations.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-organizations.updateanorganizationmembershipfortheauthenticateduser with: Authorization: rest.Authorization X-GitHub-Api-Version: rest.X-GitHub-Api-Version Accept: rest.Accept body: rest.body outputParameters: - type: object mapping: $. - path: /v1/user/orgs name: user-orgs description: REST surface for user-orgs. operations: - method: GET name: listorganizationsfortheauthenticateduser description: GitHub List Organizations for the Authenticated User call: users-organizations.listorganizationsfortheauthenticateduser with: Authorization: rest.Authorization X-GitHub-Api-Version: rest.X-GitHub-Api-Version Accept: rest.Accept outputParameters: - type: object mapping: $. - path: /v1/users/{username}/events/orgs/{org} name: users-username-events-orgs-org description: REST surface for users-username-events-orgs-org. operations: - method: GET name: listorganizationeventsfortheauthenticateduser description: GitHub List Organization Events for the Authenticated User call: users-organizations.listorganizationeventsfortheauthenticateduser with: Authorization: rest.Authorization X-GitHub-Api-Version: rest.X-GitHub-Api-Version Accept: rest.Accept outputParameters: - type: object mapping: $. - path: /v1/users/{username}/orgs name: users-username-orgs description: REST surface for users-username-orgs. operations: - method: GET name: listorganizationsforuser description: GitHub List Organizations for User call: users-organizations.listorganizationsforuser with: Authorization: rest.Authorization X-GitHub-Api-Version: rest.X-GitHub-Api-Version Accept: rest.Accept outputParameters: - type: object mapping: $. - type: mcp namespace: users-organizations-mcp port: 9090 transport: http description: MCP adapter for GitHub User API — Organizations. 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-organizations.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-organizations.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-organizations.updateanorganizationmembershipfortheauthenticateduser with: Authorization: tools.Authorization X-GitHub-Api-Version: tools.X-GitHub-Api-Version Accept: tools.Accept body: tools.body outputParameters: - type: object mapping: $. - name: github-list-organizations-authenticated-user description: GitHub List Organizations for the Authenticated User hints: readOnly: true destructive: false idempotent: true call: users-organizations.listorganizationsfortheauthenticateduser with: Authorization: tools.Authorization X-GitHub-Api-Version: tools.X-GitHub-Api-Version Accept: tools.Accept outputParameters: - type: object mapping: $. - name: github-list-organization-events-authenticated description: GitHub List Organization Events for the Authenticated User hints: readOnly: true destructive: false idempotent: true call: users-organizations.listorganizationeventsfortheauthenticateduser with: Authorization: tools.Authorization X-GitHub-Api-Version: tools.X-GitHub-Api-Version Accept: tools.Accept outputParameters: - type: object mapping: $. - name: github-list-organizations-user description: GitHub List Organizations for User hints: readOnly: true destructive: false idempotent: true call: users-organizations.listorganizationsforuser with: Authorization: tools.Authorization X-GitHub-Api-Version: tools.X-GitHub-Api-Version Accept: tools.Accept outputParameters: - type: object mapping: $.