> **Update, 30 October 2026:** This article announced the local `deployhq-mcp-server` package in December 2025, and it is kept here as it was written. Our recommended setup has since changed. For access to your accounts, projects, servers and deployment status, use the **hosted MCP server** with nothing to install: read the [hosted MCP server announcement](https://www.deployhq.com/blog/introducing-the-deployhq-hosted-mcp-server), or go straight to [deployhq.com/mcp](https://www.deployhq.com/mcp) and the [hosted MCP setup guide](https://www.deployhq.com/support/hosted-mcp-server). At the time of writing it is read-only, so it cannot deploy, change configuration or read deployment logs. For deployments, rollbacks, logs and automation, use the [DeployHQ CLI](https://www.deployhq.com/agents). The local package described below is still supported for now; see its [current setup guide](https://www.deployhq.com/support/mcp-server).

Manage your deployments using natural language with Claude Code, OpenAI Codex, Gemini CLI, and any MCP-compatible AI assistant.

* * *

The way developers interact with their tools is changing. Instead of switching between dashboards, terminals, and documentation, what if you could simply ask your AI assistant to check a deployment status, debug a failed release, or push the latest changes to production?

Today, we're excited to announce the **DeployHQ MCP Server** — a new integration that brings the power of natural language to your deployment workflow. Whether you're using Claude Code, OpenAI Codex, Google's Gemini CLI, or any other MCP-compatible assistant, you can now manage your [DeployHQ](https://www.deployhq.com) deployments without ever leaving your coding environment.

## What is MCP?

The **Model Context Protocol (MCP)** is an open standard that allows AI assistants to interact with external tools and services in a structured, secure way. Think of it as a universal adapter that lets AI models understand and use your favourite developer tools.

Instead of copying and pasting between your AI assistant and various dashboards, MCP creates a direct bridge. Your AI can discover available tools, understand their parameters, and execute actions on your behalf — all through natural conversation.

## What Can You Do With the DeployHQ MCP Server?

The local [DeployHQ](https://www.deployhq.com) MCP Server package exposes seven tools. Deployment creation and log retrieval are capabilities of this local package; the hosted MCP server is currently read-only and cannot do either:

1. **List Projects** — View all projects in your [DeployHQ](https://www.deployhq.com) account with their repository information and deployment status
2. **Get Project Details** — Dive deep into a specific project's configuration
3. **List Servers** — See all servers configured for any project
4. **List Deployments** — Browse deployment history with pagination support
5. **Get Deployment Details** — Examine specific deployment information
6. **Get Deployment Log** — Retrieve complete logs for debugging failed deployments
7. **Create Deployment** — Queue new deployments with full control over options like branch, build commands, and caching

## Real-World Use Cases

The examples in this section use the local package's `get_deployment_log` and `create_deployment` tools. They are not currently available through the hosted MCP server, which is read-only; for those tasks today, use the local package or the [DeployHQ CLI](https://www.deployhq.com/agents).

### Debugging a Failed Deployment

Instead of clicking through the dashboard to find logs, simply ask:

> Why did the last deployment fail for my-website?

Your AI assistant will automatically find the failed deployment, retrieve the logs, and analyse what went wrong — often suggesting fixes before you even ask.

### Quick Status Checks

During a busy day of shipping features, stay informed without context switching:

> What's the status of my latest deployment for api-backend?

### Deploying with Confidence

When you're ready to ship:

> Deploy the latest changes to production for my-website

Your AI assistant will find the project, identify the production server, determine the correct revisions, and queue the deployment — then report back with the status.

### Monitoring Multiple Projects

For agencies or teams managing multiple sites:

> List all my [DeployHQ](https://www.deployhq.com) projects and show which ones have pending deployments

## Setting Up with Claude Code

Claude Code is Anthropic's command-line tool for agentic coding that runs directly in your terminal. Here's how to connect it to DeployHQ:

1. Ensure you have Node.js 18 or higher installed
2. Get your [DeployHQ](https://www.deployhq.com) credentials: your login email, API key (found in Settings → Security), and account name from your [DeployHQ](https://www.deployhq.com) URL
3. Add the server with `claude mcp add --env DEPLOYHQ_EMAIL=your-email@example.com --env DEPLOYHQ_API_KEY=your-api-key --env DEPLOYHQ_ACCOUNT=your-account-name --transport stdio --scope user deployhq -- npx -y deployhq-mcp-server`, which stores it in `~/.claude.json`. Alternatively, add the block below to a project's `.mcp.json` file (and keep that file out of version control, because it contains your API key). Claude Code's documented locations for MCP servers are `~/.claude.json` and a project's `.mcp.json`, not a `.claude.json` file in the project directory:

```
{
  "mcpServers": {
    "deployhq": {
      "command": "npx",
      "args": ["-y", "deployhq-mcp-server"],
      "env": {
        "DEPLOYHQ_EMAIL": "your-email@example.com",
        "DEPLOYHQ_API_KEY": "your-api-key",
        "DEPLOYHQ_ACCOUNT": "your-account-name"
      }
    }
  }
}
```

Now you can ask Claude Code to manage your deployments while you're coding. Spotted a bug in production? Ask Claude to check the deployment logs. Ready to ship a fix? Ask it to deploy — all without leaving your terminal.

## Setting Up with OpenAI Codex

OpenAI's Codex CLI is a lightweight coding agent that runs locally in your terminal, and it has full support for MCP servers. To connect DeployHQ:

1. Install Codex CLI if you haven't already: `npm i -g @openai/codex`
2. Add the MCP server using the Codex CLI command:

```
codex mcp add deployhq \
  --env DEPLOYHQ_EMAIL=your-email@example.com \
  --env DEPLOYHQ_API_KEY=your-api-key \
  --env DEPLOYHQ_ACCOUNT=your-account-name \
  -- npx -y deployhq-mcp-server
```

Alternatively, you can manually edit your `~/.codex/config.toml`:

```
[mcp_servers.deployhq]
command = "npx"
args = ["-y", "deployhq-mcp-server"]

[mcp_servers.deployhq.env]
DEPLOYHQ_EMAIL = "your-email@example.com"
DEPLOYHQ_API_KEY = "your-api-key"
DEPLOYHQ_ACCOUNT = "your-account-name"
```

Once configured, launch Codex and use `/mcp` to verify your [DeployHQ](https://www.deployhq.com) server is connected. Then simply ask Codex to manage your deployments as part of your coding workflow.

## Setting Up with Gemini CLI

Google's Gemini CLI is an open-source AI agent that brings Gemini directly into your terminal, with built-in MCP support. Here's how to connect DeployHQ:

1. Install Gemini CLI: `npm install -g @google/gemini-cli`
2. Configure the MCP server in `~/.gemini/settings.json`:

```
{
  "mcpServers": {
    "deployhq": {
      "command": "npx",
      "args": ["-y", "deployhq-mcp-server"],
      "env": {
        "DEPLOYHQ_EMAIL": "your-email@example.com",
        "DEPLOYHQ_API_KEY": "your-api-key",
        "DEPLOYHQ_ACCOUNT": "your-account-name"
      }
    }
  }
}
```

Launch Gemini CLI and use `/mcp` to verify the connection. You can then interact with [DeployHQ](https://www.deployhq.com) using natural language, leveraging Gemini 2.5 Pro's powerful reasoning capabilities to debug deployments, analyse logs, and manage your infrastructure.

## Security First

We've designed the [DeployHQ](https://www.deployhq.com) MCP Server with security as a priority:

- **Local execution** — The server runs on your machine and talks to your AI assistant over stdio
- **Credentials** — You supply them as environment variables. The package does not save them itself, but the configuration file that holds them (such as `~/.claude.json`, `.mcp.json` or `~/.codex/config.toml`) is stored on your disk, so keep it private and out of version control
- **HTTPS only** — The package sends API requests to your [DeployHQ](https://www.deployhq.com) account over HTTPS. The results of tool calls are shared with the AI assistant you use
- **No telemetry** — We don't collect any usage data or analytics

Your API key has the same permissions as your [DeployHQ](https://www.deployhq.com) user account, so you maintain full control over what the AI assistant can access.

## Managing Multiple Accounts

Working with multiple [DeployHQ](https://www.deployhq.com) accounts? Perhaps separate staging and production environments? Simply configure multiple servers:

```
{
  "mcpServers": {
    "deployhq-production": {
      "command": "npx",
      "args": ["-y", "deployhq-mcp-server"],
      "env": {
        "DEPLOYHQ_EMAIL": "prod@example.com",
        "DEPLOYHQ_API_KEY": "prod-api-key",
        "DEPLOYHQ_ACCOUNT": "production-account"
      }
    },
    "deployhq-staging": {
      "command": "npx",
      "args": ["-y", "deployhq-mcp-server"],
      "env": {
        "DEPLOYHQ_EMAIL": "staging@example.com",
        "DEPLOYHQ_API_KEY": "staging-api-key",
        "DEPLOYHQ_ACCOUNT": "staging-account"
      }
    }
  }
}
```

## Getting Started

Ready to bring AI-powered deployment management to your workflow?

1. **Get your credentials** — Find your API key in [DeployHQ](https://www.deployhq.com) under Settings → Security
2. **Choose your AI assistant** — Claude Code, Codex CLI, Gemini CLI, or any MCP-compatible tool
3. **Configure the server** — Follow the setup instructions above
4. **Start deploying** — Ask your assistant to list your projects and go from there

The local [DeployHQ](https://www.deployhq.com) MCP Server package runs via npx, so there's nothing to install permanently — it downloads and runs the latest version automatically. For new setups, consider the [hosted MCP server](https://www.deployhq.com/mcp) or the [DeployHQ CLI](https://www.deployhq.com/agents) first.

For detailed documentation, troubleshooting guides, and the full API reference, visit our [MCP Server support page](https://www.deployhq.com/support/mcp-server).

* * *

## Resources

- [Hosted MCP server](https://www.deployhq.com/mcp) and [AI agents and the CLI](https://www.deployhq.com/agents)
- [Hosted MCP setup guide](https://www.deployhq.com/support/hosted-mcp-server) and [local package setup guide](https://www.deployhq.com/support/mcp-server)
- [npm Package](https://www.npmjs.com/package/deployhq-mcp-server)
- [GitHub Repository](https://github.com/deployhq/deployhq-mcp-server)
- [Model Context Protocol Specification](https://modelcontextprotocol.io/)

* * *

The future of deployment management is conversational. Try the [DeployHQ](https://www.deployhq.com) MCP Server today and experience the difference.

