Model Context Protocol (MCP)
Relevant source files
The following files were used as context for generating this wiki page:
The Model Context Protocol (MCP) serves as the primary connectivity layer within the Nexus Orchestrator. It provides a standardized communication interface that bridges the "infrastructure gap" between AI agents and their operating environments, allowing agents to interact with managed infrastructure autonomously.
As a core pillar of the system, MCP enables the orchestrator to function as an autonomous infrastructure daemon, facilitating secure and structured data exchange between non-human identities and local-first environments.
Sources: README.md:4-15, README.md:18-19
MCP Architecture and Connectivity
The MCP architecture in Nexus Orchestrator is designed as a local-first, background orchestration layer. It acts as a "nervous system" that synthesizes communication across various components including LangGraph workflows, OPA governance, and Zero Trust security modules.
Component Interaction Flow
The following diagram illustrates how MCP facilitates communication between agents and the underlying infrastructure within the Nexus ecosystem.
The MCP Connectivity Layer handles the translation of agent requests into infrastructure actions while ensuring governance policies are applied.
Sources: README.md:5-12, README.md:18-22
Core Responsibilities
MCP is integrated into the "Connectivity Layer" and is responsible for several critical operations within the orchestrator:
| Responsibility | Description |
|---|---|
| Agent Communication | Providing the protocol for agents to send commands to the orchestrator. |
| Environment Management | Facilitating the management of SSH connectivity and Docker environments. |
| State Synchronization | Working with the Context Layer to maintain persistent state and manage agent context. |
| Security Integration | Routing agent-infrastructure communication through OPA and Zero Trust filters. |
Sources: README.md:6-12, README.md:18-21
Context and Agent Tracking
MCP interactions are tracked and managed through specific context files. The orchestrator uses these to maintain a registry of known AI agents and their permissions.
Agent Registry (AGENTS.md)
The system maintains a registry of agents interacting via MCP to ensure accountability and security.
| Field | Description |
|---|---|
| Agent ID | Unique identifier for the AI agent. |
| Description | Functional role or purpose of the agent. |
| Trust Level | Security classification for OPA/Zero Trust policies. |
Sources: context/AGENTS.md:1-10, README.md:20
Integration with Orchestration and Governance
MCP does not operate in isolation; it is the interface through which the Orchestration and Governance layers receive data and issue commands.
Sequence of an MCP Request
The following sequence diagram shows the typical flow of an infrastructure request initiated via MCP.
Requests are validated by the Governance layer before being dispatched to the actual infrastructure (SSH or Docker environments).
Sources: README.md:10-12, README.md:18-22
Infrastructure Modules (MCP Servers)
Nexus utilizes specialized MCP servers to handle specific infrastructure domains:
- SSH Server: Manages remote connectivity and command execution.
- Docker Server: Handles containerized environment orchestration.
- Context Manager Server: Manages persistent state and
AGENTS.mdupdates.
Sources: mcp-servers/ssh/README.md, mcp-servers/docker/README.md, mcp-servers/context-manager/README.md, README.md:6-8
Conclusion
The Model Context Protocol (MCP) is the foundational interface of Nexus Orchestrator, enabling AI agents to function as autonomous infrastructure operators. By standardizing communication and integrating with Zero Trust governance, it provides a secure and scalable way to bridge the gap between LLM reasoning and physical infrastructure management.