{"id":30861075,"url":"https://github.com/duffney/copacetic-mcp","last_synced_at":"2025-09-07T16:47:36.470Z","repository":{"id":313413862,"uuid":"1040322926","full_name":"duffney/copacetic-mcp","owner":"duffney","description":"an mcp server for patching container images","archived":false,"fork":false,"pushed_at":"2025-09-05T21:01:18.000Z","size":49171,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-05T22:27:54.640Z","etag":null,"topics":["container","docker","mcp-server","security-tools"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/duffney.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-18T19:52:01.000Z","updated_at":"2025-09-05T21:01:22.000Z","dependencies_parsed_at":"2025-09-05T22:27:58.404Z","dependency_job_id":"43d4d016-32ea-43ff-a55a-285a057c45dc","html_url":"https://github.com/duffney/copacetic-mcp","commit_stats":null,"previous_names":["duffney/copacetic-mcp"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/duffney/copacetic-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duffney%2Fcopacetic-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duffney%2Fcopacetic-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duffney%2Fcopacetic-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duffney%2Fcopacetic-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/duffney","download_url":"https://codeload.github.com/duffney/copacetic-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duffney%2Fcopacetic-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274065677,"owners_count":25216443,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["container","docker","mcp-server","security-tools"],"created_at":"2025-09-07T16:47:30.547Z","updated_at":"2025-09-07T16:47:36.461Z","avatar_url":"https://github.com/duffney.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# copacetic-mcp\n\nA Model Context Protocol (MCP) server for automated container patching using [Copacetic](https://github.com/project-copacetic/copacetic).\n\n## MCP Tools\n\nThis server provides the following Model Context Protocol (MCP) tools:\n\n- **`workflow-guide`**: Get patching strategy guide on which Copacetic tools to use for different container patching scenarios\n- **`scan-container`**: Scan container images for vulnerabilities using Trivy - creates vulnerability reports required for report-based patching\n- **`patch-vulnerabilities`**: Patch container image vulnerabilities using a pre-generated vulnerability report from 'scan-container' tool (RECOMMENDED approach for vulnerability-based patching)\n- **`patch-platforms`**: Patch specific container image platforms with Copa - patches only the specified platforms WITHOUT vulnerability scanning\n- **`patch-comprehensive`**: Comprehensively patch all container image platforms with Copa - patches all available platforms WITHOUT vulnerability scanning\n\n## Installation\n\n### Pre-built Binaries\n\nDownload the latest release for your platform from the [releases page](https://github.com/duffney/copacetic-mcp/releases).\n\n#### Linux (AMD64)\n\n```bash\ncurl -L https://github.com/duffney/copacetic-mcp/releases/latest/download/copacetic-mcp_linux_amd64.tar.gz | tar xz\n./copacetic-mcp-server\n```\n\n#### Linux (ARM64)\n\n```bash\ncurl -L https://github.com/duffney/copacetic-mcp/releases/latest/download/copacetic-mcp_linux_arm64.tar.gz | tar xz\n./copacetic-mcp-server\n```\n\n#### macOS (AMD64)\n\n```bash\ncurl -L https://github.com/duffney/copacetic-mcp/releases/latest/download/copacetic-mcp_darwin_amd64.tar.gz | tar xz\n./copacetic-mcp-server\n```\n\n#### macOS (ARM64/Apple Silicon)\n\n```bash\ncurl -L https://github.com/duffney/copacetic-mcp/releases/latest/download/copacetic-mcp_darwin_arm64.tar.gz | tar xz\n./copacetic-mcp-server\n```\n\n### Build from Source\n\n```bash\ngit clone https://github.com/duffney/copacetic-mcp.git\ncd copacetic-mcp\nmake build\n```\n\n## Configuration\n\n### VSCode Setup\n\nTo use copacetic-mcp with VSCode and MCP-compatible tools, add the following configuration to your VSCode `settings.json`:\n\n```json\n{\n  \"mcp.servers\": {\n    \"copacetic-mcp\": {\n      \"command\": \"/path/to/copacetic-mcp-server\",\n      \"args\": [],\n      \"env\": {}\n    }\n  }\n}\n```\n\nReplace `/path/to/copacetic-mcp-server` with the actual path to your copacetic-mcp server binary.\n\n### Docker option (run server from a container)\n\n```jsonc\n\"copacetic-mcp-docker\": {\n  \"command\": \"docker\",\n  \"args\": [\n    \"run\",\n    \"--rm\",\n    \"-i\",\n    \"--mount\",\n    \"type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock\",\n    \"--mount\",\n    \"type=bind,source=${env:HOME}/.docker/config.json,target=/root/.docker/config.json\",\n    \"ghcr.io/duffney/copacetic-mcp:latest\"\n  ],\n  \"env\": {\n    \"DOCKER_HOST\": \"unix:///var/run/docker.sock\"\n  }\n}\n```\n\nNotes:\n\n- Mounting the Docker socket gives the container access to the host Docker daemon; this is required for Copacetic image operations but has security implications—only run trusted images.\n- Mounting `${HOME}/.docker/config.json` allows the container to use your registry credentials for pulling/pushing images.\n- Replace `ghcr.io/duffney/copacetic-mcp:latest` with a local image tag if you build locally (e.g., `copacetic-mcp:latest`).\n\n#### Alternative: Using with Claude Desktop\n\nYou can also configure copacetic-mcp for use with Claude Desktop by adding it to your MCP configuration file:\n\n**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`\n**Windows**: `%APPDATA%\\Claude\\claude_desktop_config.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"copacetic-mcp\": {\n      \"command\": \"/path/to/copacetic-mcp-server\",\n      \"args\": []\n    }\n  }\n}\n```\n\n## Development\n\n### Prerequisites\n\n- Go 1.20 or later\n- [Copacetic](https://github.com/project-copacetic/copacetic) CLI installed\n- [Trivy](https://github.com/aquasecurity/trivy) installed\n- Docker with virtualization emulation support (required for container operations)\n\n#### Copacetic CLI Requirements\n\nCopacetic requires the following to be installed and available:\n\n- **Docker**: Container runtime for image operations\n- **Buildkit**: Advanced build features (included with recent Docker versions)\n- **Container Registry Access**: For pulling and pushing patched images\n\n#### Docker Virtualization Emulation\n\nFor multi-platform container patching, Docker must support virtualization emulation:\n\n- **Linux**: Ensure QEMU user-mode emulation is available for cross-platform support\n- **macOS**: Docker Desktop includes virtualization emulation by default\n- **Windows**: Docker Desktop with WSL2 backend recommended for best compatibility\n\nTo verify Docker virtualization support:\n\n```bash\n# Check available platforms\ndocker buildx ls\n\n# Verify QEMU emulation (Linux)\ndocker run --rm --privileged multiarch/qemu-user-static --reset -p yes\n```\n\n### Building\n\n```bash\n# Build both server and client\nmake build\n\n# Build only the server\nmake build-server\n\n# Build only the client\nmake build-client\n\n# Cross-compile for all platforms\nmake cross-compile\n```\n\n### Testing\n\n```bash\n# Run all tests\nmake test\n\n# Format code\nmake fmt\n\n# Run vet\nmake vet\n```\n\n### Release Process\n\nThis project uses [GoReleaser](https://goreleaser.com/) for automated releases.\n\n#### Creating a Release\n\n1. **Create and push a tag:**\n\n   ```bash\n   git tag -a v1.0.0 -m \"Release v1.0.0\"\n   git push origin v1.0.0\n   ```\n\n2. **GitHub Actions will automatically:**\n   - Run tests\n   - Build cross-platform binaries\n   - Create release archives\n   - Generate checksums\n   - Create a GitHub release\n   - Upload artifacts\n\n#### Supported Platforms\n\nThe automated release process builds for:\n\n- **Linux**: AMD64, ARM64\n- **macOS**: AMD64, ARM64 (Apple Silicon)\n- **Windows**: AMD64\n\n#### Manual Release (for testing)\n\n```bash\n# Create a snapshot release (no tags required)\nmake release-snapshot\n\n# Or use GoReleaser directly\ngoreleaser release --snapshot --clean\n```\n\n### Project Structure\n\n```\ncopacetic-mcp/\n├── main.go                     # Main MCP server entry point\n├── cmd/client/main.go         # Test client\n├── internal/\n│   ├── mcp/                   # MCP server handlers and setup\n│   ├── copa/                  # Copacetic command execution\n│   ├── trivy/                 # Trivy vulnerability scanning\n│   ├── types/                 # Shared type definitions\n│   └── util/                  # Utility functions (multiplatform, etc.)\n├── .goreleaser.yml            # GoReleaser configuration\n├── .github/workflows/         # GitHub Actions workflows\n│   ├── build.yml             # Build and test on every push/PR\n│   └── release.yml           # Automated releases on tags\n└── Makefile                   # Development tasks\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Add tests if applicable\n5. Run `make test fmt vet`\n6. Submit a pull request\n\n## License\n\nThis project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduffney%2Fcopacetic-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduffney%2Fcopacetic-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduffney%2Fcopacetic-mcp/lists"}