MCP servers give the agent tools hosted outside the project. Declare each server in YAML, choose which of its tools the agent may call, and keep the connection settings under version control like any other resource.
Location
mcp_servers key. The file is optional; omit it if the agent uses no MCP servers.
What an MCP server contains
Each entry is one server the agent connects to: where it is, how to authenticate, and which of its tools the agent may call.Fields
Authentication
auth uses one of three methods:
secret_name and client_secret_name are the names of secrets stored in Agent Studio. The secret values are never pulled to or pushed from your machine. A secret is sent as the whole header or parameter value, so for a bearer token store Bearer <token> as the secret.
Example
Tool discovery state stays on the platformAgent Studio records when it last listed a server’s tools and how many it found. That state isn’t written to
mcp.yaml, and pushing a change to a server keeps it as it is.Saved profiles aren’t syncedAgent Studio keeps a saved profile for a disconnected provider so it can be reconnected. Profiles hold the same settings as a server, so the ADK doesn’t sync them. Disconnecting a server in Agent Studio removes it from
mcp_servers on the next pull.Validation
provider_idandurlare required, andurlmust be anhttp(s)://URL.provider_idmust be unique withinmcp_servers.authsets only one ofheader,query_paramandoauth.headerandquery_paramneedsecret_name, andsecret_nameneeds one of them.oauthneedsclient_id,client_secret_nameandtoken_url, andtoken_urlmust be anhttp(s)://URL.timeout, if set, is between 1 and 30.enabled_functionsentries must be text, non-empty and unique.
Best practices
- list the tools the agent needs in
enabled_functionsrather than enabling everything, so a server adding a tool doesn’t change what the agent can do - keep credentials in Agent Studio secrets and refer to them by name; never put a token in the URL
Related pages
API integrations
Define plain HTTP APIs the agent calls from functions and flows.
Functions
Write Python tools when an operation needs custom logic.

