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 requiredWorks 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 7 tools for AI assistants:
Tool | Description | Parameters |
| List all projects | None |
| Get project details |
|
| List project servers |
|
| List deployments with pagination |
,
,
|
| Get deployment details |
,
|
| Get deployment log output |
,
|
| Create new deployment |
,
,
,
, + optional params |
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
๐ Quick Start
Easy Installation with Claude Code
The fastest way to install for Claude Code:
Replace your-email@example.com, 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.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Then restart Claude Desktop.
For Claude Code:
Add to your .claude.json file in your project directory.
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"
๐ก 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 -productionordevelopment
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 --versionCheck 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 formatProject permalinks are case-sensitive
Check that you have access to the project in DeployHQ
Deployment Fails
Problem: Deployment created but fails immediately
Solutions:
Use
get_deployment_logto see detailed error logsVerify server UUID is correct with
list_serversCheck 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.comLarge 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\
Set
LOG_LEVEL=DEBUGfor verbose outputFor 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
npxMCP 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
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 7 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:
50+ tests across 3 test suites
Covers tools, api-client, and mcp-server modules
Uses mocked fetch for isolated unit testing
๐ Security
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
Minimal Permissions: Use a dedicated DeployHQ user with minimum required permissions
๐ 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:
git add . git commit -m "Initial commit" git push origin mainCreate 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.comUpdate your DNS records as instructed
Option 2: Using doctl CLI
Install doctl:
# macOS brew install doctl # Linux cd ~ wget https://github.com/digitalocean/doctl/releases/download/v1.104.0/doctl-1.104.0-linux-amd64.tar.gz tar xf doctl-1.104.0-linux-amd64.tar.gz sudo mv doctl /usr/local/binAuthenticate:
doctl auth initUpdate :
Edit the
github.repofield with your repositoryReview and adjust instance size if needed
Create the app:
doctl apps create --spec .do/app.yamlSet environment secrets:
# Get your app ID doctl apps list # Update environment variables (replace APP_ID) doctl apps update APP_ID --spec .do/app.yamlView logs:
doctl apps logs APP_ID --follow
๐ 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.
๐ 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
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
DeployHQ MCP Server
- ๐ Features
- ๐ Available Tools
- ๐ Quick Start
- ๐ก Common Usage Examples
- ๐ง Configuration Options
- ๐ Troubleshooting
- ๐๏ธ Architecture
- ๐ฆ Prerequisites
- ๐ง Local Development
- ๐งช Testing
- ๐ Security
- ๐ Optional: Hosted Deployment
- ๐ Project Structure
- ๐ค Contributing
- ๐ License
- ๐ Support
- ๐ Related Links