Skip to main content
Glama

mcp-anythingllm

MCP server (stdio) that gives Hermes access to the knowledge base in AnythingLLM: documents uploaded through the AnythingLLM web UI (PDF, Word, web pages, Markdown …), organised in workspaces.

Typical setup: AnythingLLM runs as a container on the harness server (loopback port 3001), LLM and embedding model come from an OpenAI-compatible LLM server. This MCP server only talks to AnythingLLM's developer API.

Tools

Tool

What it does

rag_workspaces()

Lists the workspaces (name, slug).

rag_search(query, workspace?)

Best passages (text, document title, workspace, score 0..1); all workspaces when workspace is empty.

rag_answer(question, workspace?)

Answer from the documents only (chat mode query), with sources. Without workspace the workspace with the best passage answers; if nothing matches, no LLM call.

rag_documents(workspace?, contains?)

Lists the documents: source path, title, workspaces, last update.

rag_get(document)

The whole text of one document (needs ANYTHINGLLM_DOCUMENTS_DIR).

rag_add(title, text, workspace, path?)

Saves a new note and embeds it; path gives it a stable source to find it again.

rag_edit(document, old_text, new_text)

Replaces one passage that occurs exactly once (e.g. ticks off a line); only the change is sent, the document is then stored like rag_update.

rag_update(document, text)

Replaces a document's content (new version is embedded first, then the old one removed); source, title and workspaces stay.

rag_remove(document)

Deletes a document from every workspace and the storage.

Writing tools are meant for explicit requests or a skill's workflow. A document is named by its source path (or its end, e.g. train-log.md), its title or its storage name.

Related MCP server: mcp-vault-reader

Configuration (.env)

Variable

Default

ANYTHINGLLM_URL

http://127.0.0.1:3001

AnythingLLM instance

ANYTHINGLLM_API_KEY

—

Settings → Developer API

ANYTHINGLLM_TIMEOUT_SECONDS

180

per request (answers come from the local LLM)

ANYTHINGLLM_SCORE_THRESHOLD

0.5

minimum similarity of a passage (unrelated ≈ 0.4–0.53, matches ≈ 0.6–0.75)

ANYTHINGLLM_TOP_N

6

passages per search

ANYTHINGLLM_DOCUMENTS_DIR

—

AnythingLLM's storage/documents folder, readable by this server (the API returns no document text); without it rag_get is disabled

Development

python3 -m venv venv && venv/bin/pip install -r requirements-dev.txt
venv/bin/python -m pytest          # fake API via httpx.MockTransport, no network
venv/bin/pylint src tests

Hermes

Install the release anywhere (with its own venv and .env) and add it to the profile's config.yaml:

mcp_servers:
  mcp-anythingllm:
    command: /path/to/mcp-anythingllm/.venv/bin/python
    args: [/path/to/mcp-anythingllm/src/main.py]

Importing an existing Markdown folder

venv/bin/python scripts/import_wiki.py ~/notes --default Personal --folder Work=Work --dry-run

Files below a folder Work go to the workspace "Work", everything else to "Personal"; missing workspaces are created. Already imported files are skipped on a rerun.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    A
    quality
    D
    maintenance
    Enables AI assistants to manage a personal markdown-based knowledge base with natural language interactions. Supports creating, searching, updating, and organizing notes across categories like people, recipes, meetings, and procedures.
    11
    1
    -
  • A
    license
    A
    quality
    D
    maintenance
    Enables AI assistants to search, read, and traverse Markdown note vaults (Obsidian-compatible) with full-text search, backlinks, knowledge graphs, and a persistent memory system for cross-session context.
    16
    8 npm
    4
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Enables AI assistants to search and ask questions about documents stored in AnythingLLM workspaces through MCP tools.
    4
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables Claude to read and search a local Markdown knowledge base and past session transcripts, and write distilled notes back into it over MCP.
    35 npm
    1
    MIT