anythingllm-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@anythingllm-mcpAsk my AnythingLLM workspace about our refund policy."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
anythingllm-mcp
A small, safe helper that lets an AI assistant (like Claude) search and ask questions about your own documents — the ones you've stored in AnythingLLM.
New to this? No problem. This README explains everything step by step and defines the jargon as it comes up. If you can install an app and copy-paste a few lines, you can use this.
The 30-second version
AnythingLLM is an app that stores your documents and lets you chat with them ("What does my handbook say about vacation days?").
MCP (Model Context Protocol) is a standard way for AI assistants to use outside tools. Think of it as a power strip: an assistant plugs into it and suddenly has new abilities.
This project is one of those plugs. Once connected, your AI assistant can ask your AnythingLLM documents questions and get answers — without you copying and pasting anything.
It is read-only: it can look things up, but it can never change, delete, or mess up your AnythingLLM data. More on that below.
Related MCP server: AnythingLLM MCP Server
What it can do
Once connected, your assistant gains four abilities ("tools"):
Tool | In plain English |
| "Am I connected to AnythingLLM correctly?" |
| "What collections of documents do I have?" (AnythingLLM calls these workspaces) |
| "What files are inside this workspace?" |
| "Answer this question using the documents in this workspace." This is the main one. |
That's the whole toolbox. Nothing that can write, delete, or reconfigure anything.
Before you start, you need three things
Node.js, version 18 or newer. Node is the program that runs this helper. Check if you already have it by opening a terminal and typing:
node --versionIf you see something like
v20.11.0, you're set. If you get an error, install Node here (the "LTS" version is the safe choice).AnythingLLM up and running, and reachable in your browser (for many people that's
http://localhost:3001).An AnythingLLM API key. An API key is like a password that lets programs talk to AnythingLLM on your behalf. To get one: open AnythingLLM → Settings → Tools → Developer API → create a key, and copy it somewhere safe. You'll paste it into your setup in a moment.
🔒 Treat this key like a password. Don't post it publicly or commit it to GitHub. (This tool is built so the key never has to appear in your chat.)
Install it
In a terminal, download the project and install the pieces it needs:
git clone https://github.com/DezGDNY/anythingllm-mcp.git
cd anythingllm-mcp
npm installgit clonecopies the project onto your computer.npm installdownloads the small libraries this project depends on. (npmcomes with Node.) You'll see it create anode_modulesfolder — that's normal.
That's it — there's nothing to "build." The helper is ready to run.
Connect it to your AI assistant
An MCP helper doesn't run on its own; your assistant starts it when needed. You
tell the assistant about it by adding a few lines to its configuration file. For
example, in Claude Code (.mcp.json) or Claude Desktop
(claude_desktop_config.json):
{
"mcpServers": {
"anythingllm": {
"command": "node",
"args": ["/full/path/to/anythingllm-mcp/index.js"],
"env": {
"ANYTHINGLLM_BASE_URL": "http://localhost:3001",
"ANYTHINGLLM_API_KEY": "paste-your-key-here"
}
}
}
}What each part means:
command/args— how to start the helper: runnodeon this project'sindex.js. Use the full path to the file (e.g. on Windows,C:\\Users\\you\\anythingllm-mcp\\index.js— note the double backslashes in JSON).env— settings passed to the helper when it starts:ANYTHINGLLM_BASE_URL— the web address where your AnythingLLM lives. Leave it ashttp://localhost:3001unless yours is elsewhere. (You don't need to add/api/v1; the helper adds that for you.)ANYTHINGLLM_API_KEY— the key you copied earlier.
Save the file and restart your assistant so it picks up the new helper.
Tip: putting the key in the
envblock here means it's handled by your assistant, not typed into a chat. If you'd rather not keep the key in this file at all, you can set it as an environment variable on your system instead — the helper readsANYTHINGLLM_API_KEYfrom wherever it's provided.
Try it
Ask your assistant something like:
"Use the anythingllm tools to ask my Project Docs workspace what our refund policy is, and show me which documents the answer came from."
Behind the scenes it calls query_workspace, and you get an answer grounded in
your actual documents, with the sources listed.
By default, questions run in query mode, which means the answer comes
only from your documents (it won't make things up from general knowledge). If
you'd rather let the assistant blend in its own knowledge, ask it to use
chat mode instead.
If something doesn't work
"Not authenticated" / auth errors — the API key is missing or wrong. Double-
check you copied the whole key, and that ANYTHINGLLM_BASE_URL points at your
actual AnythingLLM address.
"Failed to connect" in your assistant — the helper couldn't start. The two usual causes:
The assistant can't find
node. Some assistants start helpers with a stripped-down environment — a bare setup where the system doesn't know wherenodeis installed. If you hit this, pointcommandat the full path to yournodeprogram instead of just"node"(find it by runningwhere nodeon Windows orwhich nodeon macOS/Linux).The key wasn't passed in. Make sure the
envblock above is filled in.
Want to see what actually happened? Start the helper by hand to read its messages:
node /full/path/to/anythingllm-mcp/index.jsIf it prints anythingllm-mcp ready … and then seems to "hang," that's actually
success — it's running and waiting for your assistant to talk to it. Press
Ctrl+C to stop. If it prints an error instead, that error tells you what's
wrong.
Is it safe? (Yes — here's why)
This helper can only read and ask questions. On purpose, it has no tools that create, delete, or change anything in AnythingLLM — no deleting workspaces, no editing documents, no changing settings. So even if an AI assistant went completely haywire, the worst it could do through this helper is look things up. Your data is safe.
It also keeps no secrets in the code. Your address and key come from the settings you provide, never from this file — which is why it's safe to share and publish.
How it works (optional, for the curious)
It's one small file (index.js). When your assistant starts it, the helper:
reads your AnythingLLM address and key from the environment,
waits for the assistant to ask for one of the four tools,
makes a normal web request to AnythingLLM's API, and
hands the answer back.
It uses the official MCP SDK and Node's built-in networking — no heavy dependencies.
License
MIT — free to use, change, and share. Please keep the copyright line.
Available Tools
4 toolscheck_authCheck AnythingLLM authA
Verify the configured API key can reach AnythingLLM. Returns whether authentication succeeded.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
list_documentsList documents in a workspaceB
List the documents currently embedded (searchable) in a workspace. Accepts a workspace name or slug.
| Name | Required | Description | Default |
|---|---|---|---|
| workspace | Yes | Workspace name or slug (from list_workspaces). |
list_workspacesList workspacesA
List all AnythingLLM workspaces with their display name and slug. Use a name or slug from here with the other tools.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
query_workspaceQuery a workspace (RAG)A
Ask a natural-language question answered from a workspace's embedded documents. Default 'query' mode answers ONLY from the documents (grounded, cites sources); 'chat' mode also allows the model's general knowledge. Read-only.
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | 'query' = answer only from the docs (default); 'chat' = also use general knowledge. | query |
| question | Yes | The question to ask. | |
| workspace | Yes | Workspace name or slug (from list_workspaces). |
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v0.1.0- First observed
check_auth - First observed
list_documents - First observed
list_workspaces - First observed
query_workspace
TDQS
Scored across 4 tools
Each tool maps to a distinct resource and action: authentication status, workspace listing, document inventory, and document-grounded querying. There is no functional overlap; list_documents and query_workspace are clearly different in purpose.
All four tool names follow the same lower_snake_case verb_noun pattern: check_auth, list_workspaces, list_documents, query_workspace. The naming makes both the action and target predictable.
Four tools is well-scoped for a read/query-focused AnythingLLM server. Each tool covers a necessary step in the workflow with no redundant utilities.
For the apparent read-only retrieval scope, the workflow is complete: authenticate, discover workspaces, inspect embedded documents, and ask grounded questions. Write operations like workspace or document management are absent but appear intentionally outside this tool set's purpose.
Maintenance
Related MCP Connectors
Securely search and manage workspace context files for AI agents and teams.
Self-hosted AI workspace: semantic RAG document search, long-term memory, and AI chat via MCP.
Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
Workspace knowledge bases agents ingest, search, and query over MCP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to search, deep-read, and build knowledge bases from Markdown, PDF, DOCX, and PPTX documents via MCP tools for retrieval, document navigation, and ingestion.25 npm650MIT
- AlicenseAqualityCmaintenanceEnables MCP-compatible clients to interact with AnythingLLM, providing tools for workspace management, chat and thread operations, document operations, vector search, and system inspection.346MIT
- AlicenseAqualityBmaintenanceEnables managing and controlling AnythingLLM instances through MCP, providing tools to list, create, and delete workspaces, retrieve system environment settings, and get vector counts.51MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to query and manage a document knowledge base via MCP, with RAG-powered search and grounded answers with citations.MIT