-
Notifications
You must be signed in to change notification settings - Fork 3
configuration
Before using the MCP server, you need to install the necessary software and set up the project on your local machine.
Ensure you have the following software installed:
- Python 3.10+
- UV (Python package manager)
- A running OpenNebula deployment that is accessible from your machine.
- An MCP Client (e.g., Cursor, Warp Terminal, MCP Host).
-
Install UV (if you haven't already):
# On Linux/macOS curl -LsSf https://astral.sh/uv/install.sh | sh # Or via pip pip install uv
-
Clone the Repository:
git clone https://github.com/OpenNebula/one-mcp.git cd one-mcp -
Create a Virtual Environment and Install Dependencies:
# Create the virtual environment uv venv # Activate the environment source .venv/bin/activate # Install project dependencies uv sync
-
Verify the Installation: Run the server to confirm it starts correctly.
python main.py
You should see the output:
>>> Starting MCP server...
Integrate the MCP server with your AI-powered client for seamless interaction.
-
Configure MCP Server in Cursor: Open your Cursor MCP settings file (
~/.cursor/mcp.json) and add the following server configuration. Remember to update the paths to match your project's location.{ "mcpServers": { "opennebula-mcp-server": { "command": "uv", "args": [ "run", "-p", "/opt/one-mcp/.venv/bin/python", "--", "/opt/one-mcp/main.py" ], "type": "command", "cwd": "/opt/one-mcp" } } }
-
Configure MCP Server in Warp: In Warp's settings (Settings > AI > MCP Server), add the following configuration. Remember to adjust the paths.
{ "opennebula-mcp-server": { "command": "uv", "args": [ "run", "-p", "/opt/one-mcp/.venv/bin/python", "--", "/opt/one-mcp/main.py" ], "env": {}, "working_directory": null, "start_on_launch": true } }
Configure your environment to run the project's test suites.
Promptfoo is used to test the MCP Server's ability to select and use the correct tools.
-
Set Up Environment Variables: Create an
.envfile in the project's root directory. -
Add Your OpenAI API Key: Add your API key to the
.envfile. This is required for the evaluation model.OPENAI_API_KEY=sk-proj-XXX
Pytest is used to run unit tests against individual tool functions.
-
Configure Test VM IP Address: The VM-related tests require an active OpenNebula VM. Edit
src/tests/pytest/conftest.pyand setTEST_VM_IP_ADDRESSto the IP of your test VM.# src/tests/pytest/conftest.py # ... # Update this IP address to match an active VM with SSH access TEST_VM_IP_ADDRESS = "172.20.0.12" # 👈 Replace with your test VM's IP
-
Test VM Requirements: Your test VM must meet the following criteria:
- State must be ACTIVE/RUNNING.
- SSH access must be enabled.
- The VM must have root access or sudo privileges.
- The MCP server host must have network connectivity to the VM.
-
Verify VM Connectivity: You can test the connection from your terminal:
# Replace with your test VM's IP ssh root@172.20.0.12 "echo 'VM connectivity test successful'"
If you observe incorrect behavior or unexpected results, please report it via GitHub Issues so the team can investigate and improve the experience.