MCP server
contextzip mcp lets AI agents and editors call contextzip directly over the Model Context Protocol: package a project or repository for another model, preview an AI's reply, and apply it with the same safety rules as the CLI.
Set it up
The MCP server is an optional extra and needs Python 3.10 or newer. The standalone builds (npm, Homebrew, Scoop) don't include it.
Then register it in your MCP client. It speaks stdio:
MCP client settings
{ "mcpServers": { "contextzip": { "command": "contextzip", "args": ["mcp"] } }}Tools
| Tool | What it does | Marked |
|---|---|---|
| package_project | Package a local project: include, exclude, git_changes, task, dry_run. | writes a ZIP |
| package_repository | Package a GitHub, GitLab or Bitbucket repository without cloning it. | network |
| preview_apply | What applying an AI's ZIP would do to each file. Writes nothing. | read-only |
| apply_changes | Apply it. Safe changes only, unless mode is "all". Never deletes files. | destructive |
| open_pull_request | apply-zip --pr for a packaged GitHub repository. A dry run unless dry_run is false. | network |
| list_snapshots | A project's snapshots, which replies are merged against. | read-only |
Every tool returns the same JSON as --json, without the step-by-step log, so an agent sees exactly what the CLI would report: which files went in, the estimated tokens, and each file's status in a reply.
Cautious by default
Applying writes only the safe changes, and a pull request is a dry run until the agent asks for more, so an agent has to make a deliberate second call to overwrite your edits or publish anything.