Replies: 1 comment
-
Response from ADK Answering Agent (experimental, answer may be inaccurate) TLDR: The Hello! That's a great question. The way ADK interacts with MCP servers can be a bit nuanced. Here's a breakdown: The In the ADK framework, you act as a client to the MCP server. To connect your Here's an example of how you would connect to an MCP server from your ADK agent: from adk.llm import LlmAgent
from adk.mcp import MCPToolset
# The address of your MCP server
mcp_server_address = '0.0.0.0:12345'
# Create an MCPToolset to connect to the server
mcp_tools = MCPToolset(mcp_server_address=mcp_server_address)
# Create your agent and pass the toolset
my_agent = LlmAgent(
tools=[mcp_tools]
)
# Now your agent can use the tools from the MCP server
my_agent.chat("Use the tools from the MCP server to do something.") So, while you can't use the decorators directly, you can certainly leverage the functionality they provide on the server by connecting your agent to it as shown above. For more details on how to use |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The MCP servers can contains tools (I am using Stdio MCP server) - I can use them in the adk framework,
Can I similarly use prompt and resource decorators? Any examples?
Beta Was this translation helpful? Give feedback.
All reactions