DirectAdmin MCP Server

DirectAdmin MCP Server

directadmin-mcp•byomryatia

A Model Context Protocol server that bridges AI assistants to DirectAdmin, exposing DirectAdmin operations as tools over an SSE endpoint.

License: MIT License•Runtime: Awaiting documentation review•Category: cloud devops

WHAT IT DOES

  • •Exposes DirectAdmin operations as MCP tools covering system management, version control, system updates and security.txt tasks.
  • •Provides an SSE-based MCP endpoint so AI assistants can query information, execute commands and receive real-time updates.
  • •Includes a command-line client for interacting with the MCP server and checking server info and health.

BEST FOR

  • •Enabling AI assistants to manage and query DirectAdmin servers through natural language tool calls.
  • •Administrators who want to check DirectAdmin version, package updates and security.txt details from an AI client.
  • •Deploying a DirectAdmin-facing MCP server with Docker or Docker Compose.

ABOUT DIRECTADMIN-MCP

DirectAdmin MCP Server is cataloged as an MCP server attributed to omryatia. A Model Context Protocol server that bridges AI assistants to DirectAdmin, exposing DirectAdmin operations as tools over an SSE endpoint. It is categorized under cloud devops. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for DirectAdmin MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

How do AI assistants connect to this MCP server?

AI assistants connect using the MCP SSE endpoint, which the README shows as the path /sse on the configured server port.

What DirectAdmin credentials are required to run the server?

DirectAdmin server URL and username are required, along with a DirectAdmin login key (preferred) or password.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 7782e80225d6 · 采集于 2026-11-13 10:39:13 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

DirectAdmin MCP Server

version

A Model Context Protocol (MCP) server for DirectAdmin integration, allowing AI assistants to interact with DirectAdmin through natural language.

Features

  • MCP Integration: Connect AI assistants to DirectAdmin using the Model Context Protocol
  • RESTful API: Comprehensive API for DirectAdmin management
  • Server-Sent Events (SSE): Real-time communication with clients
  • Tool-based Architecture: Modular design with tool-based commands
  • Command-line Client: Included client for testing and scripting
  • Docker Support: Easy deployment with Docker and Docker Compose

Architecture

This project implements a server that acts as a bridge between AI assistants and DirectAdmin:

┌──────────┐     ┌─────────────────┐     ┌────────────┐
│   AI     │     │  DirectAdmin    │     │ DirectAdmin│
│ Assistant├────►│  MCP Server     ├────►│   API      │
└──────────┘     └─────────────────┘     └────────────┘
      MCP                SSE                 HTTP

The server exposes DirectAdmin functionality through a tool-based interface, making it easy for AI assistants to understand and interact with DirectAdmin operations.

Prerequisites

  • Python 3.12+
  • DirectAdmin server with API access
  • DirectAdmin login key (preferred) or username/password

Installation

Option 1: Standard Installation

  1. Clone the repository:

    git clone https://github.com/omryatia/directadmin-mcp.git
    cd directadmin-mcp
    
  2. Create a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  3. Install dependencies:

    pip install -r requirements.txt
    
  4. Create configuration:

    cp .gitignore.sample .gitignore
    cp .env.sample .env
    # Edit .env with your DirectAdmin settings
    

Option 2: Docker Installation

  1. Clone the repository:

    git clone https://github.com/omryatia/directadmin-mcp.git
    cd directadmin-mcp
    
  2. Create configuration:

    cp .env.sample .env
    # Edit .env with your DirectAdmin settings
    
  3. Build and start with Docker Compose:

    docker-compose up -d
    

Configuration

Edit the .env file with your DirectAdmin credentials:

# DirectAdmin Settings
DA_URL=https://your-directadmin-server:2222
DA_USERNAME=admin
DA_LOGIN_KEY=your_directadmin_login_key_here/password

# Server Settings
PORT=8888
LOG_LEVEL=INFO
DEBUG=false

# SSL Settings
SSL_VERIFY=true

Configuration Options

VariableDescriptionDefault
DA_URLDirectAdmin server URL with port(Required)
DA_USERNAMEDirectAdmin username(Required)
DA_LOGIN_KEYDirectAdmin login key(Required)
PORTPort to run the MCP server on8888
LOG_LEVELLogging level (DEBUG, INFO, WARNING, ERROR)INFO
DEBUGEnable debug mode for developmentfalse
SSL_VERIFYVerify SSL certificates for DirectAdmin API callstrue

Usage

Starting the Server

You can start the server in two ways:

  1. Using FastAPI with SSE support (recommended):

    python main.py
    
  2. Using the simple MCP server:

    python server.py
    

The server will start on port 8888 by default (configurable in .env).

Using the Command-line Client

The included command-line client allows you to interact with the MCP server:

# Get server info
python client.py --info

# Check server health
python client.py --health

# Send a specific message
python client.py "Show me the version of DirectAdmin"

# Interactive mode
python client.py

Client Options

OptionDescription
--server, -sMCP server URL
--key, -kAPI key for authentication
--no-verifyDisable SSL verification
--timeout, -tRequest timeout in seconds
--info, -iGet server info
--healthCheck server health

Connecting AI Assistants

Configure your AI assistant to use the MCP endpoint:

http://your-server:8888/sse

This allows the AI assistant to:

  1. Query DirectAdmin information
  2. Execute DirectAdmin commands
  3. Receive real-time updates

Available Tools

The server exposes the following DirectAdmin operations as tools:

System Management

  • api_restart: Restart DirectAdmin
  • api_ping: Check if DirectAdmin is running

Version Control

  • api_get_version: Get DirectAdmin version information
  • api_version_update: Update DirectAdmin to the latest version
  • api_change_update_channel: Change update channel

System Updates

  • api_system_packages_updates: Get available system package updates
  • api_system_packages_update_test: Test system package update
  • api_system_packages_update_run: Run system package update

Security

  • api_security_txt_status: Check security.txt status
  • api_security_txt_get: Get security.txt content
  • api_security_txt_update: Update security.txt content

API Endpoints

EndpointMethodDescription
/GETRoot page with HTML welcome message
/aboutGETServer information
/healthGETHealth check endpoint
/sseGETMCP SSE connection endpoint
/messagesPOSTInternal endpoint for posting SSE messages

Development

Project Structure

directadmin-mcp/
├── README.md               # Project documentation
├── .env.sample             # Environment variables template
├── config.py               # Configuration module
├── main.py                 # FastAPI application with SSE support
├── server.py               # Simple MCP server
├── client.py               # Command-line client
├── da.py                   # DirectAdmin API client
├── mcp_instance.py         # MCP instance configuration
├── tools/                  # Tool modules directory
│   ├── __init__.py         # Tool loading mechanism
│   ├── common.py           # Common tool utilities
│   ├── misc.py             # Misc DirectAdmin operations
│   ├── security_txt.py     # Security.txt related tools
│   ├── system_update.py    # System update tools
│   └── versioning.py       # Versioning and update tools
│   └── and alot more ......
└── requirements.txt        # Project dependencies

Adding New Tools

  1. Create or edit a file in the tools directory
  2. Add a new function with the @mcp.tool() decorator:
import logging
from mcp_instance import mcp
from da import call_da_api
from tools.common import log_tool_call, format_response

@mcp.tool()
@log_tool_call
async def my_new_tool(param1, param2):
    """
    Tool documentation.
    
    Args:
        param1: First parameter description
        param2: Second parameter description
        
    Returns:
        Description of the return value
    """
    # Implementation
    response = await call_da_api("/api/endpoint", method="GET")
    return format_response(response)

The tool will be automatically discovered and registered when the server starts.

Logging

The server uses a comprehensive logging system:

  • Console logs: Shown in the terminal
  • File logs: Written to the logs directory
  • Error logs: Separate file for error tracking

Log levels can be configured in the .env file with the LOG_LEVEL variable.

Docker Deployment

The project includes Docker support for easy deployment:

# Build the image
docker build -t directadmin-mcp .

# Run the container
docker run -d \
  -p 8888:8888 \
  --env-file .env \
  --name directadmin-mcp \
  directadmin-mcp

Or more simply with Docker Compose:

docker-compose up -d

Security Considerations

  • Use HTTPS with a valid SSL certificate in production
  • Set up proper firewall rules to restrict access
  • Use a reverse proxy (like Nginx) with proper security headers
  • Keep your DirectAdmin login key secure and rotate it regularly
  • Consider adding authentication to the MCP server for production use

Troubleshooting

Connection Issues

If you encounter connection issues:

  1. Verify that your DirectAdmin server is accessible
  2. Check that your DirectAdmin API credentials are correct
  3. Ensure the DirectAdmin API is enabled
  4. Check your SSL settings if using HTTPS

Common Error Messages

  • "Authentication failed": Check your DirectAdmin credentials
  • "SSL verification failed": Set SSL_VERIFY=false in .env or fix your certificates
  • "Tool not found": Ensure the tool module is correctly loaded
  • "Connection refused": Check that DirectAdmin is running and accessible

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/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

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

Acknowledgments

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for DirectAdmin MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/directadmin-mcp)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related cloud devops MCP Servers

Alternative and complementary servers in the same category

View all in cloud devops →
Huawei MCP Server
mcp-server-huaweiclouddeveloper•huaweiclouddeveloper

A Model Context Protocol server built on Huawei Cloud services that enables AI assistants to operate Huawei Cloud resources within conversational workflows, supporting ECS, OBS, GaussDB, and other cloud products.

Repository stats unavailable
Cloud & DevOps
Coolify MCP Server
coolify-mcp-server•wrediam

An MCP server that exposes the Coolify v4.3.1 REST API so AI clients can manage applications, databases, services, servers, deployments, and more.

Repository stats unavailable
Cloud & DevOps

A deprecated Model Context Protocol server for interacting with Kong Konnect APIs, enabling AI assistants to query and analyze Kong Gateway configurations, traffic, and analytics.

Repository stats unavailable
Cloud & DevOps