Skip to main content
Glama
AnythingLLM Control Plane MCP Server

AnythingLLM Control Plane MCP Server

by TheNovaNodes

module_type: mcp-server status: active protocol: mcp primary_capability: AnythingLLM administration, workspace lifecycle, and automated ETL vector sync requires: AnythingLLM instance works_with: AnythingLLM, Antigravity Agent Ecosystem, MCP Clients last_verified: 2026-09-05

AnythingLLM Control Plane & ETL Sync MCP Server ๐Ÿง 

Go Version License: MIT MCP Server Status: Active

High-performance Go-based Model Context Protocol (MCP) server and automated ETL sync daemon for AnythingLLM instances (TheNovaNodes/anythingllm-mcp-control). Provides autonomous AI agents with administrative workspace management and keeps semantic vector stores in continuous synchronization with filesystem Markdown documentation.


Related MCP server: anythingllm-mcp

๐Ÿ“ฆ Core Binaries & Capabilities

The project builds two specialized Go binaries:

  • anythingllm-control โ€” Stdio-based MCP server exposing an administrative interface for managing AnythingLLM workspaces, vector indices, and system diagnostics.

  • anythingllm-sync โ€” Autonomous ETL synchronization CLI and daemon that monitors local project directories, deduplicates content via SHA-256, and handles tombstone lifecycle tracking in pure Go SQLite.


๐Ÿ› ๏ธ Exposed MCP Tools

The anythingllm-control MCP server exposes 5 administrative tools:

  • list_workspaces
    Lists all active workspaces in AnythingLLM with their slugs, IDs, and vector counts.
    Arguments: None.
    Side Effects: None (read-only).

  • create_workspace
    Creates a new isolated workspace with custom settings and vector indexing.
    Arguments: name (string, required).
    Side Effects: Creates a new workspace in the AnythingLLM database.

  • delete_workspace
    Permanently removes a workspace and purges its associated vector storage.
    Arguments: slug (string, required).
    Side Effects: Destructive permanent deletion of the workspace.

  • get_system_env
    Retrieves system environment settings, vector DB provider, and storage diagnostics dump.
    Arguments: None.
    Side Effects: None (read-only).

  • get_vector_count
    Retrieves total vector counts system-wide or for a designated workspace slug.
    Arguments: slug (string, optional).
    Side Effects: None (read-only).


๐Ÿš€ Quick Start & Building

Prerequisites

  • Go 1.25 or higher

  • GCC or Clang (optional, pure Go SQLite is used)

Build Binaries

git clone https://github.com/TheNovaNodes/anythingllm-mcp-control.git
cd anythingllm-mcp-control
make build

Compiled binaries will be created in ./bin/:

  • bin/anythingllm-control

  • bin/anythingllm-sync

Install System-wide

sudo cp bin/anythingllm-control /usr/local/bin/
sudo cp bin/anythingllm-sync /usr/local/bin/

Health Check (stdio smoke test)

anythingllm-control < /dev/null

The server will log its initialization status and exit cleanly upon receiving EOF.


โš™๏ธ Configuration & Environment Variables

The server and sync daemon read configuration from environment variables or command-line flags:

  • ANYTHINGLLM_BASE_URL (or ALM_BASE)
    Base URL of the AnythingLLM REST API.
    Default: http://127.0.0.1:3002/api/v1

  • ANYTHINGLLM_API_KEY (or MG_API_KEY)
    Bearer API key for AnythingLLM authentication.


๐Ÿ”„ Automated ETL Sync Daemon (anythingllm-sync)

anythingllm-sync scans repositories for Markdown documentation, calculates SHA-256 checksums, and uploads new or modified documents into matching AnythingLLM workspaces. When a tracked file is deleted locally, it records a tombstone and removes the document from the vector index.

CLI Flags

  • -projects (string)
    Root directory containing projects or agent offices to scan.
    Default: /root/projects

  • -state-dir (string)
    Directory storing the local SQLite state ledger (sync_state.db).
    Default: /root/projects/TheNovaNodes/ops/shared/anythingllm-sync

  • -alm-base (string)
    AnythingLLM API base URL.
    Default: http://127.0.0.1:3002/api/v1

  • -api-key (string)
    AnythingLLM Bearer API key.

  • -once (bool)
    Execute a single synchronization pass and exit immediately.

  • -interval (duration)
    Continuous daemon run interval (e.g. 15m, 1h). Default 0 runs once.

  • -timeout (duration)
    HTTP request timeout per operation.
    Default: 30s

Example Usage

# One-shot scan and index
anythingllm-sync -projects /root/projects -api-key "$ANYTHINGLLM_API_KEY" -once

# Continuous daemon running every 30 minutes
anythingllm-sync -projects /root/projects -api-key "$ANYTHINGLLM_API_KEY" -interval 30m

๐Ÿ”Œ MCP Client Configuration

Add to your MCP client configuration (e.g., Claude Desktop, Antigravity, or mcp-router):

{
  "mcpServers": {
    "anythingllm-control": {
      "command": "/usr/local/bin/anythingllm-control",
      "args": [],
      "env": {
        "ANYTHINGLLM_BASE_URL": "http://127.0.0.1:3002/api/v1",
        "ANYTHINGLLM_API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}

๐Ÿงช Testing & Code Quality

Run tests with data race detection and coverage:

# Run unit tests
make test

# Run tests with HTML/func coverage report
make coverage

# Run Go static analysis
make lint

๐Ÿ”’ Security Boundaries

  • Strict Access Control: anythingllm-control contains destructive capabilities (delete_workspace). In production setups, it must only be exposed to trusted administrative agents or partitioned via mcp-router ACLs.

  • Prompt Injection Defense: Input strings for workspace names and slugs are sanitized to prevent path traversal and API injection.

  • Zero-Secret Leakage: API keys are injected via environment variables and never logged or serialized in error outputs.


๐Ÿ“„ License

MIT License โ€” see LICENSE for full details.

Available Tools

5 tools
create_workspaceB

Create a new workspace in AnythingLLM.

Args: name: Name for the new workspace.

Returns: JSON string with created workspace details or error message.

Inputs: name (required). Returns: result

delete_workspaceB

Delete a workspace in AnythingLLM by slug.

Args: slug: The workspace slug to delete.

Returns: JSON string or status message confirming deletion or reporting error.

Inputs: slug (required). Returns: result

get_system_envA

Retrieve system environment and configuration dump from AnythingLLM Admin API.

Returns: JSON string containing system environment variables and configuration.

Inputs: no named parameters. Returns: result

get_vector_countA

Get vector count for AnythingLLM (system-wide or workspace-specific).

Args: slug: Optional workspace slug. If provided, returns vector count for that workspace.

Returns: JSON string or status message with vector count stats.

Inputs: slug. Returns: result

list_workspacesA

List all workspaces in AnythingLLM.

Returns: JSON string containing the list of workspaces or error status.

Inputs: no named parameters. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelogโ€ฆ

    TDQS

    A3.8/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool targets a distinct resource and action: workspace CRUD operations (list/create/delete) are clearly separated from system environment and vector count queries. No two tools have overlapping purposes, making selection unambiguous.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern in snake_case: list_workspaces, create_workspace, delete_workspace, get_system_env, get_vector_count. The verbs and nouns are predictable and match the action/resource pair.

    Tool Count5/5

    Five tools is well-scoped for a control plane server, covering core workspace management and system information without unnecessary bloat. The count feels appropriate for the apparent domain.

    Completeness3/5

    The workspace lifecycle is incomplete: create, list, and delete exist, but update is missing. System environment is read-only, and there is no way to modify configuration. These gaps are notable for a control plane server, though the core viewing/deleting operations are present.

    Maintenance

    ActivityNo data
    ResponsivenessSyncing

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      D
      maintenance
      MCP server for AnythingLLM that enables AI document chat platform interaction with tools for workspaces, chat, documents, threads, and system operations.
      17
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents and users to manage workspace files, monitor system metrics, take persistent notes, and retrieve weather data via MCP tools and resources.
      -
    • A
      license
      A
      quality
      C
      maintenance
      Enables MCP-compatible clients to interact with AnythingLLM, providing tools for workspace management, chat and thread operations, document operations, vector search, and system inspection.
      34
      6
      MIT