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.
  • 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.0

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.0
File Size Uploaded Provenance Actions
agentdodont-0.1.0.tar.gz 63.2 kB Without provenance Details for agentdodont-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 117.2 kB

Release files / agentdodont-0.1.0.tar.gz

Download URL agentdodont-0.1.0.tar.gz
Size 63.2 kB
Tags Source
SHA-256 checksum
How to use checksums
89af217b88af13a769c50c95c3869f35ab51267f9d075d5ec1fc965855d2e55f
BLAKE2b-256 checksum
How to use checksums
1305d9499d15412d6f4e5834e52200f788dea518d727307f1b3a4d73b4e32abf
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.0-py3-none-any.whl

Download URL agentdodont-0.1.0-py3-none-any.whl
Size 53.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2abab97a22dc857e4f8b2e8b65e88115e0a24ea471519a2c98c5b59277aa2904
BLAKE2b-256 checksum
How to use checksums
aedd14c2ad256dcc664b87d16ad4018bbdca401e7090337b263aca2f75cabc81
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.0

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