cdmon-mcp
Enables running SQL statements against a cdmon shared hosting database through the phpMyAdmin web interface, with one statement per request to prevent silent partial applies.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@cdmon-mcpdeploy the dist folder to public_html"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
cdmon-mcp
An MCP server and CLI for deploying files and running SQL on cdmon shared hosting.
Unofficial: not affiliated with, endorsed by or supported by cdmon. Ask cdmon about your hosting, and this repository's issues about this tool.
Small hosting plans have no SSH, no Composer, no Node and no build step: a deploy is files over FTP and SQL through phpMyAdmin, done by hand. This exposes both as tools an AI agent can call and as commands a CI job can run, with the host's quirks handled for you: cdmon blocks connections that come too fast, and phpMyAdmin reports a half-applied migration as a success.
Install
Requires Node 20 or newer, and a cdmon account with FTP and phpMyAdmin access. Nothing is installed on the hosting.
git clone https://github.com/blaipr/cdmon-mcp.git
cd cdmon-mcp
npm install # also builds
npm link # optional: puts cdmon-mcp and cdmon on your PATHdist/index.js is the MCP server and dist/cli.js is the cdmon command.
Related MCP server: code-copy-mcp
MCP client configuration
Pass the credentials in the client's env block, never as tool arguments:
{
"mcpServers": {
"cdmon": {
"command": "node",
"args": ["/absolute/path/to/cdmon-mcp/dist/index.js"],
"env": {
"CDMON_FTP_HOST": "ftp.example.com",
"CDMON_FTP_USER": "your-ftp-user",
"CDMON_FTP_PASS": "your-ftp-password",
"CDMON_FTP_ROOT": "/web",
"CDMON_PMA_URL": "https://phpmyadmin.example.com",
"CDMON_PMA_USER": "your-database-user",
"CDMON_PMA_PASS": "your-database-password",
"CDMON_PMA_DB": "your_database",
"CDMON_PMA_DOMAIN": "your-domain.com",
"NODE_EXTRA_CA_CERTS": "/home/you/.config/cdmon-mcp/intermediate.pem"
}
}
}
}The server starts read-only. Add CDMON_ALLOW_WRITES once you have seen it list a directory
correctly.
Command line
The same code without a model in the loop, for scripts and CI:
cdmon files:list web/css
cdmon files:read app/Config/App.php
cdmon files:upload ./app/Config/App.php app/Config/App.php --apply
cdmon files:delete old.php --apply
cdmon files:download backup_db/latest.sql ./latest.sql
cdmon db:query "SELECT COUNT(*) FROM users"
cdmon db:dump ./backup.sql
cdmon db:execute ./sql/migration.sql --applyWrites are a dry run unless you pass --apply, and only --apply needs CDMON_ALLOW_WRITES, so
a migration can be previewed before writing is enabled. db:query and db:execute return at most
200 rows unless you pass --max-rows N, and say how many they held back.
Tools
Tool | What it does |
| List a directory, relative to |
| Read a text file of up to 256 KB; larger files are refused, not truncated |
| Write a file from its content; a dry run unless |
| Delete a file; a dry run unless |
| Run one read-only statement |
| Run one or more statements, one request each; a dry run unless |
| Export the whole database as SQL |
Only the half you configure is offered: with just the CDMON_FTP_* variables there are no
database tools, and the other way round. A half configured partly refuses to start. Downloading a
file to a local path is CLI-only, so the server never reads or writes your disk by path.
Settings
All are environment variables; .env.example lists them.
Variable | Default | Meaning |
| FTP hostname | |
| FTP username | |
| FTP password | |
|
| Directory every file operation is confined to |
|
| Pause after each FTP operation |
|
| FTP timeout |
|
| Use FTPS (cdmon's FTP server does not offer it) |
| phpMyAdmin base URL | |
| Database username | |
| Database password | |
| Database name | |
| Hosted domain to sign into; required on cdmon | |
|
| HTTP timeout per statement |
|
| Required for uploads, deletes and data-changing SQL |
|
| Where every write is recorded, one redacted JSON line each |
Booleans accept 1, true, yes and on. Set CDMON_FTP_ROOT narrowly: on shared hosting an
FTP account often reaches above the site's own folder.
Without CDMON_PMA_DOMAIN, sign-in fails with "no token in the response", which looks like a wrong
password but is not.
cdmon's certificate chain
cdmon's phpMyAdmin sends its certificate without the intermediate, so Node fails with
UNABLE_TO_VERIFY_LEAF_SIGNATURE although browsers show the site as secure. Supply the missing
certificate rather than turning verification off (this tool has no setting for that):
# The issuer URL is in the certificate's Authority Information Access extension
openssl s_client -connect <host>:443 -servername <host> </dev/null 2>/dev/null \
| openssl x509 -noout -text | grep -A1 "Authority Information Access"
curl -sS http://crt.example/TheIssuer.crt | openssl x509 -inform DER -out ~/.config/cdmon-mcp/intermediate.pem
export NODE_EXTRA_CA_CERTS=~/.config/cdmon-mcp/intermediate.pemNODE_EXTRA_CA_CERTS must be set before Node starts: in the MCP client's env block, or exported
before running the CLI.
Safety
Read-only until
CDMON_ALLOW_WRITESis set, and writes are still a dry run by default.Every path must resolve inside
CDMON_FTP_ROOT; one that does not is refused, never clamped.FTP operations run one at a time, paced, because cdmon blocks bursts.
Each SQL statement is its own request, so a partial apply is reported, never silent. Transaction control (
BEGIN,COMMIT) is refused, since it cannot span separate requests.Credentials come only from the environment, never from a tool argument.
What is not protected: symlinks on the server are not resolved, there is no undo for an upload or a delete, the audit log is an ordinary file, a dry run cannot stop the site changing before the apply, and once writes are enabled anything that can call the server can write.
Development
npm install
npm run typecheck
npm testDocumentation
Installation: requirements, client setup, the CLI and every setting
Tools: each tool's arguments and output
Safety: what is refused and why
phpMyAdmin: how the web session is driven, and what markup it relies on
Development: layout, tests and releases
License
Apache 2.0, see LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Build, deploy, and host full-stack web apps from any MCP client. DB, auth, storage, cron included.
Hosted SQL Server MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Agent-first web hosting: deploy sites, apps, databases and domains over MCP.
Secure MCP server for exploring incwo CRM data, documents, and email workflows.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceA comprehensive MCP server for managing cPanel web hosting accounts via UAPI, enabling file, database, email, domain, cron, backup, and system monitoring operations.21 npm3MIT
- AlicenseAqualityDmaintenanceMCP server for copying and pasting code between files with security controls and validation.5MIT
- AlicenseAqualityAmaintenanceAn MCP server that enables AI coding agents to deploy files to FTP/FTPS/SFTP servers, with path jail, read-only mode, and dry-run capabilities.10585 npmMIT
- AlicenseNot gradedqualityBmaintenanceMCP server for managing a remote host via FTP/FTPS/SFTP/SSH, offering file transfer, optional shell execution, and MySQL query tools.115 npm1MIT