AnythingLLM MCP Server
Enables seamless integration with AnythingLLM instances, providing complete workspace management, chat operations, document handling, user administration, and AI agent configuration through natural language.
README
AnythingLLM MCP Server
An MCP (Model Context Protocol) server that enables seamless integration between AnythingLLM and MCP-compatible clients like TypingMind, Claude Desktop, and more.
Features
- 🚀 Complete AnythingLLM API Integration: Access all AnythingLLM features through MCP
- 💬 Workspace Management: Create, update, delete, list workspaces and manage their settings
- 🤖 Chat Integration: Send messages, manage chat history, and stream responses
- 📄 Document Management: Upload, list, delete documents, process URLs, and manage vectors
- 🔍 Embedding & Search: Embed text/webpages and search within workspaces
- 👥 User Management: Create, update, delete users and manage permissions
- 🔑 API Key Management: Programmatically manage API keys
- ⚙️ System Administration: Configure LLM providers, vector databases, and system settings
- 🤖 Agent Support: Create and manage AI agents with custom prompts and tools
- 📊 System Monitoring: Access system information and statistics
- 🔐 Secure Authentication: API key-based authentication with environment variable support
Prerequisites
- Node.js 18+ installed
- AnythingLLM instance running with API access enabled
- AnythingLLM API key (obtain from your AnythingLLM instance at
/settings/api-keys)
Installation
Option 1: Using npx (Recommended)
No installation needed! You can run the server directly with npx when configuring your MCP client.
Option 2: Global Installation
npm install -g anythingllm-mcp-server
Option 3: Local Installation
git clone https://github.com/yourusername/anythingllm-mcp-server.git
cd anythingllm-mcp-server
npm install
Configuration
For TypingMind.com
Setup Instructions
-
Go to TypingMind.com
-
Click on Settings → MCP Servers
-
In the MCP configuration editor, add the AnythingLLM server:
{ "mcpServers": { "anythingllm": { "command": "npx", "args": ["-y", "anythingllm-mcp-server@2.0.0"] } } } -
Click Save - TypingMind will restart the MCP servers
-
Look for the "Connected" status
First Time Usage
After the server connects, initialize it with your AnythingLLM credentials:
-
In the chat, type:
Use the initialize_anythingllm tool with apiKey: "your-api-key" and baseUrl: "http://localhost:3001" -
Replace:
"your-api-key"with your AnythingLLM API key (get it from AnythingLLM → Settings → API Keys)"http://localhost:3001"with your AnythingLLM instance URL
-
You'll see: "AnythingLLM client initialized successfully"
Example Commands
After initialization, use natural language to interact with AnythingLLM:
- "List all my workspaces"
- "Create a new workspace called 'Project Documentation'"
- "Chat with the 'research' workspace about the latest findings"
- "Show me all documents in the 'knowledge-base' workspace"
TypingMind will automatically use the appropriate AnythingLLM tools.
For Claude Desktop
Add to your Claude Desktop configuration file:
On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"anythingllm": {
"command": "npx",
"args": ["-y", "anythingllm-mcp-server@1.0.3"]
}
}
}
Initialization
When first using the server in your MCP client, you'll need to initialize it with your AnythingLLM credentials by calling the initialize_anythingllm tool:
Use the initialize_anythingllm tool with apiKey: "your-api-key" and baseUrl: "http://localhost:3001"
- apiKey: Get this from your AnythingLLM instance at
/settings/api-keys - baseUrl: Your AnythingLLM instance URL (default:
http://localhost:3001)
You can also set these as environment variables:
ANYTHINGLLM_API_KEY: Your API keyANYTHINGLLM_BASE_URL: Your instance URL
Available Tools
Initialization
| Tool | Description | Parameters |
|---|---|---|
initialize_anythingllm |
Initialize the AnythingLLM client with API credentials | apiKey (string), baseUrl (optional string) |
Workspace Management
| Tool | Description | Parameters |
|---|---|---|
list_workspaces |
Get all workspaces | None |
get_workspace |
Get details of a specific workspace | slug (string) |
create_workspace |
Create a new workspace | name (string) |
update_workspace |
Update workspace settings | slug (string), updates (object) |
delete_workspace |
Remove a workspace | slug (string) |
get_workspace_settings |
Get settings for a specific workspace | slug (string) |
update_workspace_settings |
Update workspace-specific settings | slug (string), settings (object) |
Chat Operations
| Tool | Description | Parameters |
|---|---|---|
chat_with_workspace |
Send messages to a workspace | slug (string), message (string), mode (optional: "chat" or "query") |
get_chat_history |
Get chat history for a workspace | slug (string), limit (optional number) |
clear_chat_history |
Clear all chat history for a workspace | slug (string) |
Document Management
| Tool | Description | Parameters |
|---|---|---|
list_documents |
View all documents in a workspace | slug (string) |
delete_document |
Remove a document from a workspace | slug (string), documentId (string) |
process_document_url |
Process a document from a URL | slug (string), url (string) |
get_document_vectors |
Get vector embeddings for a document | slug (string), documentId (string) |
Embedding & Search
| Tool | Description | Parameters |
|---|---|---|
embed_text |
Embed text directly into a workspace | slug (string), texts (array of strings) |
embed_webpage |
Embed a webpage into a workspace | slug (string), url (string) |
search_workspace |
Search within a workspace | slug (string), query (string), limit (optional number) |
User Management
| Tool | Description | Parameters |
|---|---|---|
list_users |
List all users in the system | None |
create_user |
Create a new user | username (string), password (string), role (optional string) |
update_user |
Update an existing user | userId (string), updates (object) |
delete_user |
Delete a user | userId (string) |
API Key Management
| Tool | Description | Parameters |
|---|---|---|
list_api_keys |
List all API keys | None |
create_api_key |
Create a new API key | name (string) |
delete_api_key |
Delete an API key | keyId (string) |
System Administration
| Tool | Description | Parameters |
|---|---|---|
get_system_settings |
View system configuration | None |
update_system_settings |
Modify system settings | settings (object) |
get_system_info |
Get general system information | None |
get_system_stats |
Get system statistics | None |
LLM Provider Management
| Tool | Description | Parameters |
|---|---|---|
list_llm_providers |
List available LLM providers | None |
update_llm_provider |
Update LLM provider configuration | provider (string), apiKey (optional string), model (optional string) |
Vector Database Management
| Tool | Description | Parameters |
|---|---|---|
get_vector_database_info |
Get vector database configuration | None |
update_vector_database |
Update vector database configuration | provider (string), config (object) |
Agent Management
| Tool | Description | Parameters |
|---|---|---|
list_agents |
List all available agents | None |
create_agent |
Create a new agent | name (string), systemPrompt (optional string), tools (optional array) |
update_agent |
Update an existing agent | agentId (string), updates (object) |
delete_agent |
Delete an agent | agentId (string) |
invoke_agent |
Invoke an agent with input | agentId (string), input (string) |
Usage Examples
Once configured, you can interact with AnythingLLM through your MCP client:
List all workspaces
"Use the list_workspaces tool to show me all available workspaces"
Create a new workspace
"Create a new workspace called 'Project Documentation' using the create_workspace tool"
Chat with a workspace
"Use chat_with_workspace to ask the 'research' workspace: What are the key findings from the latest report?"
Manage documents
"List all documents in the 'knowledge-base' workspace"
"Delete document with ID 'doc123' from the 'archive' workspace"
API Reference
This MCP server connects to the following AnythingLLM API endpoints:
/api/v1/workspaces- Workspace operations/api/v1/workspace/{slug}/chat- Chat functionality/api/v1/workspace/{slug}/documents- Document management/api/v1/system/settings- System configuration
For complete API documentation, visit /api/docs on your AnythingLLM instance.
Troubleshooting
Connection Issues
- ✅ Ensure your AnythingLLM instance is running and accessible
- ✅ Verify the API key has proper permissions
- ✅ Check that the base URL is correct (include http/https)
- ✅ Make sure the AnythingLLM API is enabled in your instance
API Errors
- Most errors will include descriptive messages
- Check AnythingLLM logs for detailed error information
- Ensure your API key hasn't expired
- Verify workspace slugs are correct when accessing specific workspaces
Common Issues
"Client not initialized" error:
- Make sure you've initialized the server with your API key and base URL
"Workspace not found" error:
- Check that the workspace slug is correct
- Use
list_workspacesto see available workspaces
Connection refused:
- Verify AnythingLLM is running on the specified port
- Check firewall settings
Security Notes
- 🔐 Keep your API key secure and never commit it to version control
- 🔒 Use environment variables for sensitive configuration in production
- 🛡️ Restrict API key permissions to only what's needed
- ⚠️ Never share your API key publicly
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
- 🐛 Issues: GitHub Issues
- 📖 AnythingLLM Docs: docs.useanything.com
- 💬 AnythingLLM Community: Discord
Acknowledgments
- AnythingLLM by Mintplex Labs
- Model Context Protocol by Anthropic
- TypingMind for MCP support
Made with ❤️ for the AnythingLLM community
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。