Skip to content

MCP Server

Eric Mann edited this page Mar 19, 2026 · 2 revisions

MCP Server

Displace ships a built-in MCP (Model Context Protocol) server that lets AI coding assistants interact with your Kubernetes infrastructure using the same engine that powers the CLI. Any MCP-compatible client — Cursor, Claude Code, VS Code with Copilot, Windsurf, etc. — can connect to the server and use Displace tools directly.

How It Works

flowchart LR
    A["AI Client\n(Cursor, Claude,\nVS Code, etc.)"] <-->|"stdio (JSON-RPC 2.0)"| B["displace mcp serve\n\ncore engine"]
    B --> C["Kubernetes Cluster"]
Loading

The MCP server communicates over stdin/stdout using JSON-RPC 2.0. It runs as a local process launched by your AI client — no ports, no HTTP, no network exposure.

Prerequisites

  • Displace CLI installed (Getting Started)
  • A Displace account with an API key (for tier-gated tools)
  • For deployment tools: a running Kubernetes cluster (displace install for local)

Configuration

Cursor

Add the following to your Cursor MCP configuration (.cursor/mcp.json in your project or global settings):

{
  "mcpServers": {
    "displace": {
      "command": "displace",
      "args": ["mcp", "serve"]
    }
  }
}

Claude Code

Add to your Claude Code MCP settings:

{
  "mcpServers": {
    "displace": {
      "command": "displace",
      "args": ["mcp", "serve"]
    }
  }
}

VS Code (Copilot / Continue)

Add to your VS Code settings.json:

{
  "mcp.servers": {
    "displace": {
      "command": "displace",
      "args": ["mcp", "serve"]
    }
  }
}

Windsurf

Add to your Windsurf MCP configuration:

{
  "mcpServers": {
    "displace": {
      "command": "displace",
      "args": ["mcp", "serve"]
    }
  }
}

Custom Path

If displace is not on your PATH, use the full path to the binary:

{
  "mcpServers": {
    "displace": {
      "command": "/usr/local/bin/displace",
      "args": ["mcp", "serve"]
    }
  }
}

License Tiers and Available Tools

The MCP server dynamically registers tools based on your license tier. Your AI client only sees the tools available at your tier level — there's nothing to configure.

Community (Free) — 6 tools

Tool Description
displace_analyze_project Scan a project to detect framework, dependencies, and deployment requirements
displace_generate_config Generate Kubernetes deployment configuration from analysis results
displace_deploy Deploy an application to a Kubernetes cluster with guardrail validation
displace_status Get current deployment status, pod health, and recent events
displace_logs Retrieve application logs from running pods
displace_upgrade_info Check for CLI updates and view available tier upgrades

Starter ($29/mo per cluster) — 12 tools

Everything in Community, plus:

Tool Description
displace_validate_production Run production readiness checks (security, reliability, best practices)
displace_diagnose Troubleshoot deployment issues with guided root cause analysis
displace_cost_analysis Analyze infrastructure costs and get optimization suggestions
displace_migration_safety Assess safety of database schema migrations before running them
displace_plan_upgrade Create upgrade plans with rollback strategies for K8s version bumps
displace_multi_cluster List and manage clusters across providers

Professional ($79/mo per cluster) — 16 tools

Everything in Starter, plus:

Tool Description
displace_audit_log Query the deployment audit trail for compliance and incident review
displace_approve_deploy Multi-party deployment approval workflow
displace_policy_check Evaluate deployments against organizational policies and naming conventions
displace_compliance_soc2 SOC 2 compliance validation (trust services criteria)

Founder ($499/mo flat) — 18 tools

Everything in Professional, plus:

Tool Description
displace_compliance_hipaa HIPAA compliance validation for workloads handling PHI
displace_compliance_fedramp FedRAMP compliance validation (NIST 800-53 controls)

Verifying the Server

You can test that the server starts correctly by running it manually:

displace mcp serve

You should see output on stderr:

Displace MCP server v2.0.0 (tier: Community)
Transport: stdio (JSON-RPC 2.0)
Press Ctrl+C to stop.

Press Ctrl+C to stop. The tier displayed depends on your logged-in account.

Note: The server reads from stdin and writes to stdout. When run manually it will appear to hang — this is normal. It's waiting for JSON-RPC messages from the AI client. Use Ctrl+C to exit.

Typical AI Workflow

When your AI assistant has access to the Displace MCP server, a typical deployment conversation looks like:

  1. "Analyze my project" → AI calls displace_analyze_project to detect framework
  2. "Generate deployment config" → AI calls displace_generate_config with the detected framework
  3. "Deploy to my local cluster" → AI calls displace_deploy targeting your k3d cluster
  4. "Check the status" → AI calls displace_status to verify pods are healthy
  5. "Show me the logs" → AI calls displace_logs to retrieve pod output

The AI handles all the JSON-RPC communication automatically — you just describe what you want in natural language.

Troubleshooting

Server won't start

# Check the binary is on PATH
which displace

# Check version
displace version

# Try with verbose output
displace mcp serve 2>mcp-debug.log

AI client doesn't see tools

  • Verify the MCP configuration file is saved and the client has been restarted
  • Check the command path — the AI client needs to find the displace binary
  • Check your tier: Community tier shows 6 tools, paid tiers show more
  • Look at the AI client's MCP server logs for connection errors

"tier: Community" when you have a paid subscription

# Verify you're logged in
displace auth status

# Re-authenticate if needed
displace auth login

The MCP server resolves your tier from your locally cached credentials. If you recently subscribed or changed tiers, re-authenticate to refresh.

Learn More

Clone this wiki locally