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

# Sync Remote MCP Provider

> Lists the tools, resources and prompts of the remote MCP server of an MCP provider with the user's credentials and mirrors them into the provider, along with its instructions and icon. Existing items are matched by name; new ones are created, changed ones updated and the removed ones deleted.



## OpenAPI

````yaml post /providers/{id}/sync
openapi: 3.0.4
info:
  title: HasMCP API
  version: 1.0.0
  description: >-
    API for managing HasMCP: variables, providers and their tools, resources and
    prompts, MCP servers, Git connections and the setup page settings. The
    organization is taken from the access token, so the paths carry no
    organization ID. The MCP endpoints that clients connect to, the public hub
    and the OAuth2 redirects are listed too.
servers:
  - url: https://app.hasmcp.com/api/v1
    description: Manager API (the other APIs override this per path)
security:
  - bearerAuth: []
tags:
  - name: Variables
  - name: Providers
  - name: Provider Tools
  - name: Provider Resources
  - name: Provider Prompts
  - name: Servers
  - name: Server Associations
  - name: Git Connections
  - name: Users
  - name: Hub
  - name: Configurations
  - name: Setup
  - name: MCP
  - name: OAuth2
paths:
  /providers/{id}/sync:
    post:
      tags:
        - Providers
      summary: Sync Remote MCP Provider
      description: >-
        Lists the tools, resources and prompts of the remote MCP server of an
        MCP provider with the user's credentials and mirrors them into the
        provider, along with its instructions and icon. Existing items are
        matched by name; new ones are created, changed ones updated and the
        removed ones deleted.
      operationId: syncProviderTools
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            description: Provider ID
      responses:
        '200':
          description: Provider tools synced
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SyncProviderResponse'
        '422':
          description: >-
            The remote MCP server requires authorization, connect the account
            with the authorize endpoint (error.data.authorizationRequired is
            true)
        '502':
          description: The remote MCP server failed
        default:
          $ref: '#/components/responses/Error'
      security:
        - oauth2:
            - provider:update
components:
  schemas:
    SyncProviderResponse:
      type: object
      properties:
        tools:
          type: array
          items:
            $ref: '#/components/schemas/ProviderTool'
        resources:
          type: array
          items:
            $ref: '#/components/schemas/ProviderResource'
        prompts:
          type: array
          items:
            $ref: '#/components/schemas/ProviderPrompt'
        instructionsUpdated:
          type: boolean
        iconUpdated:
          type: boolean
        created:
          type: integer
          description: How many tools, resources and prompts were created
        updated:
          type: integer
        deleted:
          type: integer
    ProviderTool:
      type: object
      properties:
        id:
          type: string
          pattern: ^[A-Za-z0-9]{11}$
          example: kSuB9Gf6aD4
          readOnly: true
        providerID:
          type: string
          pattern: ^[A-Za-z0-9]{11}$
          example: kSuB9Gf6aD4
        method:
          type: string
          example: GET
        path:
          type: string
          example: /users/{id}
        name:
          type: string
          description: MCP tool name (camelCase up to 36 chars)
          pattern: ^[a-z][a-zA-Z0-9]{0,35}$
          maxLength: 36
          example: makePayment
        title:
          type: string
          description: MCP tool title (Free text up to 64 chars)
          example: Make Payment
        description:
          type: string
        pathArgsJSONSchema:
          type: object
          description: A raw JSON schema.
          additionalProperties: true
        queryArgsJSONSchema:
          type: object
          description: A raw JSON schema.
          additionalProperties: true
        reqBodyJSONSchema:
          type: object
          description: A raw JSON schema.
          additionalProperties: true
        headers:
          type: array
          items:
            $ref: '#/components/schemas/ToolHeader'
        oauth2Scopes:
          type: array
          items:
            type: string
        hints:
          type: array
          description: >-
            MCP tool annotations that are set, e.g. readOnlyHint,
            destructiveHint, idempotentHint, openWorldHint.
          items:
            type: string
    ProviderResource:
      type: object
      properties:
        id:
          type: string
          pattern: ^[A-Za-z0-9]{11}$
          example: kSuB9Gf6aD4
          readOnly: true
        providerID:
          type: string
          pattern: ^[A-Za-z0-9]{11}$
          readOnly: true
        createdAt:
          type: string
          format: date-time
          readOnly: true
        updatedAt:
          type: string
          format: date-time
          readOnly: true
        name:
          type: string
          description: MCP resource name (camelCase up to 36 chars)
          pattern: ^[a-z][a-zA-Z0-9]{0,35}$
          maxLength: 36
          example: userProfile
        description:
          type: string
        uri:
          type: string
          format: uri
        mimeType:
          type: string
          example: text/plain
        size:
          type: integer
          format: int64
        annotations:
          type: object
          description: A raw JSON message for annotations.
          additionalProperties: true
    ProviderPrompt:
      type: object
      properties:
        id:
          type: string
          pattern: ^[A-Za-z0-9]{11}$
          example: kSuB9Gf6aD4
          readOnly: true
        providerID:
          type: string
          pattern: ^[A-Za-z0-9]{11}$
          readOnly: true
        createdAt:
          type: string
          format: date-time
          readOnly: true
        updatedAt:
          type: string
          format: date-time
          readOnly: true
        name:
          type: string
          description: MCP prompt name (camelCase up to 36 characters)
          pattern: ^[a-z][a-zA-Z0-9]{0,35}$
          maxLength: 36
          example: summarizeText
        description:
          type: string
        arguments:
          type: array
          description: MCP prompt arguments.
          items:
            $ref: '#/components/schemas/PromptArgument'
        messages:
          type: array
          description: MCP prompt messages.
          items:
            type: object
            additionalProperties: true
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
              example: 422
            message:
              type: string
            data:
              type: object
              additionalProperties: true
              description: Details, e.g. authorizationRequired on sync
    ToolHeader:
      type: object
      properties:
        key:
          type: string
        value:
          type: string
    PromptArgument:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        required:
          type: boolean
  responses:
    Error:
      description: >-
        An error; the HTTP status is error.code, e.g. 401 for a missing or
        invalid token, 404 when not found or 422 for an invalid request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Enter 'Bearer' followed by a space and your token (e.g., 'Bearer
        ${HASMCP_ACCESS_TOKEN}').
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.hasmcp.com/oauth2/auth
          tokenUrl: https://accounts.hasmcp.com/oauth2/token
          scopes:
            gitconnection:list: List Git connections
            gitconnection:delete: Delete Git connection
            variable:list: List variables
            variable:create: Create variable
            variable:update: Update variable
            variable:delete: Delete variable
            provider:list: List providers
            provider:create: Create provider
            provider:read: Get provider
            provider:update: Update provider
            provider:delete: Delete provider
            server:list: List MCP servers
            server:create: Create MCP server
            server:read: Get MCP server
            server:update: Update MCP server
            server:delete: Delete MCP server
            server:create_token: Create MCP server token
            server:tail: Read the debug stream of an MCP server
            provider_tool:list: List provider tools
            provider_tool:create: Create provider tool
            provider_tool:read: Get provider tool
            provider_tool:update: Update provider tool
            provider_tool:delete: Delete provider tool
            provider_tool_interceptor:list: List provider tool interceptors
            provider_tool_interceptor:save: Save provider tool interceptors
            provider_resource:list: List provider resources
            provider_resource:create: Create provider resource
            provider_resource:read: Get provider resource
            provider_resource:update: Update provider resource
            provider_resource:delete: Delete provider resource
            provider_prompt:list: List provider prompts
            provider_prompt:create: Create provider prompt
            provider_prompt:read: Get provider prompt
            provider_prompt:update: Update provider prompt
            provider_prompt:delete: Delete provider prompt
            server:import: Import MCP server
            server:export: Export MCP server
            server_analytics:read: Get MCP server analytics
            server_token:create: Create MCP server token
            server_tool:list: List MCP server tools
            server_tool:create: Add a tool to an MCP server
            server_tool:delete: Remove a tool from an MCP server
            server_resource:list: List MCP server resources
            server_resource:create: Add a resource to an MCP server
            server_resource:delete: Remove a resource from an MCP server
            server_prompt:list: List MCP server prompts
            server_prompt:create: Add a prompt to an MCP server
            server_prompt:delete: Remove a prompt from an MCP server

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.