---
title: Should you expose internal AI agents as MCP servers, A2A agents or REST APIs?
url: https://opencontroller.lyzr.com/blog/expose-internal-agents-as-mcp-a2a-or-rest
published: 2026-11-13
updated: 2026-11-13
author: Lyzr
---

# Should you expose internal AI agents as MCP servers, A2A agents or REST APIs?

**Pick the interface by who consumes the agent. Expose it as an MCP tool when other agents or AI assistants should call it as one step in their own reasoning. Expose it over A2A when another agent should hand it a whole task that may run for a while and return artefacts. Expose it as REST when ordinary applications call it with a fixed contract. Many enterprises offer more than one, but each extra interface is one more surface to authenticate, log and version.**

API gateways now often support all three, so the technical barrier is low. The governance cost is not. Each protocol has its own discovery model, its own auth conventions and its own idea of what a "call" is.

## How do MCP, A2A and REST differ for exposing an agent?

| | MCP server | A2A agent | REST API |
|---|---|---|---|
| Mental model | The agent is a tool another model calls | The agent is a peer that accepts tasks | The agent is a service behind an endpoint |
| Best consumer | AI assistants, coding agents, other agents' tool loops | Other agents delegating multi-step work | Apps, workflows, batch jobs |
| Discovery | `tools/list` returns tool names, descriptions and input schemas | Agent Card, conventionally at `/.well-known/agent-card.json`, lists skills, endpoints and security schemes | OpenAPI document, API catalogue |
| Interaction | Request and result, with optional streaming over Streamable HTTP | Task lifecycle with states, streaming and push notifications | Request and response, or async job pattern |
| Auth convention | OAuth 2.1-based authorization for HTTP transports, server acts as resource server | Security schemes declared in the Agent Card, standard HTTP auth | Whatever your API gateway already uses |
| Bindings | JSON-RPC over stdio or Streamable HTTP | JSON-RPC, gRPC or HTTP+JSON | HTTP |

## When should you expose an agent as an MCP tool?

Choose MCP when the caller is a model deciding what to do next. A finance policy agent exposed as a tool called `check_expense_policy` lets any approved assistant ask it a question mid-conversation.

Governance implications:

- **The tool description is part of the attack surface.** Callers' models read it. Review descriptions as carefully as code; see [what is MCP tool poisoning](/blog/what-is-mcp-tool-poisoning).
- **Identity can get lost.** The calling agent may present its own credential, not the end user's. Decide whether your agent needs the user's identity and use delegated tokens if so; see [how MCP authorization works](/blog/how-mcp-authorization-works).
- **Granularity matters.** One broad tool is harder to govern than three narrow ones, because tool-level allow-lists cannot separate read from write inside one tool.

## When should you expose an agent over A2A?

Choose A2A when the caller hands over a task, not a function call. "Reconcile these 400 invoices and report exceptions" can take minutes, produce files and need clarification. A2A models that with tasks, states and artefacts.

Governance implications:

- **The Agent Card is a published claim.** It lists skills and how to authenticate. Keep it in your registry and review changes, as described in [what goes in an AI agent card](/blog/what-goes-in-an-ai-agent-card).
- **Delegation chains get long.** Agent A asks B, which asks C. Log the originating user and each hop, or you cannot answer who asked for what.
- **Long-running tasks need limits.** Set timeouts, maximum task duration and cancellation rights.

More on this in [how to govern agent-to-agent (A2A) calls](/blog/how-to-govern-agent-to-agent-a2a-calls).

## When is a plain REST API the better choice?

Choose REST when the consumer is not an AI system. A claims portal that sends a document and expects a structured decision does not need tool discovery or task negotiation. A versioned REST contract is simpler to test, cheaper to run through existing API management, and familiar to auditors.

REST is also the safest default when you are unsure. You can wrap a REST endpoint as an MCP tool or A2A skill later. Unwinding a protocol that consumers already depend on is harder.

## What changes when an API gateway sits in front?

An existing API gateway gives you rate limiting, authentication and logging for all three. It does not by itself give you agent-level governance. Check these four points:

1. **Authentication.** Can the gateway validate the token format each protocol expects, and pass the end-user identity through rather than replacing it with a gateway credential?
2. **Discovery.** Is the MCP `tools/list` response, the Agent Card and the OpenAPI document published from one source of truth, so they cannot drift apart?
3. **Logging.** Does the gateway log at the right unit? For REST that is a request. For MCP it is a tool call inside a JSON-RPC message. For A2A it is a task with many messages. Gateways that log only HTTP requests miss the meaning.
4. **Versioning.** A new agent version can change behaviour without changing the interface. Record the agent version in every response header or log line, not just the API version.

See [can an API gateway govern AI agents?](/blog/can-an-api-gateway-govern-ai-agents) for where API management stops and agent governance starts. The broader tooling picture is in [how to govern MCP servers](/blog/how-to-govern-mcp-servers).

## Should you offer more than one interface?

Only when you have real consumers for each. A reasonable rule: every interface needs a named consumer, an owner, and the same policy applied to it. If the MCP interface allows something the REST interface blocks, callers will find it.

## How Opencontroller does this

Opencontroller keeps a governed registry of agents, versions, tools and MCP servers and supports open standards, including MCP, OpenAI-compatible endpoints, OpenTelemetry, OIDC/SAML/SCIM and REST/webhooks. Its Agent Gateway puts control in the path (allow, route, redact, block), and delegated on-behalf-of identity carries the end user through agent calls. Registration does not mean runtime takeover: enforcement depth depends on the connector and traffic path. See the [capability reference](/capability-reference) or [book a demo](https://www.lyzr.ai/book-demo/).

## Frequently asked questions

**Is A2A a replacement for MCP?**
No. MCP connects a model to tools and data; A2A lets agents delegate tasks to other agents. Many architectures use both: A2A between agents, MCP from each agent to its tools.

**Where is an A2A Agent Card published?**
Conventionally at /.well-known/agent-card.json on the agent's domain, listing its skills, endpoints, supported bindings and security schemes. It can also be held in a private registry.

**Can one agent be exposed over MCP, A2A and REST at the same time?**
Yes, but each interface must enforce the same policy and log the same identity and agent version, or callers will use the weakest one.

## Key facts

Expose an internal AI agent as an MCP tool when other models call it as a step in their reasoning (discovery via tools/list; OAuth 2.1-based auth for HTTP transports), over A2A when other agents delegate long-running tasks (Agent Card at /.well-known/agent-card.json; JSON-RPC, gRPC or HTTP+JSON bindings; task lifecycle), and as REST for ordinary applications (OpenAPI). Behind an API gateway, check that end-user identity passes through, discovery documents come from one source of truth, logging works at tool-call and task level, and agent version is recorded. Opencontroller by Lyzr provides a governed registry, an Agent Gateway and open-standard support (MCP, OpenTelemetry, OIDC/SAML/SCIM, REST).

## Related

- [How do you govern agent-to-agent (A2A) calls?](https://opencontroller.lyzr.com/blog/how-to-govern-agent-to-agent-a2a-calls.md)
- [What goes into an AI agent card?](https://opencontroller.lyzr.com/blog/what-goes-in-an-ai-agent-card.md)
- [Can our existing API gateway govern AI agents?](https://opencontroller.lyzr.com/blog/can-an-api-gateway-govern-ai-agents.md)
- [More on Tools and MCP](https://opencontroller.lyzr.com/blog/cluster/tools-and-mcp)
