> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openhands.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Store Provider Tokens

> Store git provider tokens.

Saves the git provider tokens (GitHub, GitLab, Bitbucket, etc.) for the authenticated user.

Returns:
    200: Git providers stored successfully
    401: Invalid token
    500: Error storing git providers



## OpenAPI

````yaml /openapi/openhands-cloud.json post /api/v1/secrets/git-providers
openapi: 3.1.0
info:
  title: OpenHands
  description: 'OpenHands: Code Less, Make More'
  version: 0.0.1
servers: []
security: []
paths:
  /api/v1/secrets/git-providers:
    post:
      tags:
        - Secrets
        - Git
      summary: Store Provider Tokens
      description: >-
        Store git provider tokens.


        Saves the git provider tokens (GitHub, GitLab, Bitbucket, etc.) for the
        authenticated user.


        Returns:
            200: Git providers stored successfully
            401: Invalid token
            500: Error storing git providers
      operationId: store_provider_tokens_api_v1_secrets_git_providers_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/POSTProviderModel'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EditResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    POSTProviderModel:
      properties:
        mcp_config:
          anyOf:
            - $ref: '#/components/schemas/MCPConfig'
            - type: 'null'
        provider_tokens:
          additionalProperties:
            $ref: '#/components/schemas/ProviderToken'
          propertyNames:
            $ref: '#/components/schemas/ProviderType'
          type: object
          title: Provider Tokens
          default: {}
      type: object
      title: POSTProviderModel
      description: Settings for POST requests
    EditResponse:
      properties:
        message:
          type: string
          title: Message
      type: object
      required:
        - message
      title: EditResponse
      description: General response to an edit operation
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MCPConfig:
      properties:
        mcpServers:
          additionalProperties:
            anyOf:
              - $ref: '#/components/schemas/TransformingStdioMCPServer'
              - $ref: '#/components/schemas/TransformingRemoteMCPServer'
              - $ref: '#/components/schemas/StdioMCPServer'
              - $ref: '#/components/schemas/RemoteMCPServer'
          type: object
          title: Mcpservers
      additionalProperties: true
      type: object
      title: MCPConfig
      description: >-
        A configuration object for MCP Servers that conforms to the canonical
        MCP configuration format

        while adding additional fields for enabling FastMCP-specific features
        like tool transformations

        and filtering by tags.


        For an MCPConfig that is strictly canonical, see the
        `CanonicalMCPConfig` class.
    ProviderToken:
      properties:
        token:
          anyOf:
            - type: string
              format: password
              writeOnly: true
            - type: 'null'
          title: Token
        user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: User Id
        host:
          anyOf:
            - type: string
            - type: 'null'
          title: Host
      type: object
      title: ProviderToken
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    TransformingStdioMCPServer:
      properties:
        command:
          type: string
          title: Command
        args:
          items:
            type: string
          type: array
          title: Args
        env:
          additionalProperties: true
          type: object
          title: Env
        transport:
          type: string
          const: stdio
          title: Transport
          default: stdio
        type:
          anyOf:
            - type: string
              const: stdio
            - type: 'null'
          title: Type
        cwd:
          anyOf:
            - type: string
            - type: 'null'
          title: Cwd
        timeout:
          anyOf:
            - type: integer
            - type: 'null'
          title: Timeout
        keep_alive:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Keep Alive
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        icon:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon
        authentication:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Authentication
        tools:
          additionalProperties:
            $ref: '#/components/schemas/ToolTransformConfig'
          type: object
          title: Tools
        include_tags:
          anyOf:
            - items:
                type: string
              type: array
              uniqueItems: true
            - type: 'null'
          title: Include Tags
          description: The tags to include in the proxy.
        exclude_tags:
          anyOf:
            - items:
                type: string
              type: array
              uniqueItems: true
            - type: 'null'
          title: Exclude Tags
          description: The tags to exclude in the proxy.
      additionalProperties: true
      type: object
      required:
        - command
      title: TransformingStdioMCPServer
      description: A Stdio server with tool transforms.
    TransformingRemoteMCPServer:
      properties:
        url:
          type: string
          title: Url
        transport:
          anyOf:
            - type: string
              enum:
                - http
                - streamable-http
                - sse
            - type: 'null'
          title: Transport
        headers:
          additionalProperties:
            type: string
          type: object
          title: Headers
        auth:
          anyOf:
            - type: string
            - type: string
              const: oauth
            - type: 'null'
          title: Auth
          description: >-
            Either a string representing a Bearer token, the literal "oauth" to
            use OAuth authentication, or an httpx.Auth instance for custom
            authentication.
        sse_read_timeout:
          anyOf:
            - type: string
              format: duration
            - type: integer
            - type: number
            - type: 'null'
          title: Sse Read Timeout
        timeout:
          anyOf:
            - type: integer
            - type: 'null'
          title: Timeout
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        icon:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon
        authentication:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Authentication
        tools:
          additionalProperties:
            $ref: '#/components/schemas/ToolTransformConfig'
          type: object
          title: Tools
        include_tags:
          anyOf:
            - items:
                type: string
              type: array
              uniqueItems: true
            - type: 'null'
          title: Include Tags
          description: The tags to include in the proxy.
        exclude_tags:
          anyOf:
            - items:
                type: string
              type: array
              uniqueItems: true
            - type: 'null'
          title: Exclude Tags
          description: The tags to exclude in the proxy.
      additionalProperties: true
      type: object
      required:
        - url
      title: TransformingRemoteMCPServer
      description: A Remote server with tool transforms.
    StdioMCPServer:
      properties:
        command:
          type: string
          title: Command
        args:
          items:
            type: string
          type: array
          title: Args
        env:
          additionalProperties: true
          type: object
          title: Env
        transport:
          type: string
          const: stdio
          title: Transport
          default: stdio
        type:
          anyOf:
            - type: string
              const: stdio
            - type: 'null'
          title: Type
        cwd:
          anyOf:
            - type: string
            - type: 'null'
          title: Cwd
        timeout:
          anyOf:
            - type: integer
            - type: 'null'
          title: Timeout
        keep_alive:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Keep Alive
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        icon:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon
        authentication:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Authentication
      additionalProperties: true
      type: object
      required:
        - command
      title: StdioMCPServer
      description: >-
        MCP server configuration for stdio transport.


        This is the canonical configuration format for MCP servers using stdio
        transport.
    RemoteMCPServer:
      properties:
        url:
          type: string
          title: Url
        transport:
          anyOf:
            - type: string
              enum:
                - http
                - streamable-http
                - sse
            - type: 'null'
          title: Transport
        headers:
          additionalProperties:
            type: string
          type: object
          title: Headers
        auth:
          anyOf:
            - type: string
            - type: string
              const: oauth
            - type: 'null'
          title: Auth
          description: >-
            Either a string representing a Bearer token, the literal "oauth" to
            use OAuth authentication, or an httpx.Auth instance for custom
            authentication.
        sse_read_timeout:
          anyOf:
            - type: string
              format: duration
            - type: integer
            - type: number
            - type: 'null'
          title: Sse Read Timeout
        timeout:
          anyOf:
            - type: integer
            - type: 'null'
          title: Timeout
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        icon:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon
        authentication:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Authentication
      additionalProperties: true
      type: object
      required:
        - url
      title: RemoteMCPServer
      description: >-
        MCP server configuration for HTTP/SSE transport.


        This is the canonical configuration format for MCP servers using remote
        transports.
    ToolTransformConfig:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: The new name for the tool.
        version:
          anyOf:
            - type: string
            - type: 'null'
          title: Version
          description: The new version for the tool.
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
          description: The new title of the tool.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: The new description of the tool.
        tags:
          items:
            type: string
          type: array
          uniqueItems: true
          title: Tags
          description: The new tags for the tool.
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
          description: The new meta information for the tool.
        enabled:
          type: boolean
          title: Enabled
          description: >-
            Whether the tool is enabled. If False, the tool will be hidden from
            clients.
          default: true
        arguments:
          additionalProperties:
            $ref: '#/components/schemas/ArgTransformConfig'
          type: object
          title: Arguments
          description: A dictionary of argument transforms to apply to the tool.
      additionalProperties: false
      type: object
      title: ToolTransformConfig
      description: Provides a way to transform a tool.
    ArgTransformConfig:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: The new name for the argument.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: The new description for the argument.
        default:
          anyOf:
            - type: string
            - type: integer
            - type: number
            - type: boolean
            - type: 'null'
          title: Default
          description: The new default value for the argument.
        hide:
          type: boolean
          title: Hide
          description: Whether to hide the argument from the tool.
          default: false
        required:
          anyOf:
            - type: boolean
              const: true
            - type: 'null'
          title: Required
          description: Whether the argument is required.
        examples:
          anyOf:
            - {}
            - type: 'null'
          title: Examples
          description: Examples of the argument.
      additionalProperties: false
      type: object
      title: ArgTransformConfig
      description: A model for requesting a single argument transform.
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-Access-Token

````