PostgreSQL for MCP Server

Configure an external PostgreSQL database for the JFrog MCP Server. PostgreSQL is bundled by default for both Helm and Docker Compose, and external setup is optional.

This page covers configuring an external PostgreSQL database for the JFrog MCP Server. PostgreSQL 17.x is bundled by default, and no database setup is required unless you want to use your own.

When using an external database, the MCP server requires its own dedicated database. The MCP server can share a PostgreSQL instance with JFrog Artifactory, but must use a separate database.

The MCP server supports PostgreSQL 17.x. If you use a cloud provider, we recommend a managed PostgreSQL service.

📘

Dedicated Database Required

The MCP server must use its own database. You can host it on the same PostgreSQL instance used by JFrog Artifactory, but the MCP server and Artifactory must each use a separate database.

Create the JFrog MCP Server PostgreSQL Database

Use the following commands to create an MCP server user and database. Modify the values to match your environment.

CREATE USER <username> WITH PASSWORD '<password>';
CREATE DATABASE <database-name> WITH OWNER=<username> ENCODING='UTF8' lc_collate='en_US.utf8' lc_ctype='en_US.utf8' template=template0;
GRANT ALL PRIVILEGES ON DATABASE <database-name> TO <username>;

After verifying the script is correct, run it to create the database, then proceed with configuration.

Enable PostgreSQL Connectivity from Remote Servers

The steps below enable remote PostgreSQL connectivity. Consult your security team before applying these settings to your environment.

  1. Add the following line to <postgres_mount>/data/pg_hba.conf:

    host  <database-name>  <username>  <cidr>  md5

    Example:

    host  <database-name>  <username>  123.456.78.90/32  md5

    Replace <cidr> with the IP address or network segment of your MCP server host.

  2. Add the following line to <postgres_mount>/data/postgresql.conf:

    listen_addresses='*'

    You can also specify a single IP address instead of '*'.

  3. Restart PostgreSQL to apply the changes.

Configure the MCP Server to Use PostgreSQL (Docker Compose)

After creating the database, update the MCP server's system.yaml to connect to it.

  1. Stop the MCP server.

  2. Edit the database connection details in the system.yaml configuration file located in $JFROG_HOME/wingman/var/etc/:

    shared:
      database:
        type: postgresql
        driver: org.postgresql.Driver
        url: "postgres://<host>:5432/<database-name>"
        username: <username>
        password: <password>
  3. Start the MCP server.

Configure the MCP Server to Use PostgreSQL (Helm Chart)

To use an external PostgreSQL database instead of the bundled instance, set postgresql.enabled: false and provide connection details under database.* in your wingman-values.yaml.

  1. Add your external database connection details:

    postgresql:
      enabled: false
    database:
      url: "postgresql://<host>:5432/<database-name>"
      username: <username>
      password: <password>

    Alternatively, store credentials in a Kubernetes secret and reference them via environment variables:

    kubectl create secret generic wingman-db-creds \
      --from-literal=db-url='postgresql://<host>:5432/<database-name>' \
      --from-literal=db-username='<username>' \
      --from-literal=db-password='<password>' \
      -n <namespace>

    Then add the following to your wingman-values.yaml:

    postgresql:
      enabled: false
    
    extraEnvironmentVariables:
      - name: JF_SHARED_DATABASE_URL
        valueFrom:
          secretKeyRef:
            name: wingman-db-creds
            key: db-url
      - name: JF_SHARED_DATABASE_USERNAME
        valueFrom:
          secretKeyRef:
            name: wingman-db-creds
            key: db-username
      - name: JF_SHARED_DATABASE_PASSWORD
        valueFrom:
          secretKeyRef:
            name: wingman-db-creds
            key: db-password
  2. Run the Helm install or upgrade command with your wingman-values.yaml file.

    For more information, see MCP Server Helm Chart Installation.

Frequently Asked Questions
Q: Can the MCP Server share a PostgreSQL instance with JFrog Artifactory?

Yes. The MCP Server can share a PostgreSQL instance with JFrog Artifactory, but each product must use a separate database.

Q: What if I don't configure an external PostgreSQL database?

PostgreSQL 17.x is bundled by default for both Helm and Docker Compose. No database setup is required unless you want to use your own external database.

Q: Does the MCP Server support PostgreSQL high availability?

Yes. You can configure external PostgreSQL for redundancy using HA, load balancing, or replication. See the PostgreSQL documentation for details.

Related Topics

🚧

JFrog MCP Server Beta

The JFrog MCP Server is in beta. Client integration details may change as the feature evolves. By using this service, you agree to the JFrog MCP Server Beta Agreement.