TellWorldAI World Archive
Ask中文

Home›Practice›Practice

Practice

Agentic protocols: MCP, A2A and NLWeb

MCP, A2A and NLWeb each cover a different connection in agent systems: tools and data, agent-to-agent collaboration, and website content. Learn which one fits your case.

Who this is for and what you can do after reading

This guide is for readers who already use large language models and want to understand how agents connect to tools, data, other agents and websites. After reading, you should be able to explain what MCP, A2A and NLWeb each solve, and choose the right one for a given scenario.[1]

Three connections, three protocols

An agent needs to reach three kinds of things: tools and data, other agents, and the content of websites. MCP, A2A and NLWeb each address one of these.[1]

The Model Context Protocol (MCP) is an open standard that gives applications a standardized way to provide context and tools to LLMs. It works like a universal adaptor: an agent can connect to many different data sources and tools in a consistent way.[1]

Agent-to-Agent (A2A) covers communication and collaboration between AI agents. It connects agents across organizations, environments and technology stacks so they can complete a shared task together.[1]

Natural Language Web (NLWeb) adds a natural language interface to a website, so AI agents can discover and interact with the content it holds.[1]

MCP: connecting models to tools and data

MCP uses a client-server architecture with three roles. Hosts are LLM applications, such as a code editor like VSCode, and they start the connections to MCP servers. Clients live inside the host and keep one-to-one connections with servers. Servers are lightweight programs that expose specific capabilities.[1]

A server offers three primitives. Tools are discrete actions or functions an agent can call, such as a weather service's get weather tool. The server advertises each tool's name, description and input/output schema in its capabilities listing. Resources are read-only data items such as file contents, database records or log files, and they can be text or binary, such as images and PDFs. Prompts are predefined templates for more complex workflows.[1]

MCP offers three benefits to agents.[1]

  • Dynamic tool discovery: the agent receives the list of available tools and their descriptions from the server. Traditional APIs often need static integration code, so any API change requires code updates. MCP follows an integrate once approach.[1]
  • Interoperability across LLMs: MCP works with different models, so you can switch the core model to compare performance.[1]
  • Standardized security: MCP includes a standard authentication method, which is simpler than managing different keys and authentication types for many traditional APIs.[1]

A flight-booking example

A flight booking shows how the pieces fit together:[1]

  1. The AI assistant, acting as an MCP client, connects to an airline's MCP server.
  2. The client asks the server which tools it has. The server answers with tools such as search flights and book flights.
  3. The user asks for flights from Portland to Honolulu. The model picks the search flights tool and passes the origin and destination as parameters.
  4. The MCP server wraps the airline's internal booking API, receives the flight data as JSON and returns it to the assistant.
  5. Once the user picks a flight, the assistant can call book flight on the same server to complete the booking.[1]

A2A: getting agents to work together

Where MCP connects a model to tools, A2A connects agents to one another.[1]

A2A has several main components:[1]

  • Agent Card: similar to an MCP server's tool list, it states the agent's name, the general tasks it completes, a list of skills with descriptions, its current endpoint URL, and its version and capabilities, such as streaming responses and push notifications. Other agents, or people, use it to decide when to call the agent.
  • Agent Executor: passes the user's chat context to the remote agent so it can understand the task.
  • Artifact: when the remote agent finishes, its work product comes back as an artifact containing the result, a description of what was completed and the text context. The connection then closes until it is needed again.
  • Event queue: handles updates and messages. For long-running tasks, it keeps the connection from closing before the task is done.

A2A brings three benefits: enhanced collaboration between agents from different vendors and platforms, model selection flexibility because each agent can choose its own LLM, and built-in authentication.[1]

A travel-planning example

A user asks a travel agent to book a full trip to Honolulu next week, including flights, a hotel and a rental car. The travel agent uses its LLM to decide that it needs other agents, then uses A2A to reach an airline agent, a hotel agent and a car rental agent, each built by a different company. Each downstream agent completes its part with its own model and tools, and those tools can themselves be MCP servers. The travel agent then combines the flight details, hotel confirmation and car rental booking into one chat-style reply.[1]

NLWeb: letting websites answer in natural language

NLWeb has several parts:[1]

  • NLWeb application: the core service code that processes natural language questions and connects the parts of the platform. It is the engine behind a site's natural language features.
  • NLWeb protocol: a basic set of rules for natural language interaction with a website. It returns responses in JSON, often using Schema.org.
  • MCP server: every NLWeb setup is also an MCP server, so it can share tools such as an ask method and data with other AI systems.
  • Embedding models: convert website content into vectors that capture meaning. Users can choose which embedding model to use.
  • Vector database: stores those embeddings and quickly finds the most relevant content, ranked by similarity. NLWeb works with Qdrant, Snowflake, Milvus, Azure AI Search and Elasticsearch.

Content can be ingested from data formatted with Schema.org or loaded from RSS feeds. NLWeb's tools read this structured data, create embeddings and store them in a local or remote vector database.[1]

Take a travel website with flight listings, hotel descriptions and tour packages. A visitor types a request for a family-friendly hotel in Honolulu with a pool. NLWeb sends the query to an LLM and searches the vector database at the same time. The LLM then identifies the best matches among the site's own hotels and writes a natural language answer. Because the answer refers to real listings in the catalog, it avoids made-up information.[1]

External agents can use the same site too. Because NLWeb is an MCP server, an outside travel agent can connect and call the ask method with a question such as which vegan-friendly restaurants in the Honolulu area the hotel recommends. It gets back a structured JSON response.[1]

How to choose a protocol

Before you start, ask yourself three questions:[1]

  1. Does my agent need to call external tools or read external data? Use MCP.
  2. Do I need several agents, possibly from different organizations, to complete a task together? Use A2A.
  3. Do I want users and agents to query my website's content in natural language? Use NLWeb. It is also an MCP server, so agents can connect to it directly.

These options are not mutually exclusive. An A2A agent can use MCP servers for its own tools, and an NLWeb site is itself an MCP server.[1]

Things to watch for

  • An agent can only pick the right tool if the MCP server advertises each tool's name, description and input/output schema.[1]
  • Long-running A2A tasks depend on the event queue to keep the connection open until the task completes.[1]
  • An NLWeb site can only answer from the data it has loaded. The restaurant example assumes that restaurant information has been loaded into the database.[1]
  • This guide covers the roles and division of labor among the three protocols, not deployment or code.

Where to go next

For a structured introduction to MCP, see the MCP for Beginners course.[1] For NLWeb's implementation, see its GitHub repository.[1]

Adapted from lesson 11 of Microsoft's open-source course *AI Agents for Beginners*[1], released under the MIT License.

Sources

  1. 1
    Using Agentic Protocols (MCP, A2A and NLWeb)Microsoft ai-agents-for-beginners (MIT)

Cite this page: Agentic protocols: MCP, A2A and NLWeb. TellWorld, https://www.tellworld.net/practice/practice-agentic-protocols. Updated 2026-11-14

Related news

View all