Skip to content
MCP & Tools

Do I need an agent or just an MCP server?

An MCP server exposes tools and context. Add an agent when you want your own model and instructions running the multi-step work behind those capabilities.

Cosette CresslerContent & Product Marketing Lead

November 15, 202611 min read

An MCP server exposes tools and context to an AI application, and the model inside that application decides which tools to call and when. An agent puts the model, the instructions and the multi-step loop under your configuration rather than the client's.

Choose an MCP server when a person in Claude or Cursor steers each step. Build your own agent when the work has to behave the same way whichever client calls in, with storage and approval checkpoints you configure. If the steps are fixed and known in advance, a workflow or a plain function is simpler than either.

Agno, an open-source framework for building agents, does both: Agno agents connect to MCP servers through MCPTools, and AgentOS, Agno's production runtime, serves them over MCP.

Most teams start the same way. They wrap their API in an MCP server, and the demo in Claude goes well. Then someone asks it to process last week's refunds, and the gap shows. The server knows how to issue a refund. Nothing in the tool schema says which refunds your policy allows, or that anything over $500 needs a manager's sign-off.

That knowledge has to sit somewhere, and if you leave it out it falls to the connecting client, which often means nowhere. There are two places to put it, and they do different jobs. Your server or payments backend enforces the limits and records the approvals; it has to, because the refund operation must reject an unauthorized request whichever client calls it. An agent sits above that, reading the request and choosing the steps with your instructions applied on every run, while the backend keeps the final say.

What is MCP?

The Model Context Protocol (MCP) is an open-source standard for connecting AI applications to external systems. An AI application such as Claude Desktop, ChatGPT, VS Code, or Cursor acts as the host. The host creates one MCP client per connection, and each client talks to an MCP server, the program that provides the context. The spec calls those three the participants.

Servers expose three primitives, and the MCP docs are explicit about who controls each one:

PrimitiveWhat it isWho controls it
ToolsFunctions the model can call, such as searching flights or sending a messageThe model
ResourcesRead-only context, such as file contents or a database schemaThe application
PromptsReusable instruction templates, such as "Plan a vacation"The user

Servers run locally over stdio or remotely over Streamable HTTP, and every message is JSON-RPC 2.0. The protocol stops at context exchange. In the docs' own words, MCP "does not dictate how AI applications use LLMs or manage the provided context."

MCP standardizes how capabilities reach an AI application. Behind them, the server can enforce business rules and keep its own storage and audit logs. An agent gives you control over the model and execution loop, and you can serve it over MCP too.

What's the difference between MCP and an API?

An MCP server usually sits in front of an API. You built your REST API for programs that already know which endpoint to call. An MCP server describes those capabilities so a model can find them and call them at runtime, from any host that speaks the protocol.

REST APIMCP server
Built forCode you write against documented endpointsModels that discover tools while they run
DiscoveryDocs and OpenAPI specs a developer readstools/list returns each tool's description and JSON Schema
Who decides what to callYour codeThe client's model
ClientsWhatever you integrateAny MCP host, from Claude Desktop to Cursor
AuthWhatever the API definesOAuth-based authorization for remote servers over HTTP; local stdio servers use credentials from the environment

In practice, the MCP server calls your existing API on the model's behalf.

What does an MCP server leave to the client?

When a server exposes individual tools, the host's model usually decides which to call and in what order. Hosts can provide tool pickers, approval dialogs, permission settings, and activity logs. The server can also validate requests and require authorization before executing them.

MCP itself provides none of the following. Each one is yours to place, in the server or in an agent behind it:

  • Instructions. The host can supply instructions and user-selected prompts. Your server can enforce business rules in code or expose an agent with its own standing instructions.
  • Memory. A server can authenticate users and persist their information. MCP doesn't define your application's cross-session memory behavior.
  • Multi-step judgment. For individual tools, the plan usually comes from the connected host's model. A server can instead delegate a task to its own agent or workflow.
  • Approvals. A host confirmation dialog is specific to that host. Your application's execution path must also enforce required approvals, with checks on who may approve.
  • State and audit. The host and server can each store state and logs. MCP doesn't automatically provide application run records or traces.

Back to the refunds: the MCP server can issue one, but deciding which refunds your policy allows, and sending anything over $500 to a manager, has to live in your backend or in an agent.

What does an agent add on top of MCP tools?

An agent owns the loop. It brings a model and instructions you choose and can use storage you configure. MCP servers become one source of tools among many. You can also build each capability below behind an MCP server without an agent. With an agent, you get them together, configured in one place.

ConcernMCP server aloneAgno agent using MCP tools
InstructionsHost instructions and prompts; server-side rules can be enforced in codeinstructions= applied on every run
MemoryHost memory or storage implemented by the serverdb= with update_memory_on_run=True for user memories and add_history_to_context=True for session history
Multi-step judgmentUsually the client model's loop; the server may delegate to its own agent or workflowThe agent's own model and tool loop, across tools from several servers
ApprovalsHost dialogs and any approval checks implemented by the serverrequires_confirmation_tools= pauses the run; application authorization determines who may approve
StateHost sessions or state persisted by the serverSessions and session_state persisted in your database
ObservabilityHost logs and any server-side logging or tracingRun records and metrics in your database; execution traces when AgentOS tracing is enabled

The docs cover agent memory, MCP tool confirmation and AgentOS tracing in full.

When is an MCP server enough, and when do you need an agent?

Ask who should own the execution loop. An existing host's agent plus your MCP server covers a lot of ground. Build your own agent when every client that calls in should get the same model, instructions, tools and multi-step behavior. That centralizes configuration and control, though it won't make model outputs identical run to run. Scheduling, storage, policy enforcement and auditing stay ordinary backend work either way, and an agent gives you one place to apply them consistently.

SituationChooseStill needed
A developer in Cursor or Claude Code wants to query your service while they workMCP serverNone
Each task is one or two tool calls the user reads before acting onMCP serverNone
You want your product to show up in any MCP client with minimal workMCP serverNone
The task interprets a business policy and picks its own stepsAgentHard limits enforced in backend code
It has to remember a user or account across sessionsAgentPersistent storage and a verified identity
Some actions need sign-off whichever client triggered themAgentApproval enforced in the execution path, with authorized approvers
It runs on a schedule or inside your own product UIWorkflow if the steps are fixed, agent if they aren'tNone
You need to audit or debug what happened in each runAgentBackend logs, or AgentOS run records and tracing
You want the policy-heavy work in an agent and MCP clients to reach itBoth: serve the agent over MCPNone

The last row is often the right answer, and the serving section below shows how to set it up.

If the steps are known ahead of time and must run in a fixed order, a workflow can fit better than an agent. See Agentic workflows vs AI agents.

How do you connect an Agno agent to an MCP server?

Pass an MCPTools instance in tools, one instance per server. It speaks stdio for local servers and Streamable HTTP for remote ones, and include_tools limits what the model sees.

A refund agent like the one in the opening follows the same pattern with your payments API's MCP server. To keep the example runnable, this agent uses the reference Git MCP server to draft release notes instead. The agent carries its own writing instructions and keeps memory in Postgres. A scoped tool prepends each draft to CHANGELOG.md. The Git server stages and commits the resulting file changes; its tools don't write file contents. Before any commit, git_commit waits for approval.

from pathlib import Path
 
from agno.agent import Agent
from agno.db.postgres import PostgresDb
from agno.models.openai import OpenAIResponses
from agno.os import AgentOS
from agno.tools import tool
from agno.tools.mcp import MCPTools
 
REPO_PATH = Path("/srv/repos/billing").resolve()
 
 
@tool
def update_changelog(release_notes: str) -> str:
    """Prepend release notes to this repository's CHANGELOG.md."""
    changelog = REPO_PATH / "CHANGELOG.md"
    if changelog.resolve() != changelog:
        raise ValueError("CHANGELOG.md must not point to another file.")
    existing = changelog.read_text(encoding="utf-8") if changelog.exists() else ""
    changelog.write_text(release_notes.rstrip() + "\n\n" + existing, encoding="utf-8")
    return "Updated CHANGELOG.md."
 
 
git = MCPTools(
    command=f"uvx mcp-server-git --repository {REPO_PATH}",
    include_tools=["git_status", "git_log", "git_diff", "git_add", "git_commit"],
    requires_confirmation_tools=["git_commit"],
)
 
release_agent = Agent(
    id="release-notes",
    name="Release notes",
    model=OpenAIResponses(id="gpt-5.5"),
    instructions=[
        "Write customer-facing release notes from the commits since the last release.",
        "Use update_changelog to prepend the notes, preserving existing entries.",
        "Stage only CHANGELOG.md. Never mention internal ticket numbers.",
        "Review the diff before requesting a commit.",
    ],
    tools=[git, update_changelog],
    db=PostgresDb(db_url="postgresql+psycopg://ai:ai@localhost:5532/ai"),
    add_history_to_context=True,
    update_memory_on_run=True,
)
 
agent_os = AgentOS(agents=[release_agent])
app = agent_os.get_app()
 
if __name__ == "__main__":
    agent_os.serve(app="release_agent:app")

AgentOS connects and closes MCPTools for you, so don't serve it with reload=True. For a remote server that may restart, set refresh_connection=True to check the session on each run. When the model calls git_commit, the run pauses until someone confirms or rejects the call, then continues when your app calls the agent's continue_run() method. Your application must authorize the caller's access to the session and verify that they may approve the pending action; pausing a run doesn't establish that authority.

Start with pip install -U "agno[os,mcp,postgres]" openai. You'll also need uv installed so uvx is available, OPENAI_API_KEY set, Postgres running with credentials matching the connection URL, and an existing Git repository at /srv/repos/billing (or change REPO_PATH to your repository path). Save the example as release_agent.py and run python release_agent.py. The approval flow requires a client or application that handles paused runs and submits an authorized confirmation.

How do you serve an Agno agent as an MCP server?

Set mcp=True on AgentOS. It mounts an MCP server at /mcp, next to the REST API, using Streamable HTTP. The default surface has eight tools. Clients call get_agentos_config to discover what's available and run_agent to run an agent, the continue_run tool resumes a run paused for approval, and get_sessions lists past conversations.

To publish one agent as a single, well-named tool instead, use MCPConfig with as_tool and turn off the default tools:

from agno.os import AgentOS, MCPConfig
 
agent_os = AgentOS(
    agents=[release_agent],
    mcp=MCPConfig(
        tools=[
            release_agent.as_tool(
                name="write_release_notes",
                description="Draft customer-facing release notes for the billing repo",
            )
        ],
        default_tools=False,  # hide the eight built-in tools
        lifecycle_tools=True,  # lets clients resume runs paused for approval
    ),
)

Now Claude or Cursor sees your agent as one tool, write_release_notes, plus the lifecycle tools for resuming paused runs. Their model decides when to call it, and your agent does the multi-step work behind it, under your instructions and your approval gate. Authorize continuation requests in the application; the client's model isn't an approval authority.

To connect clients, deploy AgentOS behind public HTTPS and add https://<your-domain>/mcp as a custom connector in ChatGPT or Claude. Those connector UIs need OAuth, which mcp_auth=AgentOSBuiltinAuth.from_env() provides. For Claude Code, Claude Desktop, Codex, or Cursor on your machine, run uvx agno connect --url http://localhost:7777. Without authentication configured, /mcp only accepts localhost hosts, so set up auth before you deploy.

To list the agent in Claude's Connectors Directory or the ChatGPT plugin directory, see How to ship your agent as a Claude connector and How to publish your agent to the ChatGPT plugin directory.

Learn more about MCP tools in Agno and serving AgentOS as an MCP server in the documentation.

Checked against Agno v3.1.12 and the MCP documentation on 5 November 2026.

Sources

Frequently asked questions

The Model Context Protocol (MCP) is an open-source standard for connecting AI applications to external systems. An MCP server exposes tools and context, and an AI application such as Claude, ChatGPT, VS Code, or Cursor connects to it through an MCP client.

An API exposes endpoints for code that already knows what to call. An MCP server describes each capability as a tool with a JSON Schema for its inputs, so a model can discover and call them at runtime from any MCP host. Most MCP servers wrap an existing API.

No. An MCP server exposes capabilities, and the connecting application’s model decides how to use them. An agent has its own model, instructions, memory, and run loop. Some MCP servers put an agent behind a tool, which is what AgentOS does when you set mcp=True.

Function calling, also called tool use, is a model API feature: you describe functions in a request, and the model returns a structured call for your code to run. MCP standardizes where those tools come from. A host discovers tools from MCP servers, and the model calls them through its normal function calling, so the two work together.

MCP connects an AI application or agent to tools and context. The Agent2Agent (A2A) protocol connects agents to other agents, so one agent can hand a task to another that runs its own model and loop. An agent can use both: MCP for its tools, and A2A to delegate to other agents.

When a person in an MCP host steers the work and each task is a short chain of tool calls they review. Querying a service from Cursor or Claude Code is a good example. Add your own agent when you need to control the model and the execution loop whichever client calls in. If the steps are fixed and unattended, a function or workflow is simpler. Either way, policy limits belong in the server or backend.

Yes. Pass an MCPTools instance to an agent’s tools, one per server. It connects over stdio or Streamable HTTP. Use include_tools or exclude_tools to filter what the model sees, and tool_name_prefix to avoid name clashes between servers.

Yes. Set mcp=True on AgentOS to serve an MCP endpoint at /mcp, or pass MCPConfig(tools=[agent.as_tool(...)], default_tools=False) to publish only specific agents as named tools. ChatGPT and Claude connect as custom connectors with OAuth, and local clients connect with agno connect.

MCP hosts may show confirmation dialogs, and servers can enforce their own approval requirements. In Agno, list tool names in requires_confirmation_tools on MCPTools, and the agent pauses the run until each call is confirmed or rejected, whichever client started it. Your application must verify that the caller is authorized to approve the action before resuming the run.

Agno is an open-source framework for building agents, along with the teams and workflows that combine them. AgentOS is Agno’s runtime for serving them in production as a REST API and an MCP server. With a database configured, it persists sessions and memory in your own storage. Enable tracing=True on AgentOS to also record execution traces there.