MCP server for Firebase SQL Connect (formerly Firebase Data Connect) that provides tools for managing Firebase SQL connect resources.

A [Model Context Protocol (MCP) server](https://modelcontextprotocol.io/docs/learn/server-concepts) acts as a proxy between an external service that provides context, data, or capabilities to a Large Language Model (LLM) or AI application. MCP servers connect AI applications to external systems such as databases and web services, translating their responses into a format that the AI application can understand.

### Server Setup


You must [enable MCP servers](https://docs.cloud.google.com/mcp/enable-disable-mcp-servers) and [set up authentication](https://docs.cloud.google.com/mcp/authenticate-mcp) before use. For more information about using Google and Google Cloud remote MCP servers, see [Google Cloud MCP servers overview](https://docs.cloud.google.com/mcp/overview).

### Server Endpoints

An MCP service endpoint is the network address and communication interface (usually a URL) of the MCP server that an AI application (the Host for the MCP client) uses to establish a secure, standardized connection. It is the point of contact for the LLM to request context, call a tool, or access a resource. Google MCP endpoints can be global or regional.

The Firebase SQL Connect API MCP server has the following global MCP endpoint:

- https://firebasedataconnect.googleapis.com/mcp

## MCP Tools

An [MCP tool](https://modelcontextprotocol.io/legacy/concepts/tools) is a function or executable capability that an MCP server exposes to a LLM or AI application to perform an action in the real world.

### Tools

The firebasedataconnect.googleapis.com MCP server has the following tools:

| MCP Tools ||
|---|---|
| `https://firebase.google.com/docs/reference/sql-connect/mcp/tools_list/update_service` | Updates the parameters of a single SQL Connect Service instance. Allows modifying service metadata, labels, and other configurations of the managed backend component. **When to use it:** - Use this tool to modify configurations of an existing Service instance (such as display name, labels, or annotations). **How to use it:** - Call `update_service` with `projectId`, `location`, `serviceId` to identify the service, and provide the fields you want to update (e.g. `displayName`, `labels`, `annotations`). - Provide an `updateMask` specifying which fields to overwrite. - This is an asynchronous operation and returns a long-running operation. - You MUST use the `get_operation` tool with the returned operation name to poll for completion. **JSON Example:** { "projectId": "my-project", "location": "us-central1", "serviceId": "my-service", "displayName": "Production Service", "labels": { "env": "production" }, "updateMask": "displayName,labels" } |
| `https://firebase.google.com/docs/reference/sql-connect/mcp/tools_list/delete_service` | Deletes a single SQL Connect Service instance. Deleting a service instance will remove the managed backend component, including its associated schemas and connectors. It does NOT delete the underlying databases. **When to use it:** - Use this tool to permanently remove a Service instance. **How to use it:** - Call `delete_service` with `projectId`, `location`, `serviceId` to identify the service. - Set `force` to true if you want to delete the service and all its child resources (schemas, connectors). If `force` is false or unset, the deletion will fail if child resources exist. - This is an asynchronous operation and returns a long-running operation. - You MUST use the `get_operation` tool with the returned operation name to poll for completion. **JSON Example:** { "projectId": "my-project", "location": "us-central1", "serviceId": "my-service", "force": true } |
| `https://firebase.google.com/docs/reference/sql-connect/mcp/tools_list/get_service` | Gets details of a single SQL Connect Service instance. Retrieves the configuration and status of the managed backend component. **When to use it:** - Use this tool to retrieve the current state, configuration, and status of a specific Service instance. **How to use it:** - Call `get_service` with `projectId`, `location`, and `serviceId`. **JSON Example:** { "projectId": "my-project", "location": "us-central1", "serviceId": "my-service" } |
| `https://firebase.google.com/docs/reference/sql-connect/mcp/tools_list/list_services` | Lists SQL Connect Service instances in a given project and location. **When to use it:** - Use this tool to retrieve a list of SQL Connect Service instances within a specific project. **How to use it:** - Call `list_services` with `projectId` and an optional `location`. If `location` is omitted or set to "-", it lists services across all locations. Use `list_locations` to see all supported locations. - Supports pagination with `pageSize` and `pageToken`. By not providing `pageSize`, it returns as many services as the server can pack into a single response. But you must still use `pageToken` to get the next page of results. - Supports filtering with `filter` and ordering with `orderBy`. - The returned service name contains the project, location, and service name, which can be used to call other tools. Ex. with `projectId=my-project`, `location=us-central1`, and `serviceId=my-service`, the returned service name would be `projects/my-project/locations/us-central1/services/my-service` **JSON Example:** { "projectId": "my-project", "pageSize": 10 } |
| `https://firebase.google.com/docs/reference/sql-connect/mcp/tools_list/list_locations` | Lists information about the supported locations. **When to use it:** - Use this tool to discover which Google Cloud regions are supported by Firebase SQL Connect for your project. **How to use it:** - Call `list_locations` with the `name` parameter set to the project resource name (e.g., `projects/my-project`). - Supports pagination with `pageSize` and `pageToken`. By not providing `pageSize`, it returns as many locations as the server can pack into a single response. But you must still use `pageToken` to get the next page of locations. - Supports filtering with `filter`. **JSON Example:** { "name": "projects/my-project", "pageSize": 10 } |
| `https://firebase.google.com/docs/reference/sql-connect/mcp/tools_list/get_operation` | Gets the latest state of a long-running operation. **When to use it:** - Use this tool to poll the status of an asynchronous task (like updating or deleting a service) until it completes. **How to use it:** - Call `get_operation` with the resource `name` of the operation. - Check the `done` field in the response. If true, the operation is complete. **JSON Example:** { "name": "projects/my-project/locations/us-central1/operations/my-operation" } |
| `https://firebase.google.com/docs/reference/sql-connect/mcp/tools_list/execute_graphql` | Executes any GraphQL query or mutation against a Firebase SQL Connect Service instance. Grants full read and write access to the connected data sources. **When to use it:** - Use this tool to execute arbitrary GraphQL queries or mutations against your SQL Connect schema (e.g. inserting, updating, deleting data, or complex reads). **How to use it:** - Call `execute_graphql` with `projectId`, `location`, `serviceId` to identify the service, and provide the GraphQL `query` string. - Optionally provide `variables`, `operationName`, and `extensions`. **JSON Example:** { "projectId": "my-project", "location": "us-central1", "serviceId": "my-service", "query": "mutation CreateUser($name: String!) { createUser(data: {name: $name}) { id } }", "variables": { "name": "Alice" } } |
| `https://firebase.google.com/docs/reference/sql-connect/mcp/tools_list/execute_graphql_read` | Executes a read-only GraphQL query against a Firebase SQL Connect Service instance. Grants read access to the connected data sources. Identical to `execute_graphql` except it only accepts read-only queries. **When to use it:** - Use this tool to execute read-only GraphQL queries (fetching records, filtering, listing data). **How to use it:** - Call `execute_graphql_read` with `projectId`, `location`, `serviceId` to identify the service, and provide the GraphQL `query` string. - Optionally provide `variables`, `operationName`, and `extensions`. **JSON Example:** { "projectId": "my-project", "location": "us-central1", "serviceId": "my-service", "query": "query GetUser($id: UUID!) { user(id: $id) { name } }", "variables": { "id": "123e4567-e89b-12d3-a456-426614174000" } } |
| `https://firebase.google.com/docs/reference/sql-connect/mcp/tools_list/generate_query` | Generates a GraphQL query based on a natural language prompt and an existing deployed service schema. **When to use it:** - Use this tool to generate GraphQL queries against an existing deployed Firebase Data Connect service schema. **How to use it:** - Call `generate_query` with `projectId`, `location`, `serviceId`, and `prompt`. **JSON Example:** { "projectId": "my-project", "location": "us-central1", "serviceId": "my-service", "prompt": "List all movies in the Action genre" } |
| `https://firebase.google.com/docs/reference/sql-connect/mcp/tools_list/generate_query_from_schema` | Generates a GraphQL query based on a natural language prompt and a user-provided local GraphQL schema. **When to use it:** - Use this tool to generate GraphQL queries using a local GraphQL schema string without requiring a deployed service. **How to use it:** - Call `generate_query_from_schema` with `projectId`, `location`, `schema` (GraphQL SDL content string), and `prompt`. - Use `list_locations` to find a valid location for `location` (any location works; choosing a closer region reduces latency). **JSON Example:** { "projectId": "my-project", "location": "us-central1", "schema": "type Movie @table { title: String! genre: String }", "prompt": "List all movies in the Action genre" } |
| `https://firebase.google.com/docs/reference/sql-connect/mcp/tools_list/generate_schema` | Generates a GraphQL schema based on a natural language prompt or data description. **When to use it:** - Use this tool to scaffold new GraphQL schema types and tables using natural language prompts. **How to use it:** - Call `generate_schema` with `projectId`, `location`, and `prompt`. - Use `list_locations` to find a valid location for `location` (any location works; choosing a closer region reduces latency). **JSON Example:** { "projectId": "my-project", "location": "us-central1", "prompt": "Create a blog schema with Users, Posts, and Comments" } |

### Get MCP tool specifications


To get the MCP tool specifications for all tools in an MCP server, use the `tools/list` method. The following example demonstrates how to use `curl` to list all tools and their specifications currently available within the MCP server.

| Curl Request |
|---|
| ```bash curl --location 'https://firebasedataconnect.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/list", "jsonrpc": "2.0", "id": 1 }' ``` |