Skip to main content

claude-autoapprove

Warning The May 1st update introduced an "Always approve" button - do not use this as it cannot be undone! claude-autoapprove restores the safer "Allow for this chat" functionality:

  • Configure permanent approvals in config
  • Make per-chat decisions for other tools
  • Change decisions in newer chats This provides granular control while maintaining security.

If you by mistake used the "Always approve" button, as a workaround you can rename the mcp in the claude_desktop_config.json file to something else. Example: git->git_new. If Anthropic fixes this bug in the future, we may not need claude-autoapprove anymore.

A CLI tool to automatically approve Claude Desktop App tool requests

If you want a more user-friendly way, you can use the claude_autoapprove_mcp.

Requirements

  • Python 3.11 or newer
  • Claude Desktop App (macOS or Windows)

Installation

From PyPI

pip install claude-autoapprove

This is the recommended way for most users.

From source (for developers)

pip install -e .

Use this if you want to develop or modify the project locally.

Usage

claude-autoapprove [port]

Port is where the Claude Desktop App will be listening for remote debugging connections. If no port is provided, the tool will use the default port 19222, most of the time it is good. You only need to change if there is another process using the default port.

  • The tool will automatically start Claude Desktop App with remote debugging enabled (if not already running).
  • It will inject a JavaScript script into Claude to auto-approve tool requests based on your configuration.
  • Supported platforms: macOS and Windows

How it works

  • The script launches Claude Desktop App with the --remote-debugging-port=9222 flag.
  • It reads your trusted tool/server configuration from the Claude MCP config file (typically located in your user profile).
  • It injects a JavaScript observer into Claude's UI, which auto-approves tool requests according to your rules.
  • Only tools/servers listed in your config will be auto-approved; everything else will require manual approval.

Configuration

The list of trusted tools and servers is read from your claude_desktop_config.json (the mcpServers section, autoapprove list).

Config file locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

You can edit this file directly or via the Claude Desktop App settings.

Example config

{
  "mcpServers": {
    "fetch": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "mcp/fetch", "--ignore-robots-txt", "--user-agent=\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36\""] ,
      "autoapprove": ["fetch"]
    },
    "brave-search": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "-e", "BRAVE_API_KEY", "mcp/brave-search"],
      "env": {"BRAVE_API_KEY": "..."},
      "autoapprove": ["brave_local_search", "brave_web_search"]
    }
    // ... more servers ...
  }
}

Features

  • Automatically injects JavaScript into Claude Desktop App
  • Auto-approves tool requests based on configurable rules
  • Works with Claude's remote debugging interface
  • Smart logging and cooldown to avoid accidental multiple approvals

Security

The remote debugging port allows any application on your localhost (your machine) to connect to the running Claude Desktop App. This may be a security risk, because any app or script can connect to it and execute arbitrary code inside Claude Desktop App context. This may be used for malicious purposes. It is a low risk, if you know what is running on your computer.

So be careful when using this feature and use it at your own risk.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

Metadata

Release files for claude-autoapprove 0.2.5

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

Source distribution (sdist)

Source distribution for claude-autoapprove 0.2.5
File Size Uploaded
claude_autoapprove-0.2.5.tar.gz 10.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for claude-autoapprove 0.2.5
File Interpreter ABI Platform
claude_autoapprove-0.2.5-py3-none-any.whl Python 3 none any Details

Total release size: 19.4 kB

Release files / claude_autoapprove-0.2.5.tar.gz

Download URL claude_autoapprove-0.2.5.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
00a896ae91f9994a3aa74f0c43537e8939b53546d5bf802426a6d71234ebd95c
BLAKE2b-256 checksum
How to use checksums
b3c5455a33b430676bc55980d6c3c7cec6b37a942dd9614d5344bbfbe70e2b8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / claude_autoapprove-0.2.5-py3-none-any.whl

Download URL claude_autoapprove-0.2.5-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6f5b5a19fe4d664a9207072722c317ac1dc18dfba8009c87e2bb5c03f2be79ac
BLAKE2b-256 checksum
How to use checksums
8d38e6acbc72dc1d14a599be172c1917a66206fcf6d7861c5d1e40f7df9f2753
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release history Release notifications | RSS feed

This release

0.2.5 This release

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.1.4

2 release files

0.1.3

2 release files

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