MCP Integration Reference – Agent Tool Specification

Homegrown Intelligence workflows expose a Model Context Protocol server on port 8100 by default. The MCP server enables AI agents to query workflow status, initiate inference jobs, retrieve results, and adjust runtime parameters through typed tool calls. This document describes every available tool, its input schema, and the expected response format.

Connection Details

Transport
HTTP SSE with JSON-RPC 2.0 framing
Default endpoint
http://localhost:8100/mcp/v1
Authentication
Bearer token passed via Authorization header
Protocol version
2025-03-26

Tool: flux2_generate

Parameter Type Required Default Description
prompt string yes Text description for image generation
width integer no 1024 Output width in pixels, 512–2048
height integer no 1024 Output height in pixels, 512–2048
steps integer no 28 Inference steps, 4–50
guidance_scale number no 3.5 CFG scale, 1.0–10.0
seed integer no random Reproducibility seed

Returns: {image_id, width, height, seed, generation_time_ms}

Tool: whisperx_transcribe

Parameter Type Required Default Description
audio_path string yes Absolute path to audio file on server
language string no auto ISO 639-1 language code
output_format string no srt srt, vtt, json, txt
diarize boolean no false Enable speaker diarization

Returns: {job_id, segments_count, duration_seconds, output_path}

Tool: llm_complete

Parameter Type Required Default Description
messages array yes Chat completion messages array
max_tokens integer no 2048 Maximum output tokens
temperature number no 0.7 Sampling temperature
stream boolean no false Enable SSE streaming

Returns: {id, choices, usage} matching OpenAI chat completions format

Error Handling

All tools return JSON-RPC error codes for common failure modes. Code -32000 indicates a parameter validation failure with a descriptive message in the data field. Code -32001 signals a resource exhaustion condition such as insufficient VRAM. Code -32002 reports a model-loading failure when the weight file is corrupt or missing. Clients should implement exponential backoff with jitter for transient errors and surface permanent failures through the agent framework's native error reporting.