The [Model Context Protocol](https://modelcontextprotocol.io/docs/getting-started/intro)
(MCP) standardizes how AI applications and agents connect to outside data
sources. MCP servers can be local or remote. Local MCP servers typically run on
your local machine and use the standard input and output streams (stdio) for
communication between services on the same device. Remote MCP servers run on the
service's infrastructure and offer an HTTP endpoint to AI applications for
communication between the AI MCP client and the MCP server.

For more information, see [MCP architecture](https://modelcontextprotocol.io/docs/learn/architecture).

AlloyDB for PostgreSQL supports two remote servers for usage with MCP:

- **AlloyDB server**:
  Provides tools for managing AlloyDB clusters and instances,
  and executing SQL queries.

  - Learn how to [Use the AlloyDB MCP server](https://docs.cloud.google.com/alloydb/docs/ai/use-alloydb-mcp).
  - View the detailed [AlloyDB MCP tool reference](https://docs.cloud.google.com/alloydb/docs/reference/mcp/alloydb/mcp).
- **Database Insights server**:
  Provides tools for querying and analyzing database performance and system
  metrics.

  - Learn how to [Use the Database Insights MCP server](https://docs.cloud.google.com/alloydb/docs/ai/use-database-insights-mcp).
  - View the detailed [Database Insights MCP tool reference](https://docs.cloud.google.com/alloydb/docs/reference/mcp/databaseinsights/mcp).