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

# Get Mcp Server By Slug

> Return details for an individual MCP server by slug.

Uses the slug and organization ID from auth context to fetch the server.
This is useful for fetching server details when you only have the service name/slug.



## OpenAPI

````yaml /api-reference/openapi.yaml get /api/registry/v1/servers/by-slug/{slug}
openapi: 3.1.0
info:
  title: Barndoor.ai Public API
  description: Unified public API specification for Barndoor.ai platform
  version: 2.18.0
servers:
  - url: https://{host}
    description: Barndoor public API
    variables:
      host:
        default: platform.barndoor.ai
        description: >-
          The host serving your Barndoor deployment. Defaults to production;
          override it for another environment or a dedicated deployment.
security:
  - ApiKey: []
  - OAuth2:
      - openid
      - profile
      - email
tags:
  - name: dlp
    x-group: Data Control Center
  - name: identity
    x-group: Identity
  - name: llm-gateway
    x-group: LLM Gateway
  - name: notification
    x-group: Notifications
  - name: policy
    x-group: Policies
  - name: registry
    x-group: MCP Gateway
  - name: system-management
    x-group: Log Exports
paths:
  /api/registry/v1/servers/by-slug/{slug}:
    get:
      tags:
        - registry
      summary: Get Mcp Server By Slug
      description: >-
        Return details for an individual MCP server by slug.


        Uses the slug and organization ID from auth context to fetch the server.

        This is useful for fetching server details when you only have the
        service name/slug.
      operationId: get_mcp_server_by_slug
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: include_service_accounts
          in: query
          required: false
          schema:
            type: boolean
            description: >-
              Include service account connections for can_manage_policies
              computation (does not affect connection_status)
            default: false
            title: Include Service Accounts
          description: >-
            Include service account connections for can_manage_policies
            computation (does not affect connection_status)
        - name: include_connection_status
          in: query
          required: false
          schema:
            type: boolean
            description: >-
              Include connection_status computation (requires Bao calls). Set to
              false for better performance when connection_status is not needed.
            default: true
            title: Include Connection Status
          description: >-
            Include connection_status computation (requires Bao calls). Set to
            false for better performance when connection_status is not needed.
        - name: include_local
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            description: >-
              BCP-4300: allow servers that run locally through the Barndoor CLI
              (embedded and local catalogs). Omitted, the registry resolves it
              from the org's `local-cli-mcp-tooling` flag (fail-closed); an
              explicit value is always honoured. An excluded server is left out
              of the result, and a single-server read of one returns 404.
            title: Include Local
          description: >-
            BCP-4300: allow servers that run locally through the Barndoor CLI
            (embedded and local catalogs). Omitted, the registry resolves it
            from the org's `local-cli-mcp-tooling` flag (fail-closed); an
            explicit value is always honoured. An excluded server is left out of
            the result, and a single-server read of one returns 404.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ServerResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        enabled:
          type: boolean
          title: Enabled
          default: true
        configuration:
          additionalProperties: true
          type: object
          title: Configuration
        name:
          type: string
          title: Name
        slug:
          type: string
          title: Slug
        oauth_base_url_override:
          anyOf:
            - type: string
            - type: 'null'
          title: Oauth Base Url Override
        client_id:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Client Id
        client_secret:
          anyOf:
            - type: string
            - type: 'null'
          title: Client Secret
        uses_managed_credentials:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Uses Managed Credentials
        ema_enabled:
          type: boolean
          title: Ema Enabled
          default: false
        scopes:
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          title: Scopes
        organization_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Organization Id
        mcp_server_directory_id:
          type: string
          format: uuid
          title: Mcp Server Directory Id
        status:
          type: string
        meta:
          title: Meta
        tools_fetch_status:
          type: string
        tools_fetch_error:
          title: Tools Fetch Error
        tools_fetched_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Tools Fetched At
        tools_fetch_requested_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Tools Fetch Requested At
        published_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Published At
        mcp_server_directory:
          $ref: '#/components/schemas/MCPServerDirectoryBase'
        mcp_server_service_connection:
          anyOf:
            - $ref: '#/components/schemas/ServerConnectionResponse'
            - type: 'null'
        connection_status:
          anyOf:
            - $ref: '#/components/schemas/ConnectionStatus'
            - type: 'null'
        connection_error_reason:
          anyOf:
            - $ref: '#/components/schemas/ConnectionErrorReason'
            - type: 'null'
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
        proxy_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Proxy Url
        can_manage_policies:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Can Manage Policies
        attention_tier:
          anyOf:
            - $ref: '#/components/schemas/AttentionTier'
            - type: 'null'
        publish_blockers:
          anyOf:
            - items:
                $ref: '#/components/schemas/PublishBlocker'
              type: array
            - type: 'null'
          title: Publish Blockers
        cascaded_fields:
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          title: Cascaded Fields
        deleted_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Deleted At
        credential_mode:
          $ref: '#/components/schemas/CredentialMode'
          description: >-
            Where the server's OAuth client credentials come from. `managed`:
            Barndoor's managed OAuth client for this provider. `cimd`:
            Barndoor's client ID metadata document. `dcr`: a client registered
            with the provider through dynamic client registration. `manual`: a
            client ID entered by an administrator. `static_client`: a per-server
            client that was either entered by hand or registered through dynamic
            client registration by a request that did not name
            `credential_mode`, so Barndoor cannot tell which. It changes when an
            update stores a client whose source is known: managed credentials, a
            client Barndoor registers, or a new client ID sent with
            `credential_mode: manual`. `none`: the server holds no OAuth client
            (not yet configured, or its provider does not use OAuth).
        uses_cimd:
          type: boolean
          title: Uses Cimd
          description: >-
            Deprecated: use `credential_mode`. Whether this live server
            identifies itself to the provider with Barndoor's OAuth Client ID
            Metadata Document.
          default: false
          deprecated: true
        tools_count:
          type: integer
          title: Tools Count
          readOnly: true
        resources_count:
          type: integer
          title: Resources Count
          readOnly: true
      type: object
      required:
        - id
        - created_at
        - updated_at
        - enabled
        - configuration
        - name
        - slug
        - oauth_base_url_override
        - client_id
        - client_secret
        - uses_managed_credentials
        - ema_enabled
        - scopes
        - organization_id
        - mcp_server_directory_id
        - status
        - meta
        - tools_fetch_status
        - tools_fetch_error
        - tools_fetched_at
        - tools_fetch_requested_at
        - published_at
        - mcp_server_directory
        - mcp_server_service_connection
        - connection_status
        - connection_error_reason
        - url
        - proxy_url
        - can_manage_policies
        - attention_tier
        - publish_blockers
        - cascaded_fields
        - deleted_at
        - credential_mode
        - uses_cimd
        - tools_count
        - resources_count
      title: ServerResponse
      description: |-
        Response model for MCP server with computed fields.

        This model includes both database fields and computed fields like
        connection_status, url, and proxy_url that are added at runtime.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MCPServerDirectoryBase:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        runtime:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Runtime
        configuration_schema:
          additionalProperties: true
          type: object
          title: Configuration Schema
        tool_manifest:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Tool Manifest
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        icon:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon
        slug:
          anyOf:
            - type: string
            - type: 'null'
          title: Slug
        organization_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Organization Id
        url:
          type: string
          title: Url
        protocol:
          $ref: '#/components/schemas/Protocol'
          default: mcp
        source:
          $ref: '#/components/schemas/ServerSource'
          default: barndoor
        provider:
          type: string
          title: Provider
          description: The provider name to use when registering with OpenBao
          default: custom
        provider_options:
          title: Provider Options
        scopes:
          items:
            type: string
          type: array
          title: Scopes
        oauth_metadata:
          additionalProperties: true
          type: object
          title: Oauth Metadata
        protected_resource_metadata:
          additionalProperties: true
          type: object
          title: Protected Resource Metadata
        allow_oauth_override:
          type: boolean
          title: Allow Oauth Override
          default: false
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
        auth_params:
          title: Auth Params
        credential_schema:
          title: Credential Schema
        public:
          type: boolean
          title: Public
          default: false
        requires_auth:
          type: boolean
          title: Requires Auth
          default: false
        requires_auth_observed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Requires Auth Observed At
          description: >-
            When requires_auth was last observed. NULL = not observed since the
            last URL change.
      type: object
      required:
        - id
        - created_at
        - updated_at
        - runtime
        - configuration_schema
        - tool_manifest
        - name
        - description
        - icon
        - slug
        - organization_id
        - url
        - protocol
        - source
        - provider
        - provider_options
        - scopes
        - oauth_metadata
        - protected_resource_metadata
        - allow_oauth_override
        - meta
        - auth_params
        - credential_schema
        - public
        - requires_auth
        - requires_auth_observed_at
      title: MCPServerDirectoryBase
    ServerConnectionResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        mcp_server_id:
          type: string
          format: uuid
          title: Mcp Server Id
        user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: User Id
        application_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Application Id
        status:
          type: string
          title: Status
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
        created_at:
          type: string
          format: date-time
          title: Created At
        connected_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Connected At
        last_accessed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Accessed At
        connected_by_user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Connected By User Id
        account_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Account Email
        error_reason:
          anyOf:
            - $ref: '#/components/schemas/ConnectionErrorReason'
            - type: 'null'
      type: object
      required:
        - id
        - mcp_server_id
        - status
        - created_at
      title: ServerConnectionResponse
      description: Public service-connection shape exposed from server endpoints.
    ConnectionStatus:
      type: string
      enum:
        - pending
        - connected
        - available
        - error
      title: ConnectionStatus
      description: |-
        Connection status values for MCP servers.

        These values represent the computed connection status of a server
        from the user's perspective, taking into account server configuration,
        Bao registration, and user connections.
    ConnectionErrorReason:
      type: string
      enum:
        - authorization_not_completed
        - authorization_denied
        - reauthorization_required
        - other
      title: ConnectionErrorReason
      description: >-
        Why a connection is in ``error``, as a code safe to show its owner.


        It is derived from ``error_message``, which can hold an arbitrary
        exception

        string and is never shown in its place.
    AttentionTier:
      type: string
      enum:
        - pending_publish
        - connection_error
        - pending_credentials
        - pending_connection
        - available
      title: AttentionTier
      description: >-
        BCP-3815 — API vocabulary for the :func:`attention_rank_expr` tiers.


        Emitted as ``attention_tier`` on server read payloads so the client
        badges a

        server from the same CASE that filters (``availability_filter_expr``),
        sorts

        (``order_by=attention``) and counts (``/servers/summary``) it — one

        classification, declared once, instead of a second hand-written copy in

        TypeScript that could drift with every suite green.
    PublishBlocker:
      type: string
      enum:
        - not_operationally_available
        - no_active_policy
      title: PublishBlocker
      description: >-
        BCP-3815 — why ``POST /servers/{id}/publish`` would currently 422.


        One value per gate the publish route enforces, in the order it checks
        them.
    CredentialMode:
      type: string
      enum:
        - managed
        - cimd
        - dcr
        - manual
        - static_client
        - none
      title: CredentialMode
      description: >-
        Where a server's OAuth client credentials come from.


        `static_client`: a per-server client that was either entered by hand or

        dynamically registered, written by a request that did not name the mode,
        so

        the row cannot tell which. `none`: the row holds no OAuth client (a
        pending

        server, a non-OAuth directory, or a local-provider install).
    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
    Protocol:
      type: string
      enum:
        - mcp
        - sse
      title: Protocol
      description: Protocol enum for MCP server communication.
    ServerSource:
      type: string
      enum:
        - barndoor
        - third_party
        - internal
        - custom_third_party
        - custom_internal
        - local
        - embedded
      title: ServerSource
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      description: >-
        A Barndoor API key, sent as `Authorization: Bearer <key>`. Keys are
        prefixed `bdai_` and are opaque — do not attempt to decode one.
        Interchangeable with an OAuth 2.0 access token.
    OAuth2:
      type: oauth2
      x-issuer: https://auth.barndoor.ai/realms/barndoor
      description: >-
        An OAuth 2.0 access token from Barndoor's identity provider, sent as
        `Authorization: Bearer <token>`. Public clients must use PKCE.
        Interchangeable with an API key.
      flows:
        authorizationCode:
          authorizationUrl: >-
            https://auth.barndoor.ai/realms/barndoor/protocol/openid-connect/auth
          tokenUrl: >-
            https://auth.barndoor.ai/realms/barndoor/protocol/openid-connect/token
          scopes:
            openid: Issue an OIDC ID token identifying the caller.
            profile: Read the caller's basic profile claims.
            email: Read the caller's email address.
            offline_access: Issue a refresh token. Optional — no operation requires it.
        clientCredentials:
          tokenUrl: >-
            https://auth.barndoor.ai/realms/barndoor/protocol/openid-connect/token
          scopes:
            openid: Issue an OIDC ID token identifying the caller.
            profile: Read the caller's basic profile claims.
            email: Read the caller's email address.
            offline_access: Issue a refresh token. Optional — no operation requires it.

````

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