> ## 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 Server by Id

> Get detailed information about a specific MCP server.
Returns extended information including MCP URL if available.




## OpenAPI

````yaml GET /api/servers/{server_id}
openapi: 3.1.0
info:
  title: Barndoor Platform API
  version: 1.0.0
  description: >
    REST API for the Barndoor Platform - manage MCP servers, OAuth connections,
    and proxy MCP requests.


    ## Authentication


    All endpoints require a JWT Bearer token obtained through Barndoor's

    OAuth 2.0 authorization-code flow with PKCE. The SDK handles the OAuth

    flow automatically using interactive login.


    ## MCP Integration


    The `/mcp/{mcp_server_name}` endpoints provide streaming proxy access to
    third-party MCP servers

    (Salesforce, Notion, Slack, etc.) with automatic authentication and session
    management.
  contact:
    name: Barndoor Support
    url: https://barndoor.ai
servers:
  - url: https://{organization_id}.platform.barndoor.ai
    description: Trial (Production)
    variables:
      organization_id:
        description: Your organization identifier
        default: your-org
  - url: https://{organization_id}.platform.barndoor.ai
    description: Enterprise (Production)
    variables:
      organization_id:
        description: Your organization identifier
        default: your-org
  - url: https://{organization_id}.platform.barndooruat.com
    description: Enterprise (Production)
    variables:
      organization_id:
        description: Your organization identifier
        default: your-org
  - url: https://{organization_id}.platform.barndoordev.com
    description: Enterprise (Production)
    variables:
      organization_id:
        description: Your organization identifier
        default: your-org
security:
  - BearerAuth: []
tags:
  - name: Servers
    description: Manage MCP server instances
  - name: Connections
    description: Manage OAuth connections to MCP servers
  - name: Policies
    description: Manage access control policies for agents and servers
  - name: Agents
    description: Manage AI agent registrations
  - name: MCP Proxy
    description: Proxy requests to MCP servers
  - name: Identity
    description: Retrieve identity information for the authenticated user
paths:
  /api/servers/{server_id}:
    get:
      tags:
        - Servers
      summary: Get server details
      description: |
        Get detailed information about a specific MCP server.
        Returns extended information including MCP URL if available.
      operationId: getServer
      parameters:
        - name: server_id
          in: path
          required: true
          description: Server UUID
          schema:
            type: string
            format: uuid
          example: 123e4567-e89b-12d3-a456-426614174000
      responses:
        '200':
          description: Server details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerDetail'
        '401':
          description: Unauthorized - invalid or missing JWT token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Server not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ServerDetail:
      allOf:
        - $ref: '#/components/schemas/ServerSummary'
        - type: object
          properties:
            url:
              type: string
              format: uri
              nullable: true
              description: MCP base URL from the server directory
              example: https://api.salesforce.com/mcp
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
          description: Error type identifier
          example: ServerNotFound
        message:
          type: string
          description: Human-readable error message
          example: Server with ID '123' not found
        details:
          type: object
          description: Additional error details
          additionalProperties: true
    ServerSummary:
      type: object
      required:
        - id
        - name
        - slug
        - connection_status
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the server
          example: 123e4567-e89b-12d3-a456-426614174000
        name:
          type: string
          description: Human-readable name of the server
          example: Salesforce Production
        slug:
          type: string
          description: URL-friendly identifier used in API paths
          pattern: ^[a-z0-9-]+$
          example: salesforce
        provider:
          type: string
          nullable: true
          description: Third-party provider name
          example: salesforce
        connection_status:
          type: string
          enum:
            - available
            - pending
            - connected
            - error
          description: |
            Current connection status:
            - `available`: Server is available but not connected
            - `pending`: Connection is in progress or credentials missing
            - `connected`: Server is connected and ready to use
            - `error`: Connection failed or encountered an error
          example: connected
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        JWT token obtained through Barndoor's OAuth 2.0 authorization-code

        flow with PKCE.


        The token should be included in the Authorization header:

        `Authorization: Bearer <your-jwt-token>`


        Use the Barndoor SDK's `loginInteractive()` function to obtain tokens
        automatically.

````