# ADR-006: Tool Integration Protocol

## STATUS
PROPOSED (2026-02-13)

## CONTEXT
The Conductor Brain needs to discover and interact with compute nodes, models, tools, and external services through a standardized protocol. Need dynamic tool discovery, real-time capability updates, and a growing ecosystem of integrations.

## OPTIONS EVALUATED

### Option A: Model Context Protocol (MCP)
- **Pros**: Open standard (Anthropic), JSON-RPC 2.0 based, growing ecosystem (VSCode, Claude, Cursor adopt it), tool/resource/prompt primitives, dynamic capability updates via notifications, SDKs in 7+ languages, supports local (stdio) and remote (Streamable HTTP) transports
- **Cons**: Relatively new standard (Nov 2024), still evolving, not all LLM frameworks support it natively
- **Best For**: Standardized AI tool integration

### Option B: Custom JSON-RPC Protocol
- **Pros**: Full control, optimized for LLMHosts specifics
- **Cons**: No ecosystem, must build all tooling, no community adoption
- **Best For**: If MCP proves insufficient

### Option C: OpenAI Function Calling Format
- **Pros**: Widely understood, simple JSON schema
- **Cons**: No discovery protocol, no notifications, no resource/prompt primitives, tied to OpenAI's spec
- **Best For**: Simple tool calling only

## DECISION
**Model Context Protocol (MCP)** as the standard tool integration protocol for Conductor ↔ Compute Node communication.

### Usage Pattern
- Each compute node runs an MCP server exposing its capabilities
- Conductor acts as MCP Host with one MCP Client per node
- Tools: inference endpoints, model management, system operations
- Resources: hardware specs, utilization metrics, cache status
- Notifications: capability changes when models loaded/unloaded

## RATIONALE
- MCP is becoming the industry standard for AI tool integration
- Growing ecosystem adds value (users can connect their own MCP servers to LLMHosts)
- Dynamic tool discovery + notifications perfect for LLMHosts's dynamic compute fabric
- JSON-RPC 2.0 is lightweight and well-understood
- Multi-language SDK support means node agents can be built in optimal language per platform
- Future-proof: as MCP ecosystem grows, LLMHosts automatically gains new integrations

## CONSEQUENCES
- Must implement MCP servers in node agents
- Must implement MCP client in Conductor
- MCP spec may evolve (need to track versions)
- Additional complexity vs direct API calls
- Ecosystem benefit outweighs complexity cost long-term
