anythingllm-mcp
AnythingLLM MCP 服务器
适用于 AnythingLLM(一体化 AI 文档聊天平台)的完整 MCP(模型上下文协议)服务器。
功能
无需人工干预。只需设置您的 API 密钥即可使用。
工具(共 15 个)
系统
check_token- 验证 API 令牌generate_api_key- 生成新的 API 密钥(管理员)
工作区
list_workspaces- 列出所有工作区get_workspace- 获取工作区详情create_workspace- 创建新工作区update_workspace- 更新工作区设置delete_workspace- 删除工作区
聊天
chat- 发送聊天消息(聊天/查询模式)stream_chat- 流式传输聊天响应
文档
upload_document- 将文档上传到工作区update_embeddings- 管理工作区嵌入list_workspace_documents- 列出工作区文档
会话
list_threads- 列出工作区会话get_thread- 获取会话详情delete_thread- 删除会话
系统与兼容性
get_system_env- 获取系统配置openai_chat_completion- 兼容 OpenAI 的端点
Related MCP server: AnythingLLM MCP Server
快速入门
1. 安装
npm install -g anythingllm-mcp2. 设置 API 密钥
从 AnythingLLM 获取您的 API 密钥:设置 > 开发者 API
export ANYTHING_LLM_API_KEY="your-api-key-here"
export ANYTHING_LLM_BASE="http://localhost:3001/api/v1" # optional, default3. 添加到 OpenCode
添加到您的 opencode.json 中:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"anythingllm": {
"type": "local",
"command": ["anythingllm-mcp"],
"environment": {
"ANYTHING_LLM_API_KEY": "your-api-key-here",
"ANYTHING_LLM_BASE": "http://localhost:3001/api/v1"
},
"enabled": true
}
}
}4. 在任何会话中使用
工具现已可用。示例:
> Use the chat tool to ask AnythingLLM about my documents开发
git clone https://github.com/moliv/anythingllm-mcp.git
cd anythingllm-mcp
npm install
npm run build要求
正在运行的 AnythingLLM(本地或远程)
有效的 AnythingLLM API 密钥
Node.js 18+
许可证
MIT
Available Tools
17 toolschatC
Send a chat message to a workspace (mode: chat or query)
Inputs: workspace (required), message (required), mode, userId.
check_tokenA
Validate the current API token
Inputs: no named parameters.
create_workspaceC
Create a new workspace
Inputs: name (required), slug, openAiTemp, openAiHistory, +2 more.
delete_threadC
Delete a thread from a workspace
Inputs: workspace (required), threadSlug (required).
delete_workspaceC
Delete a workspace
Inputs: slug (required).
generate_api_keyB
Generate a new API key (admin)
Inputs: no named parameters.
get_system_envB
Get system environment configuration
Inputs: no named parameters.
get_threadC
Get details of a specific thread
Inputs: workspace (required), threadSlug (required).
get_workspaceB
Get details of a specific workspace
Inputs: slug (required).
list_threadsC
List all threads in a workspace
Inputs: workspace (required).
list_workspace_documentsC
List all documents in a workspace
Inputs: slug (required).
list_workspacesB
List all workspaces
Inputs: no named parameters.
openai_chat_completionC
OpenAI-compatible chat completion endpoint (use workspace as model)
Inputs: model (required), messages (required), stream.
stream_chatC
Stream a chat message to a workspace
Inputs: workspace (required), message (required), mode, userId, +1 more.
update_embeddingsC
Add or remove documents from workspace embeddings
Inputs: workspace (required), adds, deletes.
update_workspaceD
Update workspace settings
Inputs: slug (required), name, openAiTemp, openAiHistory, +3 more.
upload_documentC
Upload a document to a workspace
Inputs: workspace (required), filePath (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 17 tools
All tools target distinct operations: chat, workspace, thread, document, and admin functions. Chat variants (chat, stream_chat, openai_chat_completion) differ by mode, and workspace/thread/document tools have clear boundaries.
Most tools follow verb_noun pattern in snake_case (e.g., create_workspace, list_threads). A few like 'chat' and 'openai_chat_completion' deviate slightly, but overall naming is predictable.
17 tools cover workspace, document, thread, chat, and admin operations without feeling excessive. The scope matches the server's purpose well.
CRUD operations are present for workspaces and threads (though thread creation is implicit via chat). Document management includes upload, listing, and embedding updates. Missing explicit delete document but covered via update_embeddings.
Maintenance
Related MCP Connectors
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
MCP server for AI dialogue using various LLM models via AceDataCloud
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server that provides tools to interact with the LiteLLM proxy API, enabling LLM completions, embeddings, image generation, and admin operations.MIT
- AlicenseAqualityCmaintenanceEnables MCP-compatible clients to interact with AnythingLLM, providing tools for workspace management, chat and thread operations, document operations, vector search, and system inspection.348MIT
- FlicenseNot gradedqualityDmaintenanceMCP server for Rocket.Chat, enabling AI agents to interact with Rocket.Chat workspaces via tools like listing users, sending messages, and managing channels.2-
- 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