Model Context Protocol (MCP) Essentials
Prerequisites: rag-knowledge-graphs
The Model Context Protocol (MCP) is an open protocol that defines how agents connect to the tools and external context they need. In MAF, MCP servers are first-class assets you discover, govern, and orchestrate.
What you will learn
- What an MCP server exposes and why it matters.
- How MAF discovers and governs MCP servers.
- How an MCP tool is referenced from an agent network.
What MCP provides
MCP standardizes how an agent connects to data and tools, so an agent built by one team can consume tools published by another (MCP Protocol spec). In MAF, MCP servers are cataloged in Anypoint Exchange as a dedicated asset type (Asset Types).
Governing MCP with Omni Gateway
MAF secures MCP connections at the Omni Gateway, restricting MCP endpoint access to authorized agents and centralizing visibility and control. Omni Gateway MCP policies use attribute-based access control (ABAC) to manage access to MCP servers (Securing Agent Interactions with Omni Gateway).
Discover then govern
Referencing an MCP tool
Below, the same MCP tool binding is shown three ways. The declarative YAML is the Agent Network 2.0 approach; the Python tab shows custom graph logic; the Agent Script tab is forward-looking syntax.
# agent-network.yaml (excerpt)
mcpServers:
- id: knowledge-base
url: https://mcp.example.com/kb
auth: oauth2
agents:
- id: support-agent
tools:
- mcpServer: knowledge-base
# Custom graph node that calls an MCP tool
def support_node(state, mcp):
docs = mcp.call("knowledge-base", "search", query=state["question"])
return {"context": docs}
# Agent Script (forward-looking)
with mcp("knowledge-base") as kb:
@actions.search(kb, query = input.question)
Forward-looking
Next steps
Continue to Agent2Agent (A2A) Protocol essentials to connect agents to each other and reach your first working agent link.