Contact
cpanel-mcp
Back to Work
code / ID_005

cpanel-mcp

A bridge that lets an AI agent manage cPanel files and MySQL when SSH is not available.

Case study

Solo build

Problem

My hosting plan had no SSH access. Updating files and databases meant working through cPanel by hand, so every small project change became browser work. I wanted to know whether an AI agent could operate the same account through the tools I actually had.

Constraints

  • Shared cPanel hosting with no SSH.
  • Only the cPanel API and remote MySQL were available.
  • The bridge would touch environment keys and live site files.
  • I wanted to own the code instead of adding an unvetted dependency.

Approach

  1. 01Map the available surfaceI checked what the account could already do: file management through the cPanel API and direct MySQL access. That became the boundary for the tool.
  2. 02Build a narrow MCP serverThe server exposes file list, read, write, and SQL tools to an MCP-compatible host. Zod validation keeps tool inputs strict.
  3. 03Connect it to the publishing flowI integrated it with project-pusher so project updates no longer require manual database inserts. The bridge is a small internal service, not a public API.

Tradeoffs

  • I kept the tool private and narrow instead of turning it into a general hosting product.
  • A cPanel-native MCP server now exists, but owning this version lets me control permissions, code, and key handling.

What broke

  • Finding a model that could use the tools reliably took longer than writing the file and SQL operations.
  • Collecting the environment keys was slow, and a mistake there would affect live sites. That pushed me to keep the scope narrow.

What changed

Project updates now run through the bridge instead of manual file and database edits. The tool remains a private part of my publishing workflow.

Next

Before widening access, I would add tighter credential scopes, clearer audit logs, and a small set of tests for destructive operations.

Mi/OS 7.0

A personal portfolio in two operating systems.