Tradeshift MCP Server

Production Model Context Protocol server that exposes Tradeshift platform capability to AI agents, described by Tradeshift as 95 tools across six domains (core services, supplier network, documents, company data, the Business Firewall, and the AskAda AI assistant / Ada AI document intelligence layer). Built on FastAPI with stdio and HTTP+SSE transports, OAuth 2.0 client-credentials with per-domain scopes, tenant isolation, and a PostgreSQL audit log of every tool execution. The MCP endpoint and the tools/list surface require authentication; anonymous discovery is limited to the RFC 8414 / RFC 9728 metadata documents and the HTTP bridge OpenAPI.

OpenAPI Specification

tradeshift-mcp-bridge-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: MCP HTTP Bridge & Management
  version: 0.1.0
paths:
  /api/admin/auth/config:
    get:
      summary: Auth Config
      description: 'Public endpoint returning Okta configuration for the frontend SPA.

        No authentication required — these are public OIDC public-client (PKCE)

        values that are necessarily exposed in the browser to begin the login flow.

        The redirect URI is intentionally NOT returned: the SPA derives it from

        its own origin, so it never needs to be served to unauthenticated callers.'
      operationId: auth_config_api_admin_auth_config_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /api/admin/me:
    get:
      summary: Admin Me
      operationId: admin_me_api_admin_me_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /api/admin/keys:
    get:
      summary: List Keys
      operationId: list_keys_api_admin_keys_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
    post:
      summary: Create Key
      operationId: create_key_api_admin_keys_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiKeyCreate'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/admin/keys/{key_id}:
    patch:
      summary: Update Key
      operationId: update_key_api_admin_keys__key_id__patch
      parameters:
      - name: key_id
        in: path
        required: true
        schema:
          type: string
          title: Key Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiKeyUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      summary: Deactivate Key
      operationId: deactivate_key_api_admin_keys__key_id__delete
      parameters:
      - name: key_id
        in: path
        required: true
        schema:
          type: string
          title: Key Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/admin/logs:
    get:
      summary: List Logs
      operationId: list_logs_api_admin_logs_get
      parameters:
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          default: 30
          title: Limit
      - name: offset
        in: query
        required: false
        schema:
          type: integer
          default: 0
          title: Offset
      - name: key_name
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Key Name
      - name: tool_name
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Tool Name
      - name: tenant_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Tenant Id
      - name: auth_type
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Auth Type
      - name: date_from
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Date From
      - name: date_to
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Date To
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/admin/action-logs:
    get:
      summary: List Admin Action Logs
      description: List admin action audit logs (who changed what on API keys and OAuth clients).
      operationId: list_admin_action_logs_api_admin_action_logs_get
      parameters:
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          default: 50
          title: Limit
      - name: offset
        in: query
        required: false
        schema:
          type: integer
          default: 0
          title: Offset
      - name: user_email
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: User Email
      - name: action
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Action
      - name: resource_type
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Resource Type
      - name: date_from
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Date From
      - name: date_to
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Date To
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/admin/oauth-clients:
    get:
      summary: List Oauth Clients
      description: List all OAuth clients.
      operationId: list_oauth_clients_api_admin_oauth_clients_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
    post:
      summary: Create Oauth Client
      description: Create new OAuth client.
      operationId: create_oauth_client_api_admin_oauth_clients_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OAuthClientCreate'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/admin/oauth-clients/{client_id}:
    patch:
      summary: Update Oauth Client
      description: Update an OAuth client's configuration.
      operationId: update_oauth_client_api_admin_oauth_clients__client_id__patch
      parameters:
      - name: client_id
        in: path
        required: true
        schema:
          type: string
          title: Client Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OAuthClientUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      summary: Deactivate Oauth Client
      description: Deactivate an OAuth client.
      operationId: deactivate_oauth_client_api_admin_oauth_clients__client_id__delete
      parameters:
      - name: client_id
        in: path
        required: true
        schema:
          type: string
          title: Client Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/admin/tenant-credentials/{tenant_id}/rotate:
    put:
      summary: Rotate Tenant Credentials
      description: Rotate OAuth1 credentials for a tenant.
      operationId: rotate_tenant_credentials_api_admin_tenant_credentials__tenant_id__rotate_put
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          title: Tenant Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TenantCredentialRotate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/admin/tenant-credentials/validate:
    post:
      summary: Validate Credentials
      description: Validate OAuth1 credentials without storing them.
      operationId: validate_credentials_api_admin_tenant_credentials_validate_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TenantCredentialValidate'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /health/live:
    get:
      summary: Liveness
      description: 'Liveness probe - checks if the application is running.

        Returns 200 if the app is alive, regardless of database connectivity.'
      operationId: liveness_health_live_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /health/ready:
    get:
      summary: Readiness
      description: 'Readiness probe - checks if the application is ready to serve traffic.

        Validates database connectivity and critical dependencies.'
      operationId: readiness_health_ready_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /tools/list:
    get:
      summary: List All Tools
      description: List all tools across allowed domains.
      operationId: list_all_tools_tools_list_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - APIKeyHeader: []
  /{category}/tools/list:
    get:
      summary: List Category Tools
      operationId: list_category_tools__category__tools_list_get
      security:
      - APIKeyHeader: []
      parameters:
      - name: category
        in: path
        required: true
        schema:
          type: string
          title: Category
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /{category}/tools/execute:
    post:
      summary: Execute Category Tool
      operationId: execute_category_tool__category__tools_execute_post
      security:
      - APIKeyHeader: []
      parameters:
      - name: category
        in: path
        required: true
        schema:
          type: string
          title: Category
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ToolExecutionRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/admin/session:
    post:
      summary: Create Session
      description: Create a UI session. Validates an Okta token (or dev-mode flag) and sets a session cookie.
      operationId: create_session_api_admin_session_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionCreate'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      summary: Destroy Session
      description: Clear the UI session cookie.
      operationId: destroy_session_api_admin_session_delete
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /{full_path}:
    get:
      summary: Serve Spa
      operationId: serve_spa__full_path__get
      parameters:
      - name: full_path
        in: path
        required: true
        schema:
          type: string
          title: Full Path
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ApiKeyCreate:
      properties:
        name:
          type: string
          title: Name
        agent_name:
          type: string
          title: Agent Name
        allowed_domains:
          items:
            type: string
          type: array
          title: Allowed Domains
        rate_limit:
          anyOf:
          - type: integer
          - type: 'null'
          title: Rate Limit
          default: 100
        tenant_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Tenant Id
        ts_consumer_key:
          anyOf:
          - type: string
          - type: 'null'
          title: Ts Consumer Key
        ts_consumer_secret:
          anyOf:
          - type: string
          - type: 'null'
          title: Ts Consumer Secret
        ts_access_token:
          anyOf:
          - type: string
          - type: 'null'
          title: Ts Access Token
        ts_token_secret:
          anyOf:
          - type: string
          - type: 'null'
          title: Ts Token Secret
      type: object
      required:
      - name
      - agent_name
      - allowed_domains
      title: ApiKeyCreate
    ApiKeyUpdate:
      properties:
        allowed_domains:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Allowed Domains
      type: object
      title: ApiKeyUpdate
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    OAuthClientCreate:
      properties:
        name:
          type: string
          title: Name
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
        allowed_domains:
          items:
            type: string
          type: array
          title: Allowed Domains
        token_lifetime:
          anyOf:
          - type: integer
          - type: 'null'
          title: Token Lifetime
          default: 3600
        tenant_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Tenant Id
        ts_consumer_key:
          anyOf:
          - type: string
          - type: 'null'
          title: Ts Consumer Key
        ts_consumer_secret:
          anyOf:
          - type: string
          - type: 'null'
          title: Ts Consumer Secret
        ts_access_token:
          anyOf:
          - type: string
          - type: 'null'
          title: Ts Access Token
        ts_token_secret:
          anyOf:
          - type: string
          - type: 'null'
          title: Ts Token Secret
      type: object
      required:
      - name
      - allowed_domains
      title: OAuthClientCreate
    OAuthClientUpdate:
      properties:
        allowed_domains:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Allowed Domains
        token_lifetime:
          anyOf:
          - type: integer
          - type: 'null'
          title: Token Lifetime
      type: object
      title: OAuthClientUpdate
    SessionCreate:
      properties:
        token:
          anyOf:
          - type: string
          - type: 'null'
          title: Token
        dev_mode:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Dev Mode
          default: false
      type: object
      title: SessionCreate
    TenantCredentialRotate:
      properties:
        ts_consumer_key:
          type: string
          title: Ts Consumer Key
        ts_consumer_secret:
          type: string
          title: Ts Consumer Secret
        ts_access_token:
          type: string
          title: Ts Access Token
        ts_token_secret:
          type: string
          title: Ts Token Secret
      type: object
      required:
      - ts_consumer_key
      - ts_consumer_secret
      - ts_access_token
      - ts_token_secret
      title: TenantCredentialRotate
    TenantCredentialValidate:
      properties:
        tenant_id:
          type: string
          title: Tenant Id
        consumer_key:
          type: string
          title: Consumer Key
        consumer_secret:
          type: string
          title: Consumer Secret
        access_token:
          type: string
          title: Access Token
        token_secret:
          type: string
          title: Token Secret
      type: object
      required:
      - tenant_id
      - consumer_key
      - consumer_secret
      - access_token
      - token_secret
      title: TenantCredentialValidate
    ToolExecutionRequest:
      properties:
        tool:
          type: string
          title: Tool
        parameters:
          additionalProperties: true
          type: object
          title: Parameters
      type: object
      required:
      - tool
      - parameters
      title: ToolExecutionRequest
    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
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key