Skip to main content

Agent Do/Don't

A rules engine between an AI agent and its tools, built assuming the model can be hijacked by anything it reads. The model proposes; the rules decide: do it, ask you, or refuse.

This package contains the MCP proxy. It works with any agent that uses MCP tools, such as Claude Code, Claude Desktop, or your own. It sits between the agent and an MCP server, and neither of them needs any changes. It needs nothing beyond the Python standard library. The project also includes an Android app with the same rules (GitHub).

Status: experimental.

What it does

Suppose an agent reads a web page with hidden instructions telling it to email your notes to helpdesk@evil.example. If the model falls for it, the proxy sees the session has read untrusted content, and refuses the email: that address isn't one of yours. The call never reaches the email server.

  • Taint. After a tool returns untrusted content, the session counts as untrusted from then on. This holds across every server the agent uses, and questions name where the content came from.
  • Where data goes. URLs, email addresses and phone numbers in a call's arguments are checked against your lists. Once the session is tainted, an address you haven't listed is refused, not asked. Before that, a new address asks.
  • Risk. It reads the server's tool annotations the cautious way. A tool with no annotations counts as possibly irreversible and asks.
  • Presets. Built-in corrections for popular servers (filesystem, GitHub, Gmail via workspace-mcp) are picked automatically from the server's command.
  • Your settings. You can set any tool to "do it", "ask" or "never", and there's a rate limit.
  • Asking. Questions appear in the client (MCP elicitation). If the client can't ask, the call is refused, never run silently.
  • Log. Every decision goes to ~/.agentdodont/mcp-audit.jsonl.

Set up

Start the proxy in place of the server, with the server's own command after --. With uv installed, nothing else needs installing. For Claude Code:

claude mcp add fetch -- uvx agentdodont mcp-proxy --rules /path/to/mcp-rules.json --name fetch -- uvx mcp-server-fetch

Or put this in .mcp.json in your project:

{
  "mcpServers": {
    "fetch": {
      "command": "uvx",
      "args": ["agentdodont", "mcp-proxy", "--rules", "/path/to/mcp-rules.json", "--name", "fetch",
               "--", "uvx", "mcp-server-fetch"]
    }
  }
}

Claude Desktop uses the same entry in claude_desktop_config.json. Without uv, run pip install agentdodont and use "command": "agentdodont" with the same arguments minus the first "agentdodont".

A rules file is optional. Every field in it is optional too:

{
  "allowed_sites": ["wikipedia.org", "github.com"],
  "known_recipients": ["dana@example.com"],
  "levels": {"read_*": "auto", "delete_*": "ask", "get-env": "deny"},
  "tools": {"send_message": {"destination_args": {"channel": "recipient"}}}
}

More

Apache License 2.0.

Metadata

Release files for agentdodont 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agentdodont 0.1.1
File Size Uploaded Provenance Actions
agentdodont-0.1.1.tar.gz 67.2 kB Without provenance Details for agentdodont-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agentdodont 0.1.1
File Interpreter ABI Platform Actions
agentdodont-0.1.1-py3-none-any.whl Python 3 none any Details for agentdodont-0.1.1-py3-none-any.whl

Total release size: 125.2 kB

Release files / agentdodont-0.1.1.tar.gz

Download URL agentdodont-0.1.1.tar.gz
Size 67.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3215b406b26869f3792f0dae7172110a0be87896c38bdd9c97fca5067ef0834a
BLAKE2b-256 checksum
How to use checksums
303d9fcd18c7547c3cd2f7b5571d747cfb910e8bba015962f5b9ab282e6b01d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.0

Release files / agentdodont-0.1.1-py3-none-any.whl

Download URL agentdodont-0.1.1-py3-none-any.whl
Size 57.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
da0be0c7765a21bf9db171fb5493266b9ad6232205cc07ac49dfc4ac34e933d7
BLAKE2b-256 checksum
How to use checksums
929d6eda38dc12b2a6c82e0d672041981108cf83dc7227a9bd0eb7e2007ca6e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.0

Security for agentdodont 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page