Skip to main content
Glama
xlop-dev

Coolify AnythingLLM MCP

by xlop-dev
README.md

# Coolify & AnythingLLM MCP Server 🚀

An official Model Context Protocol (MCP) server that connects your **AnythingLLM** chat interface directly to your self-hosted **Coolify** infrastructure. Manage, deploy, and troubleshoot your production servers using natural language.

Developed and maintained by the team behind [xlop.cz](https://xlop.cz) – the Czech tech hub for AI & Self-Hosting innovations.

---

## 🧠 Why this project?

Giving AI agents the power to write code is great, but giving them the context of your infrastructure is a game-changer. This MCP server acts as a secure bridge:
1. **AnythingLLM** acts as the intelligent agent and UI.
2. **MCP (Model Context Protocol)** provides the secure communication standard.
3. **Coolify API** executes the infrastructure tasks on your home lab or VPS.

## 🌟 Key Features

* **App Diagnostics:** Ask your AI about active applications, container status, and resources.
* **Log Fetching:** Let the AI read application and deployment logs to troubleshoot bugs in seconds.
* **Deployment Automation:** Trigger new builds, restarts, or rollbacks using simple prompts.
* **Secure by Design:** No hardcoded credentials. Everything runs via Environment Variables.

## 🛠️ Installation & Setup

### 1. Prerequisites
* A running **Coolify** instance with an API Token (generated in your Coolify settings).
* **AnythingLLM** (Desktop app or self-hosted via Docker).
* Node.js (v18+) or Docker environment to run this MCP server.

### 2. Environment Setup
Create a `.env` file in the root directory of this project:
```env
COOLIFY_API_URL=[https://your-coolify-instance.com/api/v1](https://your-coolify-instance.com/api/v1)
COOLIFY_API_TOKEN=your_secret_coolify_api_token

```

### 3. Connect to AnythingLLM

Open your AnythingLLM settings, navigate to **Agent Custom Tools / MCP Servers**, and add this server using the following configuration:

* **Mode:** `stdio`
* **Command:** `node`
* **Args:** `["/path/to/coolify-anythingllm-mcp/dist/index.js"]`

*(Alternatively, run it via Docker using the provided Dockerfile).*

## 🤖 Awesome Prompts to Try

Once connected, open a chat in AnythingLLM and try these:

* *"List all running applications on my Coolify server."*
* *"Check the deployment logs for my frontend app. Why did it fail?"*
* *"Restart the PostgreSQL database container immediately."*

## ⚠️ Disclaimer & Safety

Running AI with infrastructure access is powerful but experimental.

* We strongly recommend running your AI agent with **Human-in-the-loop** confirmations enabled.
* The authors are not responsible for any server downtime, data loss, or accidental resource deletion caused by your AI model.

## 📄 License

This project is open-source and licensed under the **MIT License** - see the `LICENSE` file for details.

---

*Built with ❤️ for the open-source community by [xlop.cz](https://xlop.cz).*

```

```