Skip to main content
Glama
Citizen Deployment MCP Server

Citizen Deployment MCP Server

by citizenteam

Citizen Deployment MCP Server

npm version License: MIT

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

Related MCP server: golive-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 deployment for quick fixes without git commits

Requirements

  • Node.js 18+ or Bun

  • Citizen platform account (sign up)

  • One of: Claude Desktop, Claude Code, Cursor, or VS Code with MCP extension

Troubleshooting

Authentication Issues

  • Make sure you've run the authenticate tool

  • Check if your token has expired with check_auth_status

  • Verify you're using the correct organization

Deployment Failures

  • The AI will automatically analyze logs and suggest fixes

  • Common issues: Python/Node version mismatches, missing dependencies, port binding

  • Use deploy_from_local for faster iteration when fixing errors

Permission Denied

  • Check your role with list_apps - you may not have access to that app

  • Contact your organization admin to grant you member+ role

License

MIT © Citizen Team

Available Tools

11 tools
authenticateA

Authenticate with Citizen platform using device flow. ALWAYS call this first if check_auth_status shows not authenticated. Opens browser for user authorization.

Inputs: no named parameters.

check_auth_statusA

Check current authentication status. Call this at the start of any deployment workflow to ensure you are authenticated.

Inputs: no named parameters.

deploy_from_gitA

Deploy application from git repository (requires member+ role). Use when user provides a git URL. After deployment starts, ALWAYS monitor with get_deployment_status until completion. If build fails, read logs to understand error and fix accordingly.

Inputs: app_name (required), git_url (required), git_branch, builder.

deploy_from_localA

Deploy from local directory. Automatically creates tar.gz, uploads, and deploys. Use this when deploying current directory, local files, or when iterating on fixes. ALWAYS monitor with get_deployment_status after calling. If build fails, analyze logs, fix files locally, and redeploy.

Inputs: app_name (required), directory_path (required), builder.

get_app_infoB

Get detailed information about a specific app including current deployment status and configuration.

Inputs: app_name (required).

get_deployment_statusA

Get deployment run status and detailed logs. CRITICAL: After starting any deployment, poll this every 5-10 seconds until status is "completed" or "failed". If failed, carefully read ALL logs to identify the error (missing dependencies, version mismatches, port binding issues, etc.) and suggest fixes.

Inputs: run_id (required).

get_instructionsA

CRITICAL: Call this FIRST before ANY deployment operation. Returns deployment instructions including polling intervals, error handling guides, and best practices. You MUST read and follow these instructions before calling deploy_from_git, deploy_from_local, or get_deployment_status.

Inputs: no named parameters.

list_appsA

List all applications you have access to (RBAC filtered). ALWAYS call this before deploying to understand which apps exist and which you have permission to deploy.

Inputs: no named parameters.

list_deployment_runsA

List recent deployment runs for an app with their status. Useful for debugging when user mentions "my last deployment failed".

Inputs: app_name (required).

list_serversA

List all Citizen servers in your organization. This discovers available deployment targets. Call this before list_apps to see which servers are available.

Inputs: no named parameters.

open_app_urlA

Open app URL in system browser (not Cursor browser). Use this after successful deployment to verify the app is working. Opens the default browser just like device authentication flow.

Inputs: app_name (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 11 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no overlap. For example, authenticate handles authentication, deploy_from_git and deploy_from_local handle different deployment sources, and monitoring tools like get_deployment_status and list_deployment_runs serve separate roles. The descriptions reinforce unique functions, preventing agent misselection.

    Naming Consistency5/5

    Tool names follow a consistent verb_noun pattern throughout, such as authenticate, check_auth_status, deploy_from_git, get_app_info, and list_apps. This predictability makes it easy for agents to understand and navigate the toolset without confusion from mixed conventions.

    Tool Count5/5

    With 11 tools, the server is well-scoped for deployment workflows, covering authentication, deployment from multiple sources, monitoring, listing resources, and post-deployment actions. Each tool earns its place by addressing specific steps in the deployment process, avoiding bloat or gaps.

    Completeness5/5

    The toolset provides complete coverage for the deployment domain, including authentication (authenticate, check_auth_status), deployment initiation (deploy_from_git, deploy_from_local), monitoring (get_deployment_status, list_deployment_runs), resource discovery (list_apps, list_servers), and verification (open_app_url). No obvious gaps exist, enabling agents to handle full deployment lifecycles.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers