Citizen Deployment MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add citizen-deployment -- npx -y @citizenteam/mcp
README.md

Deploy applications to the Citizen platform with intelligent error handling.

Citizen Deployment MCP Server

Model Context Protocol (MCP) server for deploying applications to Citizen platform. Deploy from git or local files with intelligent error handling and automatic fixes.

Works with:

  • ✅ Claude Desktop
  • ✅ Claude Code (VS Code Extension)
  • ✅ Cursor
  • ✅ VS Code with MCP extension

Installation

npm install -g @citizenteam/mcp
# or
bun install -g @citizenteam/mcp

Quick Setup

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "citizen": {
      "command": "npx",
      "args": ["-y", "@citizenteam/mcp"]
    }
  }
}

Config file location:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

Claude Code (VS Code Extension)

  1. Open VS Code settings (Cmd/Ctrl + ,)
  2. Search for "MCP Servers"
  3. Click "Edit in settings.json"
  4. Add:
{
  "claude.mcpServers": {
    "citizen": {
      "command": "npx",
      "args": ["-y", "@citizenteam/mcp"]
    }
  }
}

Cursor

  1. Open Cursor Settings → Features → MCP
  2. Click "Add MCP Server"
  3. Enter configuration:
{
  "citizen": {
    "command": "npx",
    "args": ["-y", "@citizenteam/mcp"]
  }
}

Or manually edit ~/.cursor/mcp.json:

{
  "mcpServers": {
    "citizen": {
      "command": "npx",
      "args": ["-y", "@citizenteam/mcp"]
    }
  }
}

VS Code (with MCP extension)

  1. Install MCP extension for VS Code
  2. Open settings.json (Cmd/Ctrl + Shift + P → "Preferences: Open Settings (JSON)")
  3. Add:
{
  "mcp.servers": {
    "citizen": {
      "command": "npx",
      "args": ["-y", "@citizenteam/mcp"]
    }
  }
}

First Time Setup

  1. Restart your IDE/Claude Desktop after adding the configuration
  2. Use the authenticate tool to login with device flow
  3. Follow the device authorization link in your browser
  4. Once authorized, you can deploy apps!

Available Tools

Authentication

  • authenticate - Login with device flow
  • check_auth_status - Check auth status

App Management

  • list_apps - List your apps (RBAC filtered)
  • get_app_info - Get app details

Deployment

  • deploy_from_git - Deploy from git repository
  • deploy_from_local - Deploy from local directory
  • get_deployment_status - Check deployment status and logs
  • list_deployment_runs - List recent deployments

Available Resources

Deployment Instructions (`citizen://instructions`)

A comprehensive guide that helps LLMs understand:

  • Complete deployment workflows (git and local)
  • Error handling and debugging strategies
  • How to fix common build errors (Python version, Node version, port binding, etc.)
  • Best practices for monitoring deployments
  • RBAC permission model
  • Common nixpacks configurations
  • Example conversations and use cases

Your AI assistant will automatically read this resource to understand how to properly use the deployment tools, monitor builds, and fix errors when they occur.

Example Usage

Basic Deployment

You: Deploy my app from github.com/user/repo.git

AI will:
1. Read the deployment instructions to understand the workflow
2. Check if you're authenticated
3. List your apps to see what's available
4. Deploy using deploy_from_git tool
5. Monitor the deployment with get_deployment_status
6. If errors occur, analyze logs and suggest fixes

Deployment with Error Handling

You: Deploy my Flask app from the current directory

AI will:
1. Deploy using deploy_from_local (creates tar.gz automatically)
2. Monitor build progress
3. If build fails (e.g., "Python 3.11 not found"):
   - Read the error from logs
   - Create/update nixpacks.toml with correct Python version
   - Redeploy automatically
4. Continue monitoring until successful

Interactive Debugging

You: My last deployment failed, can you help?

AI will:
1. List recent deployment runs
2. Get detailed logs for the failed run
3. Analyze the error (missing dependency, version mismatch, etc.)
4. Suggest and apply fixes
5. Redeploy with corrections

Features

  • 🔐 Secure Device Authentication - OAuth-like device flow, no passwords needed
  • 🚀 Git & Local Deployment - Deploy from GitHub or local files
  • 🤖 Intelligent Error Fixing - AI analyzes logs and fixes build errors automatically
  • 📊 Real-time Monitoring - Live deployment logs and status updates
  • 🔒 RBAC Support - Role-based access control (viewer, member, admin, owner)
  • 🏗️ Auto-detect Builders - Supports nixpacks and Dockerfile
  • 🔄 Fast Iteration - Local deploy

Tools (8)

authenticateLogin with device flow
check_auth_statusCheck auth status
list_appsList your apps (RBAC filtered)
get_app_infoGet app details
deploy_from_gitDeploy from git repository
deploy_from_localDeploy from local directory
get_deployment_statusCheck deployment status and logs
list_deployment_runsList recent deployments

Configuration

claude_desktop_config.json
{"mcpServers": {"citizen": {"command": "npx", "args": ["-y", "@citizenteam/mcp"]}}}

Try it

Deploy my application from this GitHub repository: https://github.com/user/repo.git
Can you deploy the project in my current directory to the Citizen platform?
My last deployment failed, can you check the logs and help me fix the build error?
List all my current applications on the Citizen platform and show me their status.
Check the status of my most recent deployment and let me know if it succeeded.

Frequently Asked Questions

What are the key features of Citizen Deployment?

Secure device-based OAuth authentication. Deployment from both GitHub repositories and local file systems. Intelligent automated analysis and fixing of build errors. Real-time monitoring of deployment logs and status. Role-based access control (RBAC) support.

What can I use Citizen Deployment for?

Automating the deployment of web applications directly from a local development environment. Troubleshooting failed build processes by having the AI analyze logs and suggest configuration fixes. Managing multiple application deployments across different projects with RBAC permissions. Streamlining CI/CD workflows by integrating deployment commands directly into the IDE.

How do I install Citizen Deployment?

Install Citizen Deployment by running: npm install -g @citizenteam/mcp

What MCP clients work with Citizen Deployment?

Citizen Deployment works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Citizen Deployment docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare