OpenClaw can use SoAI through a custom OpenAI-compatible model provider and can connect separately to its MCP server.
Prepare the server
- In the SoAI WebUI, select the Settings button at the right of the header, choose Settings, and open
OpenAI. This tab appears only to an Administrator with API key management
(
OPENAI_API_ADMIN). Select Create key and copy the key when it is shown. Open Models and copy the exact model ID; this requires Model read access (MODEL_READ). - For MCP, select the Settings button at the right of the header, choose Settings, then open
MCP > MCP tokens. The MCP tab appears only to an Administrator with
MCP administration (
MCP_ADMIN), and creating a token also requires MCP usage (MCP_USE). Changing the MCP runtime, server mode, or exposed capabilities under MCP configuration also requires Configuration changes (CONFIG_PATCH).
Connect OpenClaw to the SoAI model API in Control UI
- Start the OpenClaw Gateway and open its dashboard.
- Open Settings > Model Providers and add a custom provider.
- Set its base URL to
https://SOAI_HOST:5090/v1, API protocol to OpenAI Completions, and enter the SoAI API key in the API key field. - Add an exact model ID and its real context window, output limit, modalities, cost values, and verified compatibility capabilities.
- Use Test connection. Then select the provider/model in Default models and save.
Choose OpenAI Responses only for a model that advertises Responses support. OpenClaw sends model requests to the configured base URL, so use only a trusted server address.
Connect OpenClaw to SoAI MCP in Control UI
- Open Settings > MCP, also available at
/settings/mcp. - Use the scoped MCP editor to add a remote HTTP server with
https://SOAI_HOST:5090/mcpand the bearer Authorization header. - Select Save & Publish so the running Gateway applies the change, then use
openclaw mcp doctor --probefor a live connection check. - In Chat, select + > Connectors to enable
soaifor the current session. Apply narrow server and tool filters before approving calls.
Configuration equivalent
{
"models": {
"providers": {
"soai": {
"baseUrl": "https://SOAI_HOST:5090/v1",
"apiKey": {
"source": "env",
"provider": "default",
"id": "SOAI_OPENAI_API_KEY"
},
"api": "openai-completions",
"models": [
{
"id": "YOUR_MODEL_ID",
"name": "SoAI model",
"reasoning": false,
"input": ["text"],
"contextWindow": 32768,
"maxTokens": 4096
}
]
}
}
},
"mcp": {
"servers": {
"soai": {
"transport": "streamable-http",
"url": "https://SOAI_HOST:5090/mcp",
"headers": { "Authorization": "Bearer ${SOAI_MCP_TOKEN}" }
}
}
}
}
Set both environment variables before starting OpenClaw. Replace the example limits and capabilities with values supported by the selected model; they are placeholders, not recommendations. Keep the SoAI API key and MCP token separate.