Anythingllm MCP

MCPAI代理

提供方 andreperez

AI代理 stdio · 本地进程 无需鉴权 社区 / 第三方 Claude DesktopClaudeCursorVS Code
查看接入方式

一个MCP协议服务器,允许MCP兼容客户端(如VS Code、Claude Desktop、Cursor等)与AnythingLLM交互,提供工作区管理、聊天和线程操作、文档操作和嵌入、向量搜索等功能。

一句话选型结论

按资料字段整理

Anythingllm MCP 属于AI代理类 MCP 服务器,stdio · 本地进程,无需鉴权,可直接接入 Claude Desktop、Claude、Cursor 等,有可直接执行的安装命令。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类AI代理 传输方式stdio · 本地进程 鉴权无需鉴权 部署方式本地部署
GitHub 星标 2 仓库热度,无公开仓库时显示未标注
工具数 5 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

AI代理
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量5暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

支持客户端

适用场景

MCP协议Python本地部署AnythingLLM集成工作区管理向量搜索API服务

安装与配置

stdio · 本地进程 无需鉴权
客户端在本机拉起子进程,数据不出本机
uv run --env-file .env anythingllm-mcp

这条命令只是入口,具体启动参数请按官方文档补齐,不要直接照搬到别的服务器。

  1. 1
    准备运行环境

    stdio 服务在本地起进程,需要先装好 Python,再按安装命令拉取依赖。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后客户端会列出约 5 个工具,随便调一个只读工具确认能返回结果。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
给代理接外部能力

让代理在任务中途调用搜索、数据库等真实工具。

多步任务编排

把一串操作拆成步骤,由代理按顺序执行。

自动化重复流程

把固定流程交给代理跑,减少手工操作。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 资料标注 5 个工具,职责相对集中,接入后不容易误操作。
  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已适配 Claude Desktop、Claude、Cursor,换客户端不用重新研究配置。
  • 资料标注无需鉴权,装好就能连。

先想清楚的地方

  • stdio 方式要求本地装好运行时(如 Node.js),换机器要重新装一遍。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在AI代理场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop、Claude 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Anythingllm MCP当前 5 stdio · 本地进程 本地部署 有 2026-05-17
Filesystem 560c4363 13 未标注 本地部署 无 2026-05-17
Server Everything (everything) 11 stdio · 本地进程 本地部署 有 2026-05-17
Time 7365cb6d 2 SSE · 服务端推送 远程部署 有 2026-05-18
Everything Claude Code 未标注 stdio · 本地进程 本地部署 有 2026-05-17
Openmemory 557e1585 未标注 stdio · 本地进程 本地部署 有 2026-05-17

服务器档案

AI代理
字段来自项目仓库与公开索引,中文说明由本站标注
提供方andreperez上游标注的维护方 andreperez
分类AI代理本站按上游分类展示
连接方式stdio · 本地进程客户端在本机拉起子进程,数据不出本机
鉴权方式无需鉴权远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · Python本地安装时用到的包标识与运行时
部署类型本地部署上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

8.2 KB
来自项目仓库与上游目录的原文,未做删改

AnythingLLM MCP Server

A Model Context Protocol (MCP) server that
lets MCP-compatible clients (VS Code, Claude Desktop, Cursor, and others)
interact with AnythingLLM. Available tools:

  • Workspace management
  • Chat and thread operations
  • Document operations and embeddings
  • Vector search
  • System and model inspection

Requirements

  • Python 3.10+ — verify: python --version or python3 --version.
    Download if not installed.
  • uv (Python package manager) — verify: uv --version.
    Install instructions.
  • AnythingLLM running and reachable — open http://localhost:3001 in a
    browser to confirm. If it runs in Docker, make sure the port is published
    (e.g., -p 3001:3001).
  • AnythingLLM API key — create one in the AnythingLLM web interface (look
    for API Keys or Developer API in Settings). Copy the key and store it
    securely; it is shown only once.

Installation```sh

git clone https://github.com/andreperez/anythingllm-mcp.git
cd anythingllm-mcp
uv sync


`uv sync` reads `pyproject.toml` and installs all required dependencies into a
local virtual environment. You do not need to create or activate the environment
manually — `uv run` handles that automatically.

## Configuration

The server reads configuration from these environment variables at startup:

- `ANYTHINGLLM_BASE_URL`: Base URL of your AnythingLLM instance.
  Defaults to `http://localhost:3001` if not set.
- `ANYTHINGLLM_API_KEY`: API key for authenticating with AnythingLLM.
  This value is required.

The server does **not** load `.env` files by itself. You must either:

- Set the variables in the shell before starting the server.
- Use a tool that loads `.env` files for you.
- Pass the variables directly in your MCP client configuration.

### Option 1: Set variables in your current shell

PowerShell:```powershell
$env:ANYTHINGLLM_BASE_URL = "http://localhost:3001"
$env:ANYTHINGLLM_API_KEY = "your_api_key_here"

Bash:```bash
export ANYTHINGLLM_BASE_URL="http://localhost:3001"
export ANYTHINGLLM_API_KEY="your_api_key_here"


Command Prompt (`cmd.exe`):```bat
set ANYTHINGLLM_BASE_URL=http://localhost:3001
set ANYTHINGLLM_API_KEY=your_api_key_here

Use the host-exposed URL for your deployment. For Docker port mappings like
3002:3001, set ANYTHINGLLM_BASE_URL to http://localhost:3002 because the
MCP server connects from the host, not from inside the container.

Option 2: Use a .env file with uv

Copy the example file:

PowerShell:```powershell
Copy-Item .env.example .env


Bash:```bash
cp .env.example .env

Command Prompt (cmd.exe):```bat
copy .env.example .env


Edit `.env` so it contains your real values:```dotenv
ANYTHINGLLM_BASE_URL=http://localhost:3001
ANYTHINGLLM_API_KEY=replace_with_your_real_api_key

Then start the server with:```sh
uv run --env-file .env anythingllm-mcp


This tells `uv` to load variables from `.env` before starting the server.

### Option 3: Pass variables in your MCP client configuration

Most MCP clients accept an `env` block in their configuration file (see the
Client setup examples below). When the `env` block contains
`ANYTHINGLLM_API_KEY` and `ANYTHINGLLM_BASE_URL`, you do not need to export
variables in the shell or use a `.env` file.

## Client setup

Replace `/path/to/anythingllm-mcp` in the examples below with the **absolute
path** where you cloned the repository. Examples:

- Linux / macOS: `/home/youruser/anythingllm-mcp`
- Windows: `C:\\Users\\youruser\\anythingllm-mcp` (use double backslashes `\\`
  inside JSON strings)

### VS Code

Add to your user or workspace `mcp.json`. Open the Command Palette
(`Ctrl+Shift+P` on Windows/Linux, `Cmd+Shift+P` on macOS) and run
**MCP: Open User Configuration**:```json
{
  "servers": {
    "anythingllm": {
      "type": "stdio",
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "/path/to/anythingllm-mcp",
        "anythingllm-mcp"
      ],
      "env": {
        "ANYTHINGLLM_API_KEY": "${input:anythingllm_api_key}",
        "ANYTHINGLLM_BASE_URL": "http://localhost:3001"
      }
    }
  }
}

> VS Code supports ${input:name} to prompt for the API key on each session.
>
> In a multi-root workspace, prefer an absolute path for --directory if the
> MCP server lives outside the current folder root.

If VS Code shows only a partial tool list after you update the server or switch
from another AnythingLLM integration to this local one:

  1. Run MCP: List Servers and confirm anythingllm or your chosen server name
    starts successfully.
  2. Run MCP: Reset Cached Tools to clear stale tool metadata.
  3. Restart the MCP server from MCP: List Servers.

Claude Desktop

Edit claude_desktop_config.json (Settings → Developer → Edit Config):```json
{
"mcpServers": {
"anythingllm": {
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/anythingllm-mcp",
"anythingllm-mcp"
],
"env": {
"ANYTHINGLLM_API_KEY": "YOUR_API_KEY",
"ANYTHINGLLM_BASE_URL": "http://localhost:3001"
}
}
}
}


### Cursor

Add to `.cursor/mcp.json` in your project root, or to the global config at
`~/.cursor/mcp.json` (Linux/macOS) / `%USERPROFILE%\.cursor\mcp.json` (Windows):```json
{
  "mcpServers": {
    "anythingllm": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "/path/to/anythingllm-mcp",
        "anythingllm-mcp"
      ],
      "env": {
        "ANYTHINGLLM_API_KEY": "YOUR_API_KEY",
        "ANYTHINGLLM_BASE_URL": "http://localhost:3001"
      }
    }
  }
}

> Note: ANYTHINGLLM_BASE_URL defaults to http://localhost:3001, which is
> the application port inside the container. If you publish Docker as
> 3002:3001, use http://localhost:3002 in client configuration.

Run (standalone)

If you already exported the variables in your shell:```sh
uv run anythingllm-mcp


If you want to load them from `.env` at launch time:```sh
uv run --env-file .env anythingllm-mcp

Development

Install test dependencies and run the test suite:```sh
uv sync --extra dev
uv run pytest


## Troubleshooting

### "API key is missing" or 401 Unauthorized

The server could not authenticate with AnythingLLM. Check that:

1. `ANYTHINGLLM_API_KEY` is set in your environment or in the `env` block of
   your MCP client configuration.
2. The key matches an active key in AnythingLLM (Settings → API Keys).
3. The key has no leading or trailing whitespace.

### "Connection refused" or timeout

The server could not reach AnythingLLM. Check that:

1. AnythingLLM is running (open `http://localhost:3001` in a browser).
2. `ANYTHINGLLM_BASE_URL` points to the correct host and port.
3. No firewall or VPN is blocking the connection.

### Docker port mismatch

If AnythingLLM runs in Docker with a port mapping like `3002:3001`:

- **Inside the container**, the application listens on port `3001`.
- **On the host**, you access it on port `3002`.

Because the MCP server runs on the host (not inside the container), set:```dotenv
ANYTHINGLLM_BASE_URL=http://localhost:3002

Always use the host port (the left side of the -p or ports: mapping).

MCP server running inside a container (Dev Containers, Docker Compose)

If the MCP server itself runs inside a container (for example, a
VS Code Dev Container),
localhost refers to that container's own network — not to the host machine.
To reach AnythingLLM running on the host or in another container with a
published port, use host.docker.internal:```dotenv
ANYTHINGLLM_BASE_URL=http://host.docker.internal:3001


If both the MCP server and AnythingLLM are containers on the **same Docker
network** (for example, in the same `docker-compose.yml`), use the **service
name** as hostname instead:```dotenv
# "anythingllm" is the service name defined in docker-compose.yml
ANYTHINGLLM_BASE_URL=http://anythingllm:3001

In this case, use the container port (3001), not the host-published port.

> host.docker.internal is supported on Docker Desktop (Windows and macOS) and
> on Docker Engine 20.10+ for Linux (requires --add-host=host.docker.internal:host-gateway
> or the equivalent extra_hosts in Compose).

Security notes

  • Never commit real API keys.
  • Use environment variables for secrets.
  • Use least-privileged AnythingLLM API tokens when possible.

License

MIT

常见问题

8 问
答案由本站依据条目字段整理,不引用上游原文
Anythingllm MCP 怎么安装?

在客户端按下面的安装命令接入:uv run --env-file .env anythingllm-mcp。装完在客户端配置里引用同一个包或端点。

Anythingllm MCP 怎么在 Claude Desktop、Claude、Cursor 里配置?

它的传输方式是stdio · 本地进程,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

Anythingllm MCP 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Anythingllm MCP 需要 API Key 吗?

资料标注为无需认证,装好就能连;如果实际调用时报鉴权错误,按官方文档补上凭据。

Anythingllm MCP 支持哪些客户端?

资料标注支持 Claude Desktop、Claude、Cursor、VS Code;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

Anythingllm MCP 能提供哪些能力?

资料显示约 5 个工具;能力标签包括 工作区管理、向量搜索、Python、Claude。具体工具清单以官方文档为准。

Anythingllm MCP 需要什么运行环境?

运行时为 Python;属于本地进程,需要在本机装好运行环境。

Anythingllm MCP 是本地还是远程?

它是本地进程(stdio),由客户端在本机拉起。传输方式为stdio · 本地进程。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-17。