The Model Context Protocol (MCP) is an open standard that defines a common interface for AI models to communicate with external tools and data sources. AnythingLLM acts as an MCP client: it boots your configured MCP servers, discovers their tools, and automatically converts each tool into a callable function available to the agent runtime. This means any MCP-compatible server — whether it controls Docker containers, queries databases, posts to Slack, or reads a local filesystem — becomes an agent tool with zero custom code on your part.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Mintplex-Labs/anything-llm/llms.txt
Use this file to discover all available pages before exploring further.
How It Works
AnythingLLM’s MCP layer is built around two classes:MCPHypervisor— Manages the lifecycle of every configured MCP server (boot, stop, reload, per-tool suppression). Reads server definitions from{STORAGE_DIR}/plugins/anythingllm_mcp_servers.json.MCPCompatibilityLayer— A singleton that inherits fromMCPHypervisorand exposes MCP server tools to the aibitat agent engine. It callslistTools()on each running server and wraps every tool in an aibitat-compatible plugin, registered under the identifier@@mcp_{serverName}.
Supported Transport Types
AnythingLLM supports three MCP transport types:| Transport | Config field | Description |
|---|---|---|
| stdio | command + optional args | Launches a local process (e.g., npx, python) and communicates via standard I/O. Most common for locally installed MCP servers. |
| SSE | url (default when no type is set, or "type": "sse") | Connects to a remote MCP server over Server-Sent Events. This is the default transport for URL-based server definitions. |
| Streamable HTTP | url + "type": "streamable" or "type": "http" | Connects to a remote MCP server using the Streamable HTTP transport. |
Connecting an MCP Server
Open MCP Settings
In AnythingLLM, navigate to System Settings → MCP Servers. This page lists all currently configured servers, their running status, and the tools each server exposes.
Add a Server Definition
Click Add MCP Server and fill in the server configuration. The exact fields depend on the transport type.
- stdio (local process)
- SSE (remote server)
- Streamable HTTP
command— The executable to run (must be available inPATH).args— Array of arguments passed to the command.env— Optional environment variables injected into the server process.
Start the Server
After saving, toggle the server On from the MCP Servers settings page. AnythingLLM will launch the process (for stdio) or open the connection (for HTTP/SSE), call
listTools(), and register each discovered tool.Verify Tools Are Available
The settings page displays each tool name, description, and input schema returned by the server. A green status indicator confirms the server is running and reachable.
Suppressing Individual Tools
If an MCP server exposes many tools but you only want the agent to use a subset, you can suppress specific tools from the MCP Servers settings page. Toggle individual tools off — suppressed tools are recorded in the server’s config underanythingllm.suppressedTools and are excluded from the agent’s function list at runtime.
MCP Cooldown
By default, each MCP tool call is placed on a cooldown immediately after execution. This prevents certain model/provider combinations from calling the same MCP tool in rapid succession, which can happen when a model misinterprets a completed tool result and retries unnecessarily.Fallback Tool Calling for Problematic Providers
Native tool calling (function calling via the provider’s API) is enabled by default for all providers that support it. If you find that a specific provider or custom endpoint misbehaves with native tool calling — producing malformed calls or ignoring tools entirely — you can force it to use prompt-based (un-tooled) tool calling instead:UnTooled strategy, which injects tool definitions directly into the system prompt rather than via the API’s native function-calling mechanism.
Config File Location
MCP server definitions are stored in:Notes on Docker Deployments
When running AnythingLLM in Docker,stdio-based MCP servers spawn as child processes inside the container. The server’s command must be available within the container’s PATH. Tools like npx are available in the AnythingLLM Docker image, but complex MCP servers with native dependencies may require a custom Docker image or a remote HTTP/SSE transport instead.
MCP is essentially arbitrary code execution. AnythingLLM does not audit MCP server implementations for security. Review the source and provenance of any MCP server before connecting it to your AnythingLLM instance, especially in production environments.