Give a Persona MCP and UTCP Tools (Agentic Loop and Tool Adapters)¶
Give an OVOS persona tools from an MCP server or a UTCP manual, so that its language model can call them while it answers. Use this setup when an OVOS persona with a language model must use tools that another server offers, such as the translate server or any third-party MCP server.
What you get¶
ovos-agentic-loopruns the reasoning loop. Itsbrainis the language model, and itstoolboxesare the tools.ovos-tool-adaptersturns a server into a toolbox:ovos-mcp-toolboxfor an MCP server, andovos-utcp-toolboxfor a UTCP manual.
Before you start¶
You need:
- A language model with an OpenAI-compatible API that can call tools. A small local model is enough. For example,
llama-server -m Qwen3-0.6B-Q4_K_M.gguf --jinja --port 8081from llama.cpp serves one athttp://localhost:8081/v1. - A tool server. The steps below use the translate server from Translate text from an AI agent, started with
--mcpon port9686.
Alpha channel only
The loop and the adapters install from the prerelease channel:
Use tools from an MCP server¶
-
Write the persona file
translator.json. The settings of each toolbox go inside the section of the loop, besidetoolboxes:{ "name": "translator", "description": "Answers with tools from the OVOS translate server", "handlers": ["ovos-native-toolcall-loop"], "ovos-native-toolcall-loop": { "brain": "ovos-chat-openai-plugin", "ovos-chat-openai-plugin": { "api_url": "http://localhost:8081/v1", "model": "qwen3-0.6b" }, "toolboxes": ["ovos-mcp-toolbox"], "ovos-mcp-toolbox": { "transport": "http", "url": "http://localhost:9686/mcp", "timeout": 30 } } } -
Serve the persona:
-
Ask a question through the OpenAI-compatible API of the persona server:
curl -s http://localhost:8337/openai/v1/chat/completions -H 'Content-Type: application/json' \ -d '{"model": "translator", "messages": [{"role": "user", "content": "Translate \"the kitchen light is on\" into German."}]}'The
contentof the answer:While the persona answered, the translate server logged the tool call:
Use tools from a UTCP manual¶
Replace the toolbox in the loop section. ovos-utcp-toolbox lists each manual in manual_call_templates:
{
"name": "translator-utcp",
"description": "Answers with tools from a UTCP manual",
"handlers": ["ovos-native-toolcall-loop"],
"ovos-native-toolcall-loop": {
"brain": "ovos-chat-openai-plugin",
"ovos-chat-openai-plugin": {
"api_url": "http://localhost:8081/v1",
"model": "qwen3-0.6b"
},
"toolboxes": ["ovos-utcp-toolbox"],
"ovos-utcp-toolbox": {
"utcp_config": {
"manual_call_templates": [{
"name": "ovos_translate",
"call_template_type": "http",
"url": "http://localhost:9686/utcp",
"http_method": "GET"
}]
},
"timeout": 30
}
}
}
The question "Translate "good night" into Portuguese." got this answer:
The translate server logged the call that the UTCP tool made:
Choose the transport of an MCP server¶
| Transport | Settings |
|---|---|
| Streamable HTTP | "transport": "http", "url": "http://..." |
| SSE | "transport": "sse", "url": "http://..." |
| A local command (stdio) | "transport": "stdio", "command": "uvx", "args": ["mcp-server-fetch"], and an optional "env": {...} |
Each adapter also takes timeout (seconds for each call, default 30) and toolbox_id. Give two adapters of the same type different toolbox_id values to use two servers.
If it fails¶
| What you see | Cause | What to do |
|---|---|---|
MCPToolBox: failed to connect to MCP server: 'command' in the log |
The toolbox settings are at the top level of the persona, so the loop gives the adapter an empty config | Move the ovos-mcp-toolbox section into the section of the loop. |
| The answer comes but the tool server logs no call | The model answered from its own knowledge, or it cannot call tools | Use a model that supports tool calls. Start llama-server with --jinja. |
A tool_providers config loads no tools |
tool_providers is not a UTCP key |
Use manual_call_templates. |
The UTCP adapter registers no tools for http |
utcp-http is not installed |
Install ovos-tool-adapters[utcp], which installs utcp-http. |
More information¶
- Toolboxes in the
ovos-agentic-loopdocs. - MCP and UTCP in the
ovos-tool-adaptersdocs. - Agentic Loops for the reasoning loops.
Read next: Answer through a remote A2A agent Related: AI Agents · Translate text from an AI agent · Write a tool plugin