Wrap command-line tools in an MCP wrapper to separate secrets from the coding environment. Support introspection of tools and allow requests for additional cababilities.
  • Go 96.6%
  • Shell 3.4%
Find a file
2026-05-22 15:17:52 +02:00
cmd Implement dynamic client working directory discovery via query params and UNIX peer PID 2026-05-22 15:17:52 +02:00
docs Add git hardening guide 2026-05-19 13:25:35 +02:00
internal Implement dynamic client working directory discovery via query params and UNIX peer PID 2026-05-22 15:17:52 +02:00
testdata Initial implementation of wraptool MCP server 2026-05-15 12:52:10 +02:00
.envrc Initial implementation of wraptool MCP server 2026-05-15 12:52:10 +02:00
.gitignore Add Quarto docs site and reveal.js presentation 2026-05-19 10:47:06 +02:00
.gitlab-ci.yml Add Quarto docs site and reveal.js presentation 2026-05-19 10:47:06 +02:00
CLAUDE.md streamline approval and reload 2026-05-18 15:06:11 +02:00
go.mod streamline approval and reload 2026-05-18 15:06:11 +02:00
go.sum streamline approval and reload 2026-05-18 15:06:11 +02:00
LICENSE Add GPLv3 license 2026-05-16 01:24:55 +02:00
main.go Initial implementation of wraptool MCP server 2026-05-15 12:52:10 +02:00
manifest.scm Initial implementation of wraptool MCP server 2026-05-15 12:52:10 +02:00
README.md Add Quarto docs site and reveal.js presentation 2026-05-19 10:47:06 +02:00
test-container.sh Add Guix container integration test script 2026-05-16 01:22:32 +02:00

wraptool

An MCP server that wraps CLI tools behind a security whitelist, so AI coding assistants can use tools like git, gcloud, and kubectl without direct access to credentials.

Why

AI coding assistants need CLI tools to be productive, but giving them direct access exposes API keys, SSH keys, kubeconfigs, and service account credentials to the model context. wraptool sits between the assistant and the tools:

  • Credentials stay isolated -- wraptool runs as a separate process with its own environment; secrets never enter the AI context.
  • Subcommand-level whitelisting -- allow git commit but deny git push --force, with flag-level granularity and value constraints.
  • Auto-discovery -- wraptool parses --help output to generate MCP tool schemas with real descriptions.
  • Structured denial workflow -- denied commands trigger a capability-request flow that an operator approves from the CLI.

Quick start

go build -o wraptool .
wraptool init --harness claude --url http://127.0.0.1:8717/sse
wraptool serve

Documentation

Full documentation lives in docs/ and is rendered with Quarto to a website (published via GitLab Pages):

Page Source
Getting started docs/getting-started.qmd
Configuration reference docs/configuration.qmd
Security model docs/security.qmd
Hot-reload & capability requests docs/hot-reload.qmd
Isolated environments docs/isolated-environments.md
Overview slides docs/presentation.qmd

Build the site locally

quarto preview docs        # live-reloading dev server
quarto render  docs        # produce docs/_site/

License

GPLv3 -- see LICENSE.