
Deployhq Mcp Server
io.github.deployhq由 GitHub 帳號 deployhq 發布v1.2.2更新於 Oct 24, 2026
Model Context Protocol (MCP) server for DeployHQ API integration
概覽
一個本機 MCP 伺服器,將 AI 助理連接到 DeployHQ,用來檢視專案、伺服器與部署,讀取部署日誌,並建立或管理部署相關設定。
- 可以做什麼
- 列出並檢視專案、伺服器與部署,包括分頁的部署歷史,以及單一部署詳情與完整日誌,方便排查失敗的部署。為專案建立新部署,可選擇伺服器、起訖版本、分支、排隊或預覽模式、複製設定檔、建置指令與建置快取。列出並建立帳戶 SSH 金鑰對,僅回傳公鑰與指紋。列出、建立、更新與刪除全域環境變數,可設定鎖定與建置流程標記。列出、讀取、建立、更新與刪除全域設定檔範本。
- 適用情境
- 當你透過 DeployHQ 部署,並希望助理在對話中查看部署狀態、依日誌診斷失敗的部署,或排入新部署、管理帳戶層級的環境變數與設定範本時適用。
- 執行需求
- 透過 npx 在本機執行,需要 Node.js 18 或更新版本。需要具備 API 存取權限的 DeployHQ 帳戶(付費方案提供),以及三個環境變數:DEPLOYHQ_EMAIL、DEPLOYHQ_API_KEY 與 DEPLOYHQ_ACCOUNT;LOG_LEVEL 為選用。需要能連線至 DeployHQ API 的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Deployhq Mcp Server,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
DeployHQ MCP Server
A Model Context Protocol (MCP) server for DeployHQ that enables AI assistants like Claude Desktop and Claude Code to interact with your DeployHQ deployments.
🚀 Features
- Full DeployHQ API Integration: Access projects, servers, and deployments
- Easy Installation: Use directly with
npx- no installation required - Works with Claude Desktop & Claude Code: stdio transport for both MCP clients
- Secure: Credentials via environment variables, never stored
- Type-Safe: Built with TypeScript and Zod validation
- Multiple Transports: stdio (primary), SSE, and HTTP (optional for hosting)
- Production-Ready: Comprehensive error handling and logging
📋 Available Tools
The MCP server provides 18 tools for AI assistants:
list_projects
List all projects in your DeployHQ account.
Returns: Array of projects with repository information and deployment status.
get_project
Get detailed information about a specific project.
Parameters:
permalink(string): Project permalink or identifier
list_servers
List all servers configured for a project.
Parameters:
project(string): Project permalink
list_deployments
List deployments for a project with pagination support.
Parameters:
project(string): Project permalinkpage(number, optional): Page number for paginationserver_uuid(string, optional): Filter by server UUID
get_deployment
Get detailed information about a specific deployment.
Parameters:
project(string): Project permalinkuuid(string): Deployment UUID
get_deployment_log
Get the deployment log for a specific deployment. Useful for debugging failed deployments.
Parameters:
project(string): Project permalinkuuid(string): Deployment UUID
Returns: Complete deployment log as text
create_deployment
Create a new deployment for a project.
Parameters:
project(string): Project permalinkparent_identifier(string): Server or server group UUIDstart_revision(string): Starting commit hashend_revision(string): Ending commit hashbranch(string, optional): Branch to deploy frommode(string, optional): "queue" or "preview"copy_config_files(boolean, optional): Copy config filesrun_build_commands(boolean, optional): Run build commandsuse_build_cache(boolean, optional): Use build cacheuse_latest(string, optional): Use latest deployed commit as start
list_ssh_keys
List all SSH public keys for the account.
Returns: Array of SSH keys with public keys, fingerprints, and key types. Never returns private keys.
create_ssh_key
Create a new SSH key pair for the account.
Parameters:
title(string): Title for the SSH keykey_type(string, optional): Key type — ED25519 (default) or RSA
list_global_environment_variables
List all global (account-level) environment variables.
Returns: Array of environment variables with names, masked values, and settings.
create_global_environment_variable
Create a new global environment variable available across all projects.
Parameters:
name(string): Variable namevalue(string): Variable valuelocked(boolean, optional): Lock the variable to prevent changesbuild_pipeline(boolean, optional): Make available in build pipeline
update_global_environment_variable
Update an existing global environment variable.
Parameters:
id(string): Environment variable identifiername(string, optional): Variable namevalue(string, optional): Variable valuelocked(boolean, optional): Lock statusbuild_pipeline(boolean, optional): Build pipeline availability
delete_global_environment_variable
Delete a global environment variable. This action is irreversible.
Parameters:
id(string): Environment variable identifier
list_global_config_files
List all global (account-level) config file templates.
Returns: Array of config files with paths, descriptions, and settings.
get_global_config_file
Get a specific global config file template including its body content.
Parameters:
id(string): Config file identifier (UUID)
create_global_config_file
Create a new global config file template.
Parameters:
path(string): File path (e.g.config/database.yml)body(string): File contentsdescription(string, optional): Description of the config filebuild(boolean, optional): Use with build pipeline
update_global_config_file
Update an existing global config file template.
Parameters:
id(string): Config file identifier (UUID)path(string, optional): File pathbody(string, optional): File contentsdescription(string, optional): Descriptionbuild(boolean, optional): Build pipeline flag
delete_global_config_file
Delete a global config file template. This action is irreversible.
Parameters:
id(string): Config file identifier (UUID)
🚀 Quick Start
Easy Installation with Claude Code
The fastest way to install for Claude Code:
Replace [email protected], your-api-key, and your-account with your actual DeployHQ credentials.
Manual Configuration (Works for Both Claude Desktop and Claude Code)
The same configuration works for both clients. Copy from docs/claude-config.json and add your credentials.
For Claude Desktop:
Edit your config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Then restart Claude Desktop.
For Claude Code:
Add to your .claude.json file in your project directory, then exit and restart your Claude session (type exit or Ctrl+D, then run claude).
Configuration:
Note: Only the 3 DeployHQ credentials are required. LOG_LEVEL is optional and defaults to INFO.
Start Using
Once configured, you can ask Claude to interact with DeployHQ:
- "List all my DeployHQ projects"
- "Show me the servers for project X"
- "Get the latest deployment status for project Y"
- "Create a new deployment for project Z"
- "Show me the deployment log for the latest deployment"
- "List my global environment variables"
- "Create a global config file template for database.yml"
- "Show my SSH keys"
💡 Common Usage Examples
Check Deployment Status
Debug Failed Deployment
Deploy Latest Changes
Complete Workflow Example
🔧 Configuration Options
Environment Variables
Required
DEPLOYHQ_EMAIL: Your DeployHQ login emailDEPLOYHQ_API_KEY: Your DeployHQ password/API keyDEPLOYHQ_ACCOUNT: Your DeployHQ account name (from URL:https://ACCOUNT.deployhq.com)
Optional
LOG_LEVEL: Controls log verbosity -ERROR,INFO, orDEBUG(default:INFO)NODE_ENV: Environment mode -productionordevelopmentDEPLOYHQ_READ_ONLY: Set totrueto block all mutating operations (default:false)
Log Levels
Control verbosity with the LOG_LEVEL environment variable:
- ERROR: Only show errors
- INFO: Show info and errors (default)
- DEBUG: Show all logs including detailed API calls
Example:
🐛 Troubleshooting
Server Won't Start
Problem: Server exits immediately after starting
Solutions:
- Check that all required environment variables are set
- Verify Node.js version is 18 or higher:
node --version - Check logs in Claude Desktop/Code for error messages
- Try setting
LOG_LEVEL=DEBUGfor more details
Authentication Errors
Problem: "Authentication failed" or 401/403 errors
Solutions:
- Verify your email and API key are correct
- Check that your API key hasn't expired
- Ensure your account has API access enabled
- Try logging into DeployHQ web interface with same credentials
Project Not Found
Problem: "Project not found" or 404 errors
Solutions:
- Use
list_projectsto see exact permalink format - Project permalinks are case-sensitive
- Check that you have access to the project in DeployHQ
Deployment Creation Blocked
Problem: "Server is running in read-only mode" error when trying to create deployments
Solution:
- Read-only mode is disabled by default, but you may have enabled it
- To disable read-only mode, set
DEPLOYHQ_READ_ONLY=falsein your environment variables - Or use the
--read-only=falseCLI flag - See the Security section for detailed instructions on read-only mode
Deployment Fails
Problem: Deployment created but fails immediately
Solutions:
- Use
get_deployment_logto see detailed error logs - Verify server UUID is correct with
list_servers - Check that start and end revisions exist in repository
- Ensure server has correct deploy keys configured
Connection Timeouts
Problem: "Request timeout" errors
Solutions:
- Check your internet connection
- Verify DeployHQ API is accessible:
curl https://YOUR_ACCOUNT.deployhq.com - Large deployment lists may take time - use pagination
- Try again in a moment if DeployHQ is experiencing issues
Logs Not Showing
Problem: Not seeing any log output
Solutions:
- Logs go to stderr, not stdout (for stdio transport)
- Check Claude Desktop/Code logs location:
- macOS:
~/Library/Logs/Claude/ - Windows:
%APPDATA%\Claude\logs\
- macOS:
- Set
LOG_LEVEL=DEBUGfor verbose output - For hosted mode, check Digital Ocean logs
Getting Your DeployHQ Credentials
- Username: Your DeployHQ login email
- Password: Your DeployHQ password
- Account: Your DeployHQ account name (visible in the URL:
https://ACCOUNT.deployhq.com)
🏗️ Architecture
- Claude Desktop/Code: MCP clients that spawn the server via
npx - MCP Server: Reads credentials from environment variables, communicates via stdio
- DeployHQ API: REST API with HTTP Basic Authentication
📦 Prerequisites
- Node.js 18+ (Node 20+ recommended)
- DeployHQ account with API access (available on all paid plans)
Note: The server uses node-fetch for HTTP requests. Node 18+ is required for development tools (ESLint, Vitest).
🔧 Local Development
1. Clone the repository
2. Install dependencies
3. Run tests
4. Build the project
5. Test stdio transport locally
The server will start in stdio mode and wait for JSON-RPC messages on stdin.
6. Test with Claude Code
Configure your local .claude.json to use the built version:
🧪 Testing
The project includes a comprehensive test suite using Vitest:
Test Coverage:
- ✅ Tool Schema Validation - All 18 MCP tool schemas with valid/invalid inputs
- ✅ API Client Methods - All DeployHQ API methods with mocked responses
- ✅ Error Handling - Authentication, validation, and network errors
- ✅ MCP Server Factory - Server creation and configuration
Running Tests:
Test Stats:
- 216 tests across 10 test suites
- Covers tools, api-client, and mcp-server modules
- Uses mocked fetch for isolated unit testing
🔒 Security
Read-Only Mode (Optional)
By default, the MCP server allows all operations, including creating deployments. This is the recommended configuration for most users.
For users who want additional protection against accidental deployments, the server includes an optional read-only mode that can be enabled to block deployment creation.
Default Behavior (No Configuration Needed):
- ✅ Deployments are allowed by default
- ✅ All operations work: list, get, and create deployments
- ✅ Full functionality out of the box
When you might want to enable read-only mode:
- You want extra protection against accidental deployments via AI
- You're connecting to production environments and want an additional safety layer
- You only need read access to monitor deployments
- You're still testing the integration and want to be cautious
Important: Read-only mode is completely optional. The server works fully without it.
How to enable read-only mode:
Via environment variable:
Via CLI flag:
Configuration precedence:
- CLI flag
--read-only(highest priority) - Environment variable
DEPLOYHQ_READ_ONLY - Default value:
false(deployments allowed)
Additional Security Notes
-
Deployment Logs May Contain Secrets: Deployment logs can include environment variables, API keys, and other sensitive information. Exercise caution when using tools that retrieve logs, especially with third-party AI services.
-
Use Least-Privilege API Keys: Create dedicated API keys with minimum required permissions for MCP access. Consider separate keys for read-only vs. read-write operations.
-
Audit MCP Activity: Monitor MCP usage, especially in production environments. Review logs regularly for unexpected behavior.
-
Environment Variables: Credentials are never stored, only passed via environment variables
-
HTTPS: When using npx, credentials stay local to your machine
-
No Telemetry: No data is sent anywhere except directly to DeployHQ API
🌐 Optional: Hosted Deployment
The server can also be deployed as a hosted service with SSE/HTTP transports. This is useful for web integrations or shared team access.
🚀 Deployment to Digital Ocean
Option 1: Using the Dashboard
-
Prepare your repository:
-
Create a new app:
- Go to Digital Ocean Apps
- Click "Create App"
- Select your GitHub repository
- Choose the branch (main)
-
Configure the app:
- Digital Ocean will detect the Dockerfile automatically
- Or use the
.do/app.yamlconfiguration
-
Set environment variables:
- Go to App Settings → Environment Variables
- Add the following as encrypted variables:
DEPLOYHQ_EMAILDEPLOYHQ_API_KEYDEPLOYHQ_ACCOUNT
- Add these as regular variables:
NODE_ENV=productionPORT=8080LOG_LEVEL=info
-
Deploy:
- Click "Next" and "Create Resources"
- Wait for deployment to complete
-
Configure custom domain (optional):
- Go to Settings → Domains
- Add
mcp.deployhq.com - Update your DNS records as instructed
Option 2: Using doctl CLI
-
Install doctl:
-
Authenticate:
-
Update
.do/app.yaml:- Edit the
github.repofield with your repository - Review and adjust instance size if needed
- Edit the
-
Create the app:
-
Set environment secrets:
-
View logs:
🔒 Hosted Security
- Never commit credentials: Use
.envfor local development (excluded by.gitignore) - Use Digital Ocean secrets: Store credentials as encrypted environment variables
- HTTPS only: Digital Ocean provides automatic HTTPS
- Minimal permissions: Use a dedicated DeployHQ user with minimum required permissions
📊 Hosted Monitoring
Health Check
The hosted server includes a health check endpoint at /health:
Logs
View logs in Digital Ocean:
- Dashboard: Go to your app → Runtime Logs
- CLI:
doctl apps logs <APP_ID> --follow
Alerts
Digital Ocean will alert you on:
- Deployment failures
- Domain configuration issues
- Health check failures
🧪 Testing Hosted Server
Test the SSE endpoint:
Test the HTTP transport endpoint:
See the hosted deployment documentation for full testing examples.
📚 Project Structure
🤝 Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
For Maintainers
See RELEASING.md for instructions on creating releases and publishing to npm.
Privacy Policy
This MCP server does not collect, store, or transmit any user data beyond what is necessary to communicate with the DeployHQ API. Credentials are passed via environment variables and are never logged or persisted.
For DeployHQ's full privacy policy, see: https://www.deployhq.com/privacy
📄 License
MIT License - see LICENSE file for details
🆘 Support
- DeployHQ API Documentation: https://www.deployhq.com/support/api
- MCP Documentation: https://modelcontextprotocol.io
- Issues: https://github.com/deployhq/deployhq-mcp-server/issues
🔗 Related Links
來源:README.md,提交 3385a68
工具
0版本歷史
1- v1.2.2最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分