Skip to content

Releases: OpusProjects/cdmon-mcp

v0.2.1

Choose a tag to compare

@blaipr blaipr released this 02 Sep 22:09
dc2aad0

Five fixes, no new tools. Three of them are about the same failure shape this project cares most about — a no-op reported as success — and two are bookkeeping.

Fixed

  • The CLI ran nothing through the bin link. cdmon --help via npm link or npm install -g printed nothing and exited 0: Node resolves the entry point's symlink, so import.meta.url never matched the linked process.argv[1]. The main-module check now resolves both sides through the filesystem.
  • db_query let two writes through. EXPLAIN ANALYZE UPDATE ... executes the statement it explains on MySQL 8, and SELECT ... INTO OUTFILE writes a file on the database host. Both are now refused like any other write; plain EXPLAIN is still allowed.
  • An expired phpMyAdmin session was a silent success. After 24 idle minutes phpMyAdmin answers a statement with its login page — status 200, no error, no rows — so the next db_execute from a long-lived server was reported as applied with nothing affected. The client now recognises that page, logs in again and re-sends the statement once; if the login page comes back again, the statement fails by name.
  • The upload dry run counted characters, not bytes. A file with accents or emoji previewed at one size and landed at another. Both now report UTF-8 bytes.
  • Failed uploads and deletes now reach the audit log, as failed entries carrying the path and the error, matching what db_execute already recorded.

No breaking changes. See the CHANGELOG, docs/safety.md and docs/phpmyadmin.md.

v0.2.0

Choose a tag to compare

@blaipr blaipr released this 18 Aug 06:49

Two additions, both about getting data safely off the server — which was the one gap in v0.1.0's safety story: it could run a migration but not back up before one.

Added

  • db_dump (cdmon db:dump [file]) — export the whole database as SQL, schema and data, every table. Read-only, so it needs no CDMON_ALLOW_WRITES, the same standing as db_query. The backup to take before letting anything near db_execute. A response that comes back as an HTML page rather than SQL is raised, never returned — a backup that is secretly an error page is worse than none.
  • cdmon files:download <remote> <local> — stream a remote file to disk, byte for byte, any size. For backups and binaries, which files:read cannot handle: reading a JPEG through files:read decodes it as UTF-8 and corrupts it. Command line only, because the MCP tools never take a local filesystem path.

Both verified against a live cdmon site: a 31-table dump that ends on the proper trailer, and a 126 KB JPEG downloaded with its magic bytes intact.

No breaking changes. See the CHANGELOG and docs/tools.md.

v0.1.0

Choose a tag to compare

@blaipr blaipr released this 17 Aug 00:11

First release.

An MCP server and CLI for deploying files and running SQL on cdmon shared hosting, where a deploy is otherwise FTP and phpMyAdmin done by hand.

Unofficial — not affiliated with, endorsed by or supported by cdmon.

What it does

  • Files over FTP — list, read, upload and delete, confined to a configured root
  • SQL through phpMyAdmin — one statement per request, so a partial apply is never silent
  • Read-only by default — writes need CDMON_ALLOW_WRITES, and then still default to a dry run
  • Path traversal refused — every path resolves inside the root, and is never quietly clamped
  • Rate limited — operations are serialised and paced, because cdmon blocks bursts
  • Audited — every write appends a redacted JSON line
  • Same core in CI — a cdmon CLI for jobs with no model in them

Two things cdmon users need to know

Their phpMyAdmin is shared across all customers, so set CDMON_PMA_DOMAIN to your domain. Without it the login returns the domain picker and fails in a way that reads like a wrong password.

It also serves an incomplete certificate chain, so Node refuses the connection. Supply the missing intermediate via NODE_EXTRA_CA_CERTS — see docs/phpmyadmin.md. There is deliberately no option to skip verification; the database password crosses that connection.

Note that cdmon offers no FTPS (500 AUTH not understood), so the FTP password travels in the clear.

Install

Node 20+. Not published to npm:

git clone https://github.com/OpusProjects/cdmon-mcp.git
cd cdmon-mcp && npm install

See docs/installation.md for MCP client configuration and every setting.