New Tool Radar

Local AI

How to Connect an MCP Server to AnythingLLM Agents

Add an MCP server to AnythingLLM so its agents can call the server's tools.

Schematic illustration with three step boxes for How to Connect an MCP Server to AnythingLLM Agents.

AnythingLLM supports MCP servers for its agents on self-hosted Desktop and Docker installs, but not in AnythingLLM Cloud. Servers are declared in a JSON config file, and agents reach them with an @agent chat. This guide adds the small Time MCP server and asks an agent to use it.

Before you start

  • AnythingLLM Desktop or Docker installed (self-hosted only; Cloud does not support MCP).
  • A text editor, and Docker commands if you run the Docker install.
  • An internet connection for the first download of the server package.

Open the MCP config file

On Desktop, the file is anythingllm_mcp_servers.json in the app data folder. On Docker, it is plugins/anythingllm_mcp_servers.json inside your storage directory. Open Settings, then Agent Skills: opening that page creates the file if it does not exist yet. Copy it aside as a backup before editing.

Add the Time server

Add a clock entry inside the mcpServers object. An MCP command runs with AnythingLLM’s permissions, so only add servers you trust:

{
  "mcpServers": {
    "clock": {
      "command": "uvx",
      "args": ["mcp-server-time"]
    }
  }
}

Save the file and reload the servers from the Agent Skills page. AnythingLLM starts MCP servers when you open that page, not at container start.

Ask an agent to use it

Start a chat and begin your first message with @agent so the agent runs. Ask it for the current time: the agent should call the clock tool and answer with its result.

Worked example

Sample prompt:

@agent What time is it right now, using the clock tool?

The expected result is that the agent calls the clock tool and answers with the current time. If the agent answers from memory, check the Agent Skills page: the server must show as On.

Expected result

UNTESTED in this guide: no MCP server was added while writing it. The expected result is that the clock server shows as On in Agent Skills, and the agent answers with the current time from the tool.

Limitations

MCP requires self-hosted AnythingLLM; it is not available in AnythingLLM Cloud. AnythingLLM supports Tools loading via MCP, not Resources, Prompts or Sampling. An MCP command runs code with the app’s permissions: only add servers from sources you trust, and never put secrets in a shared config file.

Sources

See all