Skip to main content
The MCP agent is twenty lines of code that answers questions about Agno using the official docs MCP server. The docs site exposes an MCP endpoint, the agent connects to it, and the answers stay current without a local knowledge base, embeddings, or an ingest pipeline.
from agno.agent import Agent
from agno.tools.mcp import MCPTools

mcp_agent = Agent(
    id="mcp",
    name="MCP",
    model=MODEL,
    db=agent_db,
    tools=[MCPTools(url="https://docs.agno.com/mcp")],
    instructions=INSTRUCTIONS,
    add_history_to_context=True,
)
That’s the whole agent. MCPTools(url=...) wraps the MCP server’s tools so the agent can call search_docs, read_page, etc. as if they were native tools.

What MCP gives you

Model Context Protocol is a standard for exposing tools, resources, and prompts to agents. Any MCP server (stdio, SSE, or streamable-HTTP transport) can be wrapped with MCPTools:
# Hosted server (HTTP)
MCPTools(url="https://mcp.github.com/mcp")

# Local subprocess (stdio)
MCPTools(command="uvx", args=["mcp-server-time"])

# With auth
MCPTools(url="https://mcp.linear.app", headers={"Authorization": "Bearer ..."})
Tool discovery happens at connect time. The agent’s instructions get a list of available tools and their schemas. The agent calls them like any other tool.

When to use MCP vs writing a tool

SituationPick
The service already has an MCP server (Linear, GitHub, Notion, etc.)MCP
You want tool discovery to update without redeployingMCP
You’re integrating with internal systemsWrite a tool, simpler
You need fine-grained control over arguments / response shapeWrite a tool
For most third-party services, MCP wins. A @tool function is more direct for first-party data like your database or internal APIs.

See it in action

@MCP what changed in agno 2.6?
@MCP how do I add memory to an agent?
@MCP what providers does Agno support natively?
Each query triggers an MCP search_docs call against docs.agno.com/mcp. The agent reads the matching pages, synthesizes an answer, cites the source.

MCP as a context provider in Scout

The MCP agent uses MCP as a tool. Scout’s MCPContextProvider goes one step further: any MCP server becomes a registered context. Scout calls query_mcp_<slug> and a sub-agent answers from that server’s tools. Same protocol, different ergonomic layer. Source: agents/mcp/agent.py

Next

Context Providers →