Citizen Deployment MCP Server

Citizen Deployment MCP Server

Enables deployment and management of applications on the Citizen platform from git repositories or local files. It allows AI assistants to monitor deployment logs, handle authentication, and automatically fix build errors using intelligent error analysis.

Category
访问服务器

README

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

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

Links

License

MIT © Citizen Team

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选