Skip to content

docs(mcp): add guide for exposing an agent as an MCP server#1981

Open
Cnashn wants to merge 1 commit into
google:mainfrom
Cnashn:docs-expose-agent-as-mcp-server
Open

docs(mcp): add guide for exposing an agent as an MCP server#1981
Cnashn wants to merge 1 commit into
google:mainfrom
Cnashn:docs-expose-agent-as-mcp-server

Conversation

@Cnashn

@Cnashn Cnashn commented Jul 20, 2026

Copy link
Copy Markdown

What

Adds a documentation page, "Expose an ADK agent as an MCP server", covering the to_mcp_server function, and wires it into the MCP section of the site navigation.

Why

to_mcp_server is the MCP counterpart of to_a2a: it turns a whole ADK agent into a standard MCP server so hosts like Claude Code or an IDE can drive it as a single tool. The A2A twin already has a full "exposing" quickstart on the site, but there was no page for to_mcp_server, so the feature was effectively undocumented for users who look at the docs site rather than the source tree.

This addresses google/adk-python#6417 ("No proper documentation for agent to mcp with release 2.5.0").

Details

  • New page: docs/mcp/expose-agent-as-mcp-server.md.
  • One nav entry under MCP in mkdocs.yml.
  • Content is grounded in the actual signature to_mcp_server(agent, *, name=None, instructions=None, runner=None) -> FastMCP and mirrors the existing in-repo guide at google/adk-python:docs/guides/tools/mcp_tool/agent_to_mcp/index.md. It covers a runnable stdio example, how it works (Runner-backed handler, progress notifications, content mapping), session continuity, the configuration options, serving over streamable-http, and the current limitations.
  • Cross-section links use the site's directory-URL style, matching the surrounding pages.

I do not have mkdocs installed locally, so I validated link targets and the nav entry by hand and am relying on CI for the strict build.

@netlify

netlify Bot commented Jul 20, 2026

Copy link
Copy Markdown

Deploy Preview for adk-docs-preview ready!

Name Link
🔨 Latest commit 40c52e7
🔍 Latest deploy log https://app.netlify.com/projects/adk-docs-preview/deploys/6a5dec466c2d5b0008303fb1
😎 Deploy Preview https://deploy-preview-1981--adk-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant