A Model Context Protocol (MCP) server 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 and set up authentication before use. For more information about using Google and Google Cloud remote MCP servers, see Google Cloud MCP servers overview.
Server Endpoints
An MCP service endpoint is the network address (typically a URL) used by an AI application (the Host for the MCP client) to establish a secure, standardized connection with an MCP server. This endpoint serves as the point of contact for Large Language Models (LLMs) to request context, call tools, or access resources.
The MCP server exclusively supports MCP traffic via Regional Endpoints (REP). The global endpoint apihub.googleapis.com is not supported for MCP requests. You must use an endpoint with the format: https://apihub.REGION.rep.googleapis.com/mcp. Here, REGION represents a supported API hub region. For example, https://apihub.us-east1.rep.googleapis.com/mcp.
Regional Endpoints, and by extension MCP, are only available in the following nine regions:
asia-east1asia-south1asia-southeast1europe-north1europe-west1europe-west9us-central1us-east1us-west1
MCP cannot be used in an unsupported region. To request support for additional regions, contact Google Cloud Customer Care.
MCP Tools
An MCP tool 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.
The apihub.googleapis.com MCP server has the following tools:
| MCP Tools | |
|---|---|
| search_resources | Search resources in API hub |
| get_api | Get API resource details. |
| list_apis | List API resources in the API hub. |
| get_version | Get details about the API version of an API resource. |
| list_versions | List API versions of an API resource in the API hub. |
| get_spec | Get details about the information parsed from a spec. |
| get_spec_contents | Get spec contents. |
| list_specs | List specs corresponding to a particular API resource. |
| get_api_operation | Get details about a particular operation in API version. |
| list_api_operations | List operations in an API version. |
| get_deployment | Get details about a deployment and the API versions linked to it. |
| list_deployments | List deployment resources in the API hub. |
| get_attribute | Get details about the attribute. |
| list_attributes | List all attributes. |
| get_dependency | Get details about a dependency resource in the API hub. |
| list_dependencies | List dependencies based on the provided filter and pagination parameters. |
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 |
|---|
curl --location 'https://apihub.REGION.rep.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/list", "jsonrpc": "2.0", "id": 1 }' |
Where, REGION is the supported API hub region. For more information, see Supported regions.