MCP Server
Early Alpha Version
AI Agents are in early alpha. Node interfaces, behaviors, and APIs are subject to change.
The MCP Server node connects your agents to the Model Context Protocol (MCP) ecosystem. It works in two modes:
- Client — Connect to an external MCP server to consume its tools
- Server — Expose your own tools via MCP for external agents to use
Inputs
| Input | Type | Default | Description |
|---|---|---|---|
| Mode | Enum | Client | Client (consume tools) or Server (expose tools) |
| Server URL | String | — | (Client) URL of the MCP server to connect to |
| Transport | Enum | SSE | (Client) Connection method: SSE, Stdio, or WebSocket |
| Command | String | — | (Client, Stdio) The command to execute for stdio transport |
| Arguments | String | — | (Client, Stdio) Command-line arguments |
| Headers | JSON | — | (Client) HTTP headers for authentication |
| Exposed Tools | Array | — | (Server) Tool definitions to expose via MCP |
| Server Port | Number | 3100 | (Server) Port to listen on |
| Connect | Signal | — | Trigger to establish the connection |
| Disconnect | Signal | — | Trigger to close the connection |
| Refresh Tools | Signal | — | Re-fetch the tool list from the server |
Outputs
| Output | Type | Description |
|---|---|---|
| Tools | Array | Tool definitions discovered from the MCP server |
| Tool Names | Array | Simple list of tool name strings |
| Connected | Boolean | Whether the connection is active |
| Status | String | Current connection status (disconnected, connecting, connected, error) |
| Server Info | Object | Information about the connected MCP server |
| Error | String | Error message if the connection failed |
| Connected | Signal | Fires when the connection is established |
| Disconnected | Signal | Fires when the connection is closed |
| Tools Updated | Signal | Fires when the tool list changes |
Client Mode
Use Client mode to connect to external MCP servers and consume their tools.
SSE Transport
The most common transport. Connect to a server via HTTP Server-Sent Events:
- Set Mode to
Client - Set Transport to
SSE - Enter the Server URL (e.g.
http://localhost:3100/sse) - Add any required Headers (e.g. API keys)
- Fire the Connect signal
Stdio Transport
For local MCP servers that run as command-line processes:
- Set Transport to
Stdio - Set the Command (e.g.
npx) - Set Arguments (e.g.
-y @modelcontextprotocol/server-filesystem /path/to/dir) - Fire Connect
WebSocket Transport
For real-time bidirectional communication:
- Set Transport to
WebSocket - Set the Server URL (e.g.
ws://localhost:3100) - Fire Connect
Server Mode
Use Server mode to expose your own tools to external MCP clients:
- Set Mode to
Server - Wire Agent Tool definitions to the Exposed Tools input
- Set the Server Port
- Fire Connect to start the server
Using MCP Tools with Agents
Once connected, the Tools output contains tool definitions compatible with the AI Agent node:
[MCP Server] ─── Tools ──→ [Agent] (Tools input)
Alternatively, place the MCP Server in the same component as an Agent — auto-discovery will find the tools automatically.
Usage Tips
- The MCP ecosystem has hundreds of pre-built servers for databases, APIs, file systems, and more
- Use Refresh Tools if the remote server's tool list changes while connected
- In Server mode, you can expose any XGENIA logic as an MCP-compatible tool server
- Check the Status output to show connection state in your UI