Hi, initially when I installed the opennebula-cli, ollama, one-mcp and mcphost in a temporary test vm I was able to get a valid response back from mcphost with the prompt “List my opennebula hosts“.
I re-installed opennebula-cli, ollama, one-mcp and mcphost on a different vm, now when send prompt “List my opennebula hosts“ I get an explanation instead of an execution.
opennebula-cli working
(one-mcp) [linux@acemagic one-mcp]$ onehost list
ID NAME CLUSTER TVM ALLOCATED_CPU ALLOCATED_MEM STAT
7 one-node-03 default 3 600 / 4800 (12%) 12G / 251.1G (4%) on
2 one-node-02 default 0 - - dsbl
1 one-node-01 default 3 800 / 3200 (25%) 24G / 61.8G (38%) on
0 one-mast-00 default 3 800 / 4800 (16%) 16G / 125.2G (12%) on
(one-mcp) [linux@acemagic one-mcp]$
mcp-server is running.
(one-mcp) [linux@acemagic one-mcp]$ python main.py
2025-09-18 16:39:50 INFO opennebula_mcp.logging_config: File logging enabled: /home/linux/one-mcp/log/2025_09_18_16_39_50.log
[09/18/25 16:39:50] INFO File logging enabled: /home/linux/one-mcp/log/2025_09_18_16_39_50.log logging_config.py:214
2025-09-18 16:39:50 INFO opennebula_mcp.main: Starting MCP server - allow_write: False
mcphost
┃ Model loaded: ollama (mistral)
┃ MCPHost System (16:28)
┃ Model loaded successfully on GPU ┃ MCPHost System (16:28)
┃ Loaded 11 tools from MCP servers
┃ MCPHost System (16:28)
┃ ## Configured MCP Servers
┃ 1. opennebula-mcp-server ┃ MCPHost System (16:28)
┃ ## Available Tools ┃ 1. opennebula-mcp-server__list_clusters ┃ 2. opennebula-mcp-server__list_hosts ┃ 3. opennebula-mcp-server__list_datastores ┃ 4. opennebula-mcp-server__list_networks ┃ 5. opennebula-mcp-server__list_images ┃ 6. opennebula-mcp-server__get_vm_status ┃ 7. opennebula-mcp-server__execute_command ┃ 8. opennebula-mcp-server__list_vms ┃ 9. opennebula-mcp-server__instantiate_vm ┃ 10. opennebula-mcp-server__manage_vm ┃ 11. opennebula-mcp-server__list_templates #
┃ MCPHost System (16:28) ┃
┃ list my openneula hosts ┃
The request to list my opennebula hosts returns the following explaining how to implement instead of executing:
┃ To list your OpenNebula hosts, you can use the onehostlist command in the OneHost CLI. Here's a simple Python script that utilizes
┃ this command to list all of your hosts: ┃ import subprocess ┃
┃
┃ def list_hosts(): ┃
┃ process = subprocess.Popen("onehostlist", stdout=subprocess.PIPE, shell=True)
┃ output, error = process.communicate() ┃ if error: ┃
┃ print(f"Error occurred: {error}") ┃ else: ┃ print(output.decode().strip()) ┃ if __name__ == "__main__":
┃ list_hosts() ┃
┃ Save this script as list_hosts.py, and you can run it by executing python list_hosts.py in your terminal or command prompt. This will
┃ display a list of all your OpenNebula hosts. ┃
┃ Please make sure that the OneHost CLI is installed on your system before running this script. If not, you can find installation
┃ instructions here https://docs.opennebula.org/5.6/onehost_cli/installation.html. ┃
┃ mistral (16:29)
.mcphost.yml
# ~/.mcphost.yml
# Add the OpenNebula server to your list of MCP servers
mcpServers:
opennebula-mcp-server:
type: "local"
command: ["uv", "run", "-p", "/home/linux/one-mcp/.venv/bin/python", "--", "/home/linux/one-mcp/main.py", "--no-allow-write", "--log-level", "DEBUG"
]
cwd: "/home/linux/one-mcp"
# (Optional) Configure your preferred model and other settings
model: "${env://MODEL:-ollama:mistral}"
provider-api-key: "${env://OPENAI_API_KEY:-lm-studio}" # Required - will fail if not set
~/.bashrc
#
export ONE_XMLRPC="http://192.168.1.40:2633/RPC2"
export OPENAI_API_KEY="."
export DEBUG="true"
export MODEL="ollama:mistral"
#
- As you can see from above,
executing python main.py displays INFO opennebula_mcp.main: Starting MCP server. - The opennbeula-cli returns the hosts detail
- When in the mcphost prompt, /service and /tools return the correct detail
Executing prompt list my openneula hosts returns with instructions.
It’s like opennebula-mcp-server is not receiving command.
Any ideas?