MCP Server

The MCP (Model Context Protocol) server provides a standardized interface for AI tool integration with SD Elements.

These instructions apply to Self-Hosted deployments of SD Elements. If you are using a SaaS instance and wish to enable the MCP server, please contact our Support Team for assistance.

Installation and Deployment

Prerequisites:

  • SD Elements helm chart version 2026.3.2+1 or later

  • sde-mcp helm chart version 2026.3.2+2 or later

The sdelements helm chart includes the sde-mcp subchart which can be enabled to deploy the MCP server in the same namespace.

Update the custom values file

sde-mcp:
  enabled: true

Advanced Deployment Configuration

sde-mcp.networkPoliciesEnabled is removed and has no effect. The MCP server’s NetworkPolicy is created whenever global.networkIsolation is set, and allows traffic from every supported ingress controller by default.

For network policies, update the below values

sde-mcp:

  ## For example network policy ingress to the mcp pod
  networkPolicies:
    mcp:
      podSelector:
        matchLabels:
          name: sde-mcp
      ingress:
      - selectors:
        - namespaceSelector:
            matchLabels:
              kubernetes.io/metadata.name: ingress-nginx
          podSelector:
            matchLabels:
              app.kubernetes.io/name: ingress-nginx
        ports:
        - port: 443

For instances with self-signed certificates, it might be necessary to enable below

sde-mcp:
  mcp:
    nodeTlsRejectUnauthorized: "0"

For additional configuration see the sde-mcp Helm chart values.

Configure OAuth

Apply these steps in order. With OAuth enabled and no client secret set, the MCP server does not start.

  1. In the SD Elements values, set all three of the following. SD Elements does not start if only some are set.

    worker:
      extraEnvVars:
        - name: SDE_ENABLE_OAUTH_PROVIDER
          value: "true"
        - name: SDE_OAUTH_API_RESOURCE
          value: "https://sde.example.com/api/v2"
        - name: SDE_OAUTH_TOKEN_EXCHANGE_CLIENTS
          value: '[{"client_id": "sde-mcp", "subject_audience": "https://sde.example.com/mcp"}]'

    subject_audience must equal MCP_PUBLIC_BASE_URL exactly, with no trailing slash.

  2. Create the token exchange client once per SD Elements instance. Run this command in a worker pod. It prints client_secret once.

    python manage.py createapplication confidential client-credentials \
      --client-id sde-mcp --name "SDE MCP token exchange"

    The client is stored in the SD Elements database. Run the command again after a database restore or rebuild, and update oauthClientSecret to match.

  3. In the MCP values, set the client secret and the OAuth variables. MCP_OAUTH_CLIENT_ID must equal the --client-id used above.

    sde-mcp:
      mcp:
        useInternalSdeInstance: true
        oauthClientSecret: "<client_secret>"   # use a secret values file
      extraEnvVars:
        MCP_PUBLIC_BASE_URL: "https://sde.example.com/mcp"
        MCP_OAUTH_ENABLED: "true"
        MCP_OAUTH_REQUIRE: "true"
        MCP_OAUTH_CLIENT_ID: sde-mcp

When OAuth is enabled, requests that present an sde-api-key are rejected. Set MCP_OAUTH_ALLOW_API_KEY: "true" to accept API keys again.

Deploy the MCP Server

  1. Run helm upgrade to apply the changes.

  2. Verify that the {RELEASE_NAME}-mcp pod is in a Running status.

MCP Standalone Server

The sde-mcp chart can also deployed as a standalone MCP server in a separate namespace.

You must set exactly one of the following values to restrict which SD Elements instances the MCP server can connect to.

These two options are mutually exclusive. Setting both will cause the deployment to fail.
  1. Single Instance Mode

mcp:
  sdeInstance: "https://your-sdelements-instance.com"
  1. Allowlist Mode

mcp:
  sdeInstanceAllowlist: "https://sde.example.com,https://sde2.example.com"

Advanced Configuration

TLS Certificate Configuration

mcp:
  fqdn: "sde-mcp.example.com"

MCP Server Configuration

mcp:
  # Instance restriction (one of sdeInstance or sdeInstanceAllowlist is required - see above)
  sdeInstance: ""
  sdeInstanceAllowlist: ""

  # Allow HTTP (non-HTTPS) hosts (default: false)
  # Set to true only for local/dev environments
  allowInsecureHttp: false

  # Port the MCP server listens on (default: 3000)
  port: 3000

  # Fully Qualified Domain Name (FQDN) for TLS certificates
  # Required when cert-manager is enabled (global.certManager enabled)
  # Optional when using self-signed certificates (used if provided)
  # Example: "sde-mcp.example.com"
  fqdn: ""

  # Alternate DNS names for TLS certificates (optional)
  # Additional hostnames to include in the certificate's Subject Alternative Names (SAN)
  # Example: ["sde-mcp-alias.example.com", "sde-mcp.internal"]
  alternateDnsNames: []

Ingress Configuration

ingress:
  # Enable/disable ingress (default: true)
  enabled: true

  # Ingress controller class (e.g., "nginx", "traefik", "istio")
  className: "nginx"

  # Ingress annotations (e.g., for nginx settings)
  annotations:
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
    nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"

  # Hosts and paths to route traffic
  hosts:
    - host: sde-mcp.example.com
      paths:
        - path: /
          pathType: Prefix
          backend:
            servicePort: 3000

  # TLS configuration
  tls:
    - secretName: sde-mcp-web-server-tls-secrets
      hosts:
        - sde-mcp.example.com

Nginx Sidecar Configuration

nginx:
  # Enable/disable nginx sidecar (default: true)
  enabled: true

  # HTTPS port for nginx (default: 443)
  port: 443

  # Nginx container image
  image:
    repository: nginx
    tag: "1.25-alpine"
    pullPolicy: IfNotPresent

  # TLS secret name (auto-generated if not specified)
  # tlsSecretName: "sde-mcp-web-server-tls-secrets"

  # Client certificate verification (optional)
  # Options: "on", "optional", "off"
  # sslVerifyClient: "on"

Network Policies

networkPoliciesEnabled is removed and has no effect. The NetworkPolicy is created whenever global.networkIsolation is set.
networkPolicies:
  # Configure as needed for your environment

Deploy the MCP Server

  1. Run helm install for the first install or helm upgrade to apply the changes.

  2. Verify that the {RELEASE_NAME}-mcp pod is in a Running status.

Client Configuration

MCP client configuration is typically defined in:

  • A JSON configuration file (common for IDE extensions)

  • A configuration management tool

  • Environment variables

At minimum, the client must know:

  • Where the MCP server is running

  • Which headers to include for authentication and routing

Integrated MCP

Use this configuration if using the integrated MCP deployment.

Required Configuration:

  • MCP service URL

  • SD Elements API Key

{
  "mcpServers": {
    "sdelements": {
      "url": "https://your-sdelements-instance.com/mcp",
      "headers": {
        "sde-api-key": "your-api-key-here"
      }
    }
  }
}

Single Instance Mode

Use this configuration if MCP is deployed for a single SD Elements instance (mcp.sdeInstance enabled in the Helm chart).

Required Configuration:

  • MCP service URL

  • SD Elements API Key

{
  "mcpServers": {
    "sdelements": {
      "url": "https://sde-mcp.example.com/mcp",
      "headers": {
        "sde-api-key": "your-api-key-here"
      }
    }
  }
}

Allowlist Mode

Use this configuration if MCP supports multiple SD Elements instances (mcp.sdeInstanceAllowlist enabled).

Required Configuration:

  • MCP service URL

  • SD Elements API Key

  • SD Elements instance URL

{
  "mcpServers": {
    "sdelements": {
      "url": "https://sde-mcp.example.com/mcp",
      "headers": {
        "sde-host": "https://your-sdelements-instance.com",
        "sde-api-key": "your-api-key-here"
      }
    }
  }
}

Additional Options and Headers

In some cases, it may be necessary to include additional options and headers.

{
  "mcpServers": {
    "sde-mcp-server": {
      "url": "https://sde-mcp.example.com/mcp",
      "type": "streamableHttp",
      "transport": "https",
      "headers": {
        "Accept": "application/json, text/event-stream",
        "sde-host": "https://<your-SDE-instance.com>",
        "sde-api-key": "<your-sde-instance-token>"
      }
    }
  }
}

results matching ""

    No results matching ""