Logo AnythingLLM MCP Server

AnythingLLM MCP Server

Cộng đồng
raqueljezweb

An MCP (Model Context Protocol) server that enables seamless integration between AnythingLLM and MCP-compatible clients like TypingMind, Claude Desktop, and more.

Nhà phát hànhraqueljezweb
Kho mãanythingllm-mcp-server
Ngôn ngữJavaScript
Bản fork
16
Sao
16
Công cụ có sẵn
38
Phương thức truyền tảistdio
Danh mục
Giấy phépMIT
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    AnythingLLM MCP Server cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 38 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    16 sao và 16 bản fork từ kho mã được liên kết.

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

bash
npm install -g anythingllm-mcp-server

Option 3: Local Installation

bash
git clone https://github.com/yourusername/anythingllm-mcp-server.git
cd anythingllm-mcp-server
npm install

Configuration

For TypingMind.com

Setup Instructions

  1. Go to TypingMind.com

  2. Click on Settings → MCP Servers

  3. In the MCP configuration editor, add the AnythingLLM server:

    json
    {
     "mcpServers": {
       "anythingllm": {
         "command": "npx",
         "args": ["-y", "anythingllm-mcp-server@2.0.0"]
        }
      }
    }
  4. Click Save - TypingMind will restart the MCP servers

  5. Look for the "Connected" status

First Time Usage

After the server connects, initialize it with your AnythingLLM credentials:

  1. In the chat, type:

    Use the initialize_anythingllm tool with apiKey: "your-api-key" and baseUrl: "http://localhost:3001"
  2. Replace:

    • "your-api-key" with your AnythingLLM API key (get it from AnythingLLM → Settings → API Keys)
    • "http://localhost:3001" with your AnythingLLM instance URL
  3. 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

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 key
  • ANYTHINGLLM_BASE_URL: Your instance URL

Available Tools

Initialization

ToolDescriptionParameters
initialize_anythingllmInitialize the AnythingLLM client with API credentialsapiKey (string), baseUrl (optional string)

Workspace Management

ToolDescriptionParameters
list_workspacesGet all workspacesNone
get_workspaceGet details of a specific workspaceslug (string)
create_workspaceCreate a new workspacename (string)
update_workspaceUpdate workspace settingsslug (string), updates (object)
delete_workspaceRemove a workspaceslug (string)
get_workspace_settingsGet settings for a specific workspaceslug (string)
update_workspace_settingsUpdate workspace-specific settingsslug (string), settings (object)

Chat Operations

ToolDescriptionParameters
chat_with_workspaceSend messages to a workspaceslug (string), message (string), mode (optional: "chat" or "query")
get_chat_historyGet chat history for a workspaceslug (string), limit (optional number)
clear_chat_historyClear all chat history for a workspaceslug (string)

Document Management

ToolDescriptionParameters
list_documentsView all documents in a workspaceslug (string)
delete_documentRemove a document from a workspaceslug (string), documentId (string)
process_document_urlProcess a document from a URLslug (string), url (string)
get_document_vectorsGet vector embeddings for a documentslug (string), documentId (string)

Embedding & Search

ToolDescriptionParameters
embed_textEmbed text directly into a workspaceslug (string), texts (array of strings)
embed_webpageEmbed a webpage into a workspaceslug (string), url (string)
search_workspaceSearch within a workspaceslug (string), query (string), limit (optional number)

User Management

ToolDescriptionParameters
list_usersList all users in the systemNone
create_userCreate a new userusername (string), password (string), role (optional string)
update_userUpdate an existing useruserId (string), updates (object)
delete_userDelete a useruserId (string)

API Key Management

ToolDescriptionParameters
list_api_keysList all API keysNone
create_api_keyCreate a new API keyname (string)
delete_api_keyDelete an API keykeyId (string)

System Administration

ToolDescriptionParameters
get_system_settingsView system configurationNone
update_system_settingsModify system settingssettings (object)
get_system_infoGet general system informationNone
get_system_statsGet system statisticsNone

LLM Provider Management

ToolDescriptionParameters
list_llm_providersList available LLM providersNone
update_llm_providerUpdate LLM provider configurationprovider (string), apiKey (optional string), model (optional string)

Vector Database Management

ToolDescriptionParameters
get_vector_database_infoGet vector database configurationNone
update_vector_databaseUpdate vector database configurationprovider (string), config (object)

Agent Management

ToolDescriptionParameters
list_agentsList all available agentsNone
create_agentCreate a new agentname (string), systemPrompt (optional string), tools (optional array)
update_agentUpdate an existing agentagentId (string), updates (object)
delete_agentDelete an agentagentId (string)
invoke_agentInvoke an agent with inputagentId (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_workspaces to 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.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

Acknowledgments


Made with ❤️ for the AnythingLLM community

Cài đặt

TypingMind
{
  "mcpServers": {
    "anythingllm-mcp-server": {
      "command": "npx",
      "args": [
        "anythingllm-mcp-server"
      ]
    }
  }
}

Công cụ có sẵn

  • initialize_anythingllm

    Initialize the AnythingLLM client with API credentials

  • list_workspaces

    List all available workspaces in AnythingLLM

  • get_workspace

    Get details of a specific workspace

  • create_workspace

    Create a new workspace

  • update_workspace

    Update an existing workspace

  • delete_workspace

    Delete a workspace

  • chat_with_workspace

    Send a chat message to a workspace

  • list_documents

    List all documents in a workspace

  • delete_document

    Delete a document from a workspace

  • get_system_settings

    Get system settings

  • update_system_settings

    Update system settings

  • list_users

    List all users in the system

  • create_user

    Create a new user

  • update_user

    Update an existing user

  • delete_user

    Delete a user

  • list_api_keys

    List all API keys

  • create_api_key

    Create a new API key

  • delete_api_key

    Delete an API key

  • embed_text

    Embed text directly into a workspace

  • embed_webpage

    Embed a webpage into a workspace

  • get_chat_history

    Get chat history for a workspace

  • clear_chat_history

    Clear all chat history for a workspace

  • get_system_info

    Get general system information

  • get_system_stats

    Get system statistics

  • list_llm_providers

    List available LLM providers

  • update_llm_provider

    Update LLM provider configuration

  • get_vector_database_info

    Get vector database configuration

  • update_vector_database

    Update vector database configuration

  • get_workspace_settings

    Get settings for a specific workspace

  • update_workspace_settings

    Update settings for a specific workspace

  • process_document_url

    Process a document from a URL

  • get_document_vectors

    Get vector embeddings for a document

  • search_workspace

    Search within a workspace

  • list_agents

    List all available agents

  • create_agent

    Create a new agent

  • update_agent

    Update an existing agent

  • delete_agent

    Delete an agent

  • invoke_agent

    Invoke an agent with input

Dùng MCP AnythingLLM MCP Server với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối AnythingLLM MCP Server, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm AnythingLLM MCP Server làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của AnythingLLM MCP Server.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "anythingllm-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "anythingllm-mcp-server"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của AnythingLLM MCP Server, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của AnythingLLM MCP Server.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng AnythingLLM MCP Server giúp tôi làm việc này không?
AnythingLLM MCP Server
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng AnythingLLM MCP Server.

Câu hỏi thường gặp

Máy chủ MCP AnythingLLM MCP Server dùng để làm gì?

AnythingLLM MCP Server là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP AnythingLLM MCP Server với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng AnythingLLM MCP Server với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP AnythingLLM MCP Server với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối AnythingLLM MCP Server, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP AnythingLLM MCP Server với TypingMind?

AnythingLLM MCP Server hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP AnythingLLM MCP Server cung cấp những công cụ nào trong TypingMind?

AnythingLLM MCP Server cung cấp 38 công cụ MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP AnythingLLM MCP Server không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu AnythingLLM MCP Server yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇