# AzurePostgresFlexibleServerDatabaseResource

- Module: [Aspire.Hosting.Azure.PostgreSQL](/reference/api/go/aspire.hosting.azure.postgresql.md)
- Version: `17.0.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/2d325b13709752ba6d9a943635c5e2940a2530c0)

## Definition

```go
type AzurePostgresFlexibleServerDatabaseResource interface {
    ExpressionValue
    Resource
    ResourceWithConnectionString
    ResourceWithParent
}
```

## Embeds

- `ExpressionValue`
- `Resource`
- `ResourceWithConnectionString`
- `ResourceWithParent`

## Methods

- [WithPostgresMcp](/reference/api/go/aspire.hosting.azure.postgresql/azurepostgresflexibleserverdatabaseresource/withpostgresmcp.md) -- `method` -- Adds a Postgres MCP server container and configures it to connect to the database represented by `builder`.
  ```go
  WithPostgresMcp(options ...*WithPostgresMcpOptions) AzurePostgresFlexibleServerDatabaseResource
  ```
