Skip to content
Reference

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

ToolWhat it doesMarked
package_projectPackage a local project: include, exclude, git_changes, task, dry_run.writes a ZIP
package_repositoryPackage a GitHub, GitLab or Bitbucket repository without cloning it.network
preview_applyWhat applying an AI's ZIP would do to each file. Writes nothing.read-only
apply_changesApply it. Safe changes only, unless mode is "all". Never deletes files.destructive
open_pull_requestapply-zip --pr for a packaged GitHub repository. A dry run unless dry_run is false.network
list_snapshotsA 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.