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

# Get App Config

> Get aggregated app configuration including CSP policies from all templates.

This endpoint aggregates CSP configuration from all templates associated with the
app's APIs and MCPs. For agents, it collects CSP from templates for all APIs in
agent_info.apis and APIs from agent_info.mcps. For MCP servers, it collects CSP
from templates for the single api_name.

Args:
    genai_app: The name of the GenAI app
    app_type: The type of app ('agent' or 'mcp')

Returns:
    AppConfigResponse with aggregated CSP configuration and template count



## OpenAPI

````yaml get /api/mcp/appconfig
openapi: 3.1.0
info:
  title: Apigene
  description: Apigene API
  version: 1.0.0
  contact:
    name: Apigene Support
    url: https://app.apigene.ai
    email: support@apigene.ai
servers:
  - url: https://app.apigene.ai
security:
  - BearerAuth: []
paths:
  /api/mcp/appconfig:
    get:
      tags:
        - MCP
      summary: Get App Config
      description: >-
        Get aggregated app configuration including CSP policies from all
        templates.


        This endpoint aggregates CSP configuration from all templates associated
        with the

        app's APIs and MCPs. For agents, it collects CSP from templates for all
        APIs in

        agent_info.apis and APIs from agent_info.mcps. For MCP servers, it
        collects CSP

        from templates for the single api_name.


        Args:
            genai_app: The name of the GenAI app
            app_type: The type of app ('agent' or 'mcp')

        Returns:
            AppConfigResponse with aggregated CSP configuration and template count
      operationId: mcp_appconfig
      parameters:
        - name: genai_app
          in: query
          required: true
          schema:
            type: string
            description: The name of the GenAI app.
            title: Genai App
          description: The name of the GenAI app.
        - name: app_type
          in: query
          required: false
          schema:
            type: string
            description: The type of the app ('agent' or 'mcp').
            default: agent
            title: App Type
          description: The type of the app ('agent' or 'mcp').
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppConfigResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    AppConfigResponse:
      properties:
        csp:
          $ref: '#/components/schemas/AggregatedCSPConfig'
          description: Aggregated CSP configuration
        template_count:
          type: integer
          title: Template Count
          description: Total number of templates found
        mcp_tools_settings:
          additionalProperties:
            type: string
          type: object
          title: Mcp Tools Settings
          description: >-
            Agent only: tool name -> "enabled" or "disabled". Empty for
            app_type=mcp.
      type: object
      required:
        - csp
        - template_count
      title: AppConfigResponse
      description: >-
        Response model for app configuration including aggregated CSP and
        template count.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AggregatedCSPConfig:
      properties:
        resourceDomains:
          items:
            type: string
          type: array
          title: Resourcedomains
          description: >-
            Origins for static resources (images, scripts, stylesheets, fonts,
            media)
        connectDomains:
          items:
            type: string
          type: array
          title: Connectdomains
          description: Origins for network requests (fetch/XHR/WebSocket)
        frameDomains:
          items:
            type: string
          type: array
          title: Framedomains
          description: Origins for nested iframes
        baseUriDomains:
          items:
            type: string
          type: array
          title: Baseuridomains
          description: Allowed base URIs for the document
      type: object
      title: AggregatedCSPConfig
      description: >-
        Aggregated CSP configuration from all templates associated with
        agent/MCP apps.
    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:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT Authorization header using the Bearer scheme. Example:
        'Authorization: Bearer {token}'

````