AnythingLLM can use SoAI's OpenAI-compatible model API and can attach SoAI MCP tools to AnythingLLM agents.
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).
Add the server as the language model
- Open AnythingLLM Settings > AI Providers > LLM.
- Choose OpenAI (Generic).
- Enter
https://SOAI_HOST:5090/v1, the SoAI API key, and an exact model ID. Set the context window and token limits to the selected model's real values. - Save the settings, select the provider for the workspace, and send a short chat message.
Add SoAI MCP
Add the remote server to anythingllm_mcp_servers.json in AnythingLLM's storage
plugins directory. In Docker, edit the file in the mounted storage volume, not in the disposable
container layer.
{
"mcpServers": {
"soai": {
"type": "streamable",
"url": "https://SOAI_HOST:5090/mcp",
"headers": {
"Authorization": "Bearer YOUR_MCP_TOKEN"
}
}
}
}
- Open Settings > Agent Skills.
- Under MCP Servers, select Refresh, then confirm the restart and tool reload.
- Confirm the server is healthy and inspect its discovered tools.
- Open an Agent chat, enable the required MCP tools, and approve a harmless call.