IBM Project Bob

image

IBM Bob

Bob is your AI development partner, built to augment your workflow and help you work confidently with codebases from design to deployment.


#AI

#IBMBob

 View Only
  • 1.  Environment variable substitution not working in .bob/mcp.json

    Posted 03/23/26 07:57 AM
    Edited by EKU Nurmivaara 03/23/26 10:11 AM

    Hi!
    Does anyone know how to use environment variables within the .bob/mcp.json file?
    I've been testing with the format

    postgresql://${DB_USER}:${DB_PASSWORD}@<db_hostname_etc>

    but it doesn't expand them.

    Thanks,

    Santiago



    ------------------------------
    Santiago Cardoso Geller
    ------------------------------



  • 2.  RE: Environment variable substitution not working in .bob/mcp.json

    Posted 03/26/26 05:28 PM

    Hi Santiago,

    Here's the correct syntax for using env variables in the mcp.json file: ${env:VARIABLE_NAME}.

    Make sure to set your env's before starting Bob also.

    Here's an example:

    {
      "mcpServers": {
        "postgres": {
          "type": "stdio",
          "command": "npx",
          "args": [
            "-y",
            "@modelcontextprotocol/server-postgres",
            "postgresql://${env:DB_USER}:${env:DB_PASSWORD}@localhost:5432/your_database"
          ]
        }
      }
    }

    Hope that helps!

    Libby



    ------------------------------
    Libby Lavrova
    ------------------------------