Between chat messages, the system clock keeps advancing. In AnythingLLM Docker on Linux, an MCP server connects agents to tools that can obtain live information from a running program.
A stdio MCP server runs inside the AnythingLLM container, so its commands and file paths belong to that container. The Time MCP Server supplies a small clock integration without an account, API key, host filesystem access, or another listening port.
Begin with an existing workspace using a tool-capable language model. A working Ollama connection and a downloaded tool-capable model supply the local model side; ordinary chat success alone does not prove tool calling. The container must also have internet access for the time server's first dependency download.
Steps to add an MCP server in AnythingLLM:
- Open AnythingLLM's settings with the wrench icon at the bottom of the workspace sidebar.
The commands use a container named anythingllm. A different installation name needs the same substitution in each Docker command.
- Open Agent Skills in the settings sidebar.
Opening this page creates /app/server/storage/plugins/anythingllm_mcp_servers.json if it does not exist. MCP servers and their tools are instance-wide, rather than isolated to the workspace currently open.
- Copy the current MCP configuration from the container to a private working directory.
$ docker cp anythingllm:/app/server/storage/plugins/anythingllm_mcp_servers.json anythingllm_mcp_servers.json
The configuration may contain credentials for existing servers. The local filename must be unused. This copy allows editing with your usual text editor without installing an editor inside the container.
- Back up the copied configuration before editing it.
$ cp anythingllm_mcp_servers.json anythingllm_mcp_servers.json.bak
The backup preserves existing servers. These files may contain credentials when other integrations are configured, so they belong in a private working directory.
- Open the copied anythingllm_mcp_servers.json in your text editor.
- Add the following clock entry inside the copied file's mcpServers object using your text editor.
An MCP command executes code with AnythingLLM's container permissions, including access to its storage and network. Only trusted server packages belong here. The pinned package below is the Time MCP Server from the Model Context Protocol servers project.
"clock": { "command": "uvx", "args": [ "--from", "mcp-server-time==2026.11.11", "mcp-server-time", "--local-timezone", "UTC" ], "env": { "UV_CACHE_DIR": "/app/server/storage/.cache/uv" } }The file is anythingllm_mcp_servers.json in your working directory. Existing entries stay inside mcpServers alongside clock, separated by commas. The Docker image includes uvx; a host installation is not used. The cache path keeps downloaded dependencies inside AnythingLLM's persistent storage.
- Save anythingllm_mcp_servers.json in your editor.
- Copy the edited configuration back into the container.
$ docker cp anythingllm_mcp_servers.json anythingllm:/app/server/storage/plugins/anythingllm_mcp_servers.json
- Restore the configuration file's ownership to the AnythingLLM application user.
$ docker exec --user 0 anythingllm chown 1000:1000 /app/server/storage/plugins/anythingllm_mcp_servers.json
docker cp can give the file the copying user's ownership. The published image runs as UID/GID 1000:1000; this command changes only the MCP configuration file, allowing AnythingLLM to save later tool selections.
- Check that the saved configuration parses as JSON.
$ docker exec anythingllm python3 -c "import json; json.load(open('/app/server/storage/plugins/anythingllm_mcp_servers.json')); print('JSON syntax OK')" JSON syntax OKA parsing error means the file needs correction before reload. The backup remains available if existing entries were damaged.
- Click Refresh beside MCP Servers on the Agent Skills page.
The refresh operation restarts every configured MCP server and reloads its tools. Running calls in other workspaces can be interrupted.
- Confirm the browser's MCP refresh prompt with OK.
The prompt warns that all MCP servers will restart. The first clock startup may take longer while uvx downloads dependencies; no container restart is required.
- Select Clock in the MCP Servers list.

- Confirm that get_current_time is enabled in the Clock panel.
The panel also lists convert_time and get_time_ago. A stopped server or error card means the integration is not ready. Container logs can identify a missing executable or dependency-download failure.
Related: How to view Docker logs for AnythingLLM - Return to workspaces with the back arrow at the bottom of the settings sidebar.

- Open your agent workspace from the sidebar.
Clock Desk is an existing workspace in these images. Its optional custom Ollama model local-agent:latest uses qwen2.5:3b with num_thread 2, num_ctx 2048, num_batch 64, and num_predict 256. These settings limit CPU threads, context, prompt batching, and reply length for a short request. The AnythingLLM model context is also 2048; larger tool sets need more context and memory. Your workspace and model names can differ; Agent mode or an explicit @agent request is needed for agent tools.
- Start a fresh conversation with New Thread.

- Enter
@agent Call clock-get_current_time with timezone UTC. Return only the datetime field unchanged, including the +00:00 suffix.in the message box.
- Send the request with the upward-arrow button.

- Open the Thought for activity above the completed reply.

- Confirm that the expanded activity reports a successful clock:get_current_time call.
The activity should identify the clock server and report completion; an empty argument object uses the configured UTC default. The reply may include the returned datetime, which changes on every call and uses +00:00 for UTC. A guessed time without a tool call or a failed call does not establish a working agent integration. A running server with no call points to the selected model, agent mode, or available context rather than successful MCP use.