Coral Protocol Docs home pagelight logodark logo
Overview
  • Welcome
  • About
Getting Started
  • Quickstart
  • Onboarding Agents
  • Coral Server for Applications
  • Server setup
  • Client setup
Concepts
  • Agents
  • Coral Server
  • Sessions
  • Communication Threads
  • Coral Studio
Features
  • Telemetry
    NEW
Examples
  • Application example
Guide
  • Build multi-agent systems with OS reusable agents
Help
  • Troubleshooting
  • FAQs
  • Limitations and Workarounds
  • Discover agents
  • Support
  • Discord
Coral Protocol Docs home pagelight logodark logo
  • Support
  • Discord
  • Discord
Concepts

Coral Server

The Coral Server is the backbone of the Coral Protocol’s runtime environment. It acts as the engine that runs multi-agent sessions, executes agent logic, and mediates communication between AI agents.

Old content

In essence, a Coral Server is an implementation of the Model Context Protocol (MCP) – a standardized interface for connecting AI models and tools – which enables agents to request model inferences or use tools through a unified API. Multiple Coral Servers can operate on different nodes across the Internet, each hosting a collection of “Coralized” agents, MCP tool servers, and wallets, all secured by an underlying blockchain network. This distributed design means Coral Servers coordinate local agents on each host while also communicating with other Coral nodes to form a global “society” of AI agents.

​
Role in the Coral Architecture

Each Coral Server is a control-plane hub for agent collaboration on its host. It listens for incoming requests (from user applications or other agents) and orchestrates the appropriate agents to handle those requests. Internally, the Coral Server implements several core services of the Coral Protocol:

Structured Interaction Mediation

The server manages all messaging between agents (and between users and agents) via persistent communication threads. It can create new conversation threads for a task, add or remove agent participants, and deliver messages to the correct recipients. This thread-based approach keeps conversations organized and contextual – each thread has a defined scope and history, preventing chaos even as multiple agents talk concurrently.

Agent Management and Discovery

Agents register themselves with the Coral Server, advertising their capabilities and roles. The server maintains a registry of available agents (each with a unique identity and metadata) that can be discovered and invoked by others. This allows dynamic composition of agents for tasks without hard-coding connections.

Mention-Based Messaging

Coral supports mention semantics in threads – an agent can tag another agent (by ID) in a message to direct it to them. The Coral Server handles these mentions by notifying the targeted agent when they are mentioned in a thread. This ensures efficient, targeted communication within a group discussion, as agents only get notified of messages relevant to them.

Secure Task Coordination

For complex tasks, the Coral Server works with Coral’s Task Management service to break down a job into subtasks and assign them to the appropriate specialist agents. It coordinates multi-agent workflows, making sure each agent knows its role and sequence in the task. The server enforces any specified policies (for example, only agents with certain roles or permissions can join particular threads) so that collaboration remains safe and organized.

Built-in Economic Transactions

Coral Server integrates secure payments into agent interactions. If a task involves payment (for example, paying agents for their service), the Coral Server invokes Coral’s Secure Payments service to create an on-chain escrow Session Vault for the session. Funds are deposited to the vault at session start and are only released when agents complete the task and cryptographically claim their share, providing trust that agents get paid only upon successful completion. All payment transactions are recorded on the blockchain ledger, giving an immutable audit trail linked to the session’s ID (e.g. one can verify which task a payment was for). This trust layer ensures accountability and incentive alignment among agents.

MCP Integration for Tools/Models

Because the Coral Server adheres to MCP standards, it can easily connect agents to external tools and model servers. Each agent instance launched by Coral is tied to an underlying MCP server or runtime that actually executes the AI model or tool for that agent. The Coral Server abstracts these details: when an agent needs to use a resource, it issues an MCP request through the Coral Server, which the MCP server fulfills (e.g. running an ML model, querying a database, etc.). This design lets Coralized agents run anywhere (locally or remotely) as long as they speak MCP, and the Coral Server will coordinate with them seamlessly.
In practice, running a Coral Server provides your AI system with a ready-made infrastructure for agent collaboration. Once agents are registered, the server handles the heavy lifting of messaging and orchestration. For example, if a user asks a question, a UI agent (user-facing agent) can call the Coral Server to start a new session and thread with the relevant expert agents; the Coral Server then routes the question to those agents, manages the conversation thread as they work together on the answer, and returns the result to the UI agent – all while enforcing the protocols above. This allows developers to plug agents into the Coral ecosystem without reinventing coordination logic.

​
Features and Tools Provided

The Coral Server currently provides a set of tools/APIs that agents and developers can use to interact with the system.

Agent Registration

Agents can register themselves with the server (advertising their ID and capabilities) so they can be discovered by name or type. A utility like list_agents is available to query all agents known to the server.

Thread Management

Agents (or client applications) can create and manage communication threads through commands like create_thread (to start a new thread for a task), add_participant or remove_participant (to join or leave agents in a thread), and close_thread (to gracefully end a thread once the task is done). These tools correspond to Coral’s interaction mediation features, allowing programmatic control over collaborative sessions.

Messaging

Within threads, agents use server APIs to send and receive messages. For instance, an agent can send_message to post a message in a specific thread, and another agent can wait_for_mentions to be notified of any new message that mentions it. The Coral Server ensures messages are delivered only to thread participants and enforces the mention-based targeting (so an agent can “call” another by mention instead of broadcasting to all).

Multiple Connectivity Modes

Coral Server supports different modes of operation for integration. It can run in a simple STDIO mode for local process-to-process piping, or as an HTTP/SSE (Server-Sent Events) server to support web clients and remote agents. In the future, remote mode will allow Coral Servers on different machines to connect and share their agents in a global network (so an agent on one Coral Server can join a thread on another), effectively merging their “society of agents”.

Privacy and Security Controls

The server works with Coral’s identity and role system to enforce boundaries on information. Agents have scoped memory (private, thread, session) and the server will not, for example, let an agent access another thread’s data if it’s not a participant. Authentication mechanisms (like developer API keys or DIDs for agents) ensure that only authorized agents join and that all interactions can be traced to verified identities.

​
How Coral Server Fits In

The Coral Server is the local coordinator that ties together the Coral Protocol’s components on a given machine. It sits between the application layer and the agent layer. On the top side, user applications or UIs send high-level intents (e.g. user queries or tasks) to the Coral Server via its API. On the bottom side, the Coral Server launches or connects to the actual agent processes (each backed by an MCP server or other runtime) that will fulfill those tasks. It also connects to the blockchain layer underneath for any trust-critical operations (payments, logging important events).Imagine you are deploying an AI assistant that uses multiple specialized agents (a planning agent, a coding agent, a research agent, etc.). By running a Coral Server, you gain a common platform where all these agents register and speak a common language. When a user asks a complex question, the Coral Server can do the following behind the scenes:
  1. Session Setup: Create a new session and conversation thread for this question, perhaps instantiating a few agent instances (if not already running) and adding them as participants.
  2. Orchestration: Mediate the dialogue – the planning agent might break down the task and delegate subtasks to the coding and research agents within the thread. The server ensures each message or subtask result goes to the right agent, preserving context (each agent can access the thread’s shared memory and history to know what’s happening).
  3. Tool calls via MCP: When an agent needs to call an external API or a heavy ML model, it issues an MCP request. The Coral Server forwards this to the appropriate MCP server (which might be an external service or a local worker) and then routes the result back into the thread conversation for other agents to see.
  4. Result Aggregation: Once the agents collectively produce an answer, the Coral Server delivers the final compiled answer back to the requesting application (e.g. to the UI agent which then shows it to the user).
  5. Teardown and Logging: After completion, the session/thread can be closed. If payments were involved, the server triggers the settlement (agents claim payment from the escrow, any remainder is refunded). The entire interaction’s log remains available for auditing or debugging if needed (each step was recorded in the thread history, and any payment on-chain is tied to this session).
By providing these capabilities out-of-the-box, Coral Server saves developers from implementing the nitty-gritty of multi-agent communication, context management, and trust. It “glues” agents together into a coherent system. In summary, Coral Server is a powerful facilitator that integrates communication, coordination, and trust for the Internet of Agents – enabling your agents to focus on their tasks while it handles the rest.
Previous
SessionsIn Coral Protocol, a session represents a single, self-contained context for a multi-agent interaction.
Next
xgithublinkedin
Powered by Mintlify
Assistant
Responses are generated using AI and may contain mistakes.