This document provides a quick reference for MCP (Model Context Protocol) server configuration in UFO².
For comprehensive MCP configuration guide with examples, best practices, and detailed explanations, see:
- MCP Configuration Guide - Complete configuration documentation
- MCP Overview - Architecture and concepts
- Data Collection Servers - Observation tools
- Action Servers - Execution tools
Configuration File: config/ufo/mcp.yaml
AgentName: # e.g., "HostAgent", "AppAgent"
SubType: # "default" or app name (e.g., "WINWORD.EXE")
data_collection: # Data collection servers (read-only)
- namespace: ...
type: ... # "local", "http", or "stdio"
action: # Action servers (state-changing)
- namespace: ...
type: ...| Type | Description | Use Case |
|---|---|---|
local |
In-process server | Fast, built-in tools |
http |
Remote HTTP server | Cross-machine, language-agnostic |
stdio |
Child process via stdin/stdout | Process isolation |
| Field | Type | Required | Description |
|---|---|---|---|
namespace |
String | ✅ Yes | Unique server identifier |
type |
String | ✅ Yes | Server type: local, http, or stdio |
reset |
Boolean | ❌ No | Reset on context switch (default: false) |
HostAgent:
default:
data_collection:
- namespace: UICollector
type: local
start_args: []
reset: false
action:
- namespace: HostUIExecutor
type: local
reset: falseHardwareAgent:
default:
data_collection:
- namespace: HardwareCollector
type: http
host: "localhost"
port: 8006
path: "/mcp"
reset: falseCustomAgent:
default:
action:
- namespace: CustomProcessor
type: stdio
command: "python"
start_args: ["-m", "custom_mcp_server"]
env: {"API_KEY": "secret"}
cwd: "/path/to/server"- Data Collection: UICollector
- Actions: HostUIExecutor, CommandLineExecutor
Default: UICollector, AppUIExecutor, CommandLineExecutor
App-Specific:
- WINWORD.EXE: + WordCOMExecutor
- EXCEL.EXE: + ExcelCOMExecutor
- POWERPNT.EXE: + PowerPointCOMExecutor
- explorer.exe: + PDFReaderExecutor
- Actions: ConstellationEditor
- Data Collection: HardwareCollector (HTTP)
- Actions: HardwareExecutor (HTTP)
- Actions: BashExecutor (HTTP)
!!!tip "When to Use reset: true"
- COM executors (Word, Excel, PowerPoint) - Prevents state leakage between documents
- Stateful tools - Requires clean state per task
**Default: `false`** - Server persists across context switches
from config.config_loader import get_ufo_config
config = get_ufo_config()
mcp_config = config.MCP
# Get agent-specific config
host_agent = mcp_config.get("HostAgent", {})
app_agent = mcp_config.get("AppAgent", {})
# Get sub-type config
word_config = app_agent.get("WINWORD.EXE", app_agent.get("default", {}))For detailed configuration guide including:
- Complete field reference for all server types
- Agent-specific configuration examples
- Best practices and anti-patterns
- Configuration validation
- Debugging and troubleshooting
- Migration guide
!!!tip "Creating Custom MCP Servers" Want to create your own MCP servers? See the Creating Custom MCP Servers Tutorial for step-by-step instructions on building local, HTTP, and stdio servers.
- MCP Overview - MCP architecture
- Data Collection Servers - Read-only tools
- Action Servers - State-changing tools
- Local Servers - Built-in servers
- Remote Servers - HTTP/Stdio deployment
- Creating Custom MCP Servers Tutorial - Build your own servers
- Configuration Overview - General configuration system
- System Configuration - MCP-related system settings