Skip to content

How to get database/Redis connection URLs via MCP? (or feature request if not currently possible) #7

@earino

Description

@earino

Hey Render team!

I'm working on deploying a Rails 8 application using the Render MCP, and I've hit a snag that I'm hoping you can help with.

What I'm trying to do

I'm automating the deployment of a Rails app that needs to connect to both a Postgres database and a Redis instance. I can successfully create all three services using the MCP:

  • Postgres database via create_postgres
  • Redis instance via create_key_value
  • Web service via create_web_service

But now I need to connect the web service to the database and Redis by setting DATABASE_URL and REDIS_URL environment variables.

The problem

When I use get_postgres and get_key_value, I get back useful metadata (id, name, region, status, etc.), but I don't see the actual connection URLs (internal or external connection strings) that I need to set as environment variables.

What I've learned

I can see from your Blueprint documentation that connection strings are available via the connectionString property:

  envVars:
    - key: DATABASE_URL
      fromDatabase:
        name: mysite-db
        property: connectionString

And I know from your docs that both internal and external URLs exist:

  • Internal: postgresql://USER:PASSWORD@INTERNAL_HOST:PORT/DATABASE
  • External: postgresql://USER:PASSWORD@EXTERNAL_HOST:PORT/DATABASE

My questions

  1. Am I approaching this wrong? Is there a better way to programmatically link services via the MCP that I'm missing?
  2. If not, would it be possible to include connection URLs in the responses from get_postgres and get_key_value? This would enable fully automated deployments without requiring manual dashboard configuration.

I really appreciate all the work you've put into the MCP - it's been super helpful so far! Just want to make sure I'm using it the right way before requesting a feature that might not be needed.

Thanks for any guidance you can provide!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions