@dachengzhihui/keyan-deployer-mcp
v0.1.1
Published
MCP server for keyan-deployer REST API
Downloads
31
Readme
keyan-deployer-mcp
MCP server exposing the keyan-deployer REST API as resource-aggregated tools for Claude Code.
Install (Claude Code)
claude mcp add keyan-deployer-mcp \
-e KEYAN_API_URL=https://your-host \
-e DEPLOY_PASSWORD=xxx \
-- npx -y @dachengzhihui/keyan-deployer-mcpFor other MCP clients (Claude Desktop, Cursor, Windsurf, VS Code/Copilot, Cline, Codex CLI, Gemini CLI, …) see INSTALL.md.
Env vars
| Var | Required | Description |
|-----|----------|-------------|
| KEYAN_API_URL | yes | API base URL, e.g. https://example.com |
| DEPLOY_PASSWORD | yes | Bearer auth password |
Tools
Each tool takes { action, params }. Run a tool with action: "list"/etc.; the tool
description enumerates every action and its params.
sites, site_records, ports, system,
reports, report_folders, report_records, report_tags, comment_config.
File-upload actions (sites.deploy, reports.create, report_records.create)
take a local file path; the server reads it and uploads multipart.
Deploy a project & get an access link (host:port)
sitescreate{ code, name, category, type, config? }- frontend:
category="frontend",type="static"|"spa"(spa archive must containindex.html) - backend:
category="backend",type="fastapi"(archive must containpyproject.toml);config.envinjects env vars - reverse proxy:
category="proxy",config.upstream_url=...(ready immediately, no deploy)
- frontend:
sitesdeploy{ id, archive_path }until the recordstatusissuccesssitesget{ id }to readport; the link ishttp://{host}:{port}/, where{host}is the hostname of yourKEYAN_API_URL(it maps to the deploy machine). Thesitestool description shows the concrete host at runtime.sitesstop/start/restart{ id }to control it
Custom domains / HTTPS are managed in the desktop app, not the MCP server.
Develop
cd mcp
npm install
npm test # 18 tests
npm run build # -> dist/Release (publish a new version to npm)
The package is published as @dachengzhihui/keyan-deployer-mcp;
npx -y @dachengzhihui/keyan-deployer-mcp always pulls the latest.
cd mcp
# 1. bump version in package.json (e.g. 0.1.0 -> 0.1.1)
npm run build
npm publish --access public # scoped package: first publish must be publicNo-OTP publishing: put an npm Automation or Granular Access token (one that
bypasses 2FA) in ~/.npmrc:
//registry.npmjs.org/:_authToken=npm_xxxxxxxxThen npm publish needs no one-time code. Create the token at
https://www.npmjs.com/settings/USERNAME/tokens. Never commit the token; for CI use a
repo secret and reference it as //registry.npmjs.org/:_authToken=${NPM_TOKEN}.
