Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

PostgresDatabaseResource.WithPostgresMcp

Method
📦 Aspire.Hosting.PostgreSQL v17.0.0
type PostgresDatabaseResource interface {
// ... omitted for brevity
WithPostgresMcp(options ...*WithPostgresMcpOptions) PostgresDatabaseResource
}

Signature

methodWithPostgresMcpbuilder
Adds a Postgres MCP server container and configures it to connect to the database represented by builder.
WithPostgresMcp(options ...*WithPostgresMcpOptions) PostgresDatabaseResource
options...*WithPostgresMcpOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithPostgresMcpOptions argument.

ConfigureContainerfunc(obj PostgresMcpContainerResource)callbackConfiguration callback for the Postgres MCP container resource.
ContainerName*stringThe name of the container (optional).
PostgresDatabaseResource

The resource builder.

Returns a handle; failures surface later via Err().

Defined on

This method is defined on the following type: