Skip to main content

An MCP server to inject auto-approve MCP functionality into Claude Desktop

Project description

Claude Auto-Approve MCP

An MCP to restart Claude Desktop App with enabled debugger port and inject a JavaScript into it, which extends Claude with MCP auto-approve functionality. It uses the claude-autoapprove library under the hood.

How it works

The MCP server will restart the Claude Desktop App with enabled debugger port and inject a JavaScript into it, which extends Claude with MCP auto-approve functionality.

Dont't be afraid when after 1st start of the app it will be closed immediately. This is expected behavior.

Installation

Imstalling uv (if you don't have it yet)

After installing uv, make sure it's available in your PATH.

MacOS

Brew
brew install uv
MacPorts
sudo port install uv

Windows

winget install --id=astral-sh.uv  -e

Other installation options

You can find other installation options in the uv installation guide.

Add it to your claude_desktop_config.json

{
    "mcpServers": {
        "claude-autoapprove-mcp": {
            "command": "uvx",
            "args": [
                "claude-autoapprove-mcp",
            ],
            "autoapprove": [
                "autoapproved_tools",
                "autoblocked_tools"
            ]
        }
    }
}

Restart Claude Desktop if it is already running.

Arguments

Parameter Description
port Optional. The port number to listen on, default is 19222
persist Optional. Works only on macOS (atm). If specified, it installs a little wathcer script, which will restart Claude Desktop with enabled debugger port, if it is not running with debugger port. This allows early detection and automatic restart, so you don't need to wait for one restart (only the first time). It also installs a LaunchAgent, so it will be started at login. If you remove the --persist argument, the watcher script will be removed and the LaunchAgent will be uninstalled.
{
    "mcpServers": {
        "claude-autoapprove-mcp": {
            "command": "uvx",
            "args": [
                "claude-autoapprove-mcp",
                "--port", "19222",
                "--persist"
            ]
        }
    }
}

Configuration

You can add autoapprove and autoblock parameters to each MCP server, the claude-autoapprove-mcp will read that configuration and apply it to the running instance.

Parameter Description
autoapprove List of tool names that should be automatically approved
autoblock List of tool names that should be automatically blocked
{
    "mcpServers": {
        "claude-autoapprove-mcp": {
        "command": "uvx",
            "args": [
                "claude-autoapprove-mcp",
            ],
        "autoapprove": [
            "autoapproved_tools"
        ],
        "autoblock": [
        ]
    },
    "project-mem-mcp": {
        "command": "uvx",
        "args": [
            "project-mem-mcp",
            "--allowed-dir", "/Users/wallner/Developer/MCP",
            "--allowed-dir", "/Users/wallner/Developer/Projects/ByCompany/BacktestGuy"
        ],
        "autoapprove": [
            "get_project_memory",
            "set_project_memory",
            "update_project_memory"
        ],
        "autoblock": [
        ]
    },
    "browsermcp": {
      "command": "npx",
      "args": [
        "@browsermcp/mcp@latest"
      ],
      "autoapprove": [
        "browser_get_console_logs",
        "browser_snapshot"
      ],
      "autoblock": [
        "browser_screenshot"
      ]
    }
}

Usage

Just run Claude Desktop. It is not invasive, it doesn't change anything in the app (only if you use the --persist argument), just injects a JavaScript into the running instance. So you can install updates as usual (even when using the --persist argument). It uses a feature of most Electron based apps: remote debugging port.

If you want to list all tools that are auto-approved, you can use the following prompt in Claude Desktop:

list all tools that are auto-approved

If you want to list all tools that are auto-blocked, you can use the following prompt in Claude Desktop:

list all tools that are auto-blocked

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

If you want to contribute to this project, please fork the repository and create a pull request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

claude_autoapprove_mcp-0.2.1.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

claude_autoapprove_mcp-0.2.1-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file claude_autoapprove_mcp-0.2.1.tar.gz.

File metadata

  • Download URL: claude_autoapprove_mcp-0.2.1.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for claude_autoapprove_mcp-0.2.1.tar.gz
Algorithm Hash digest
SHA256 55650dae6b474bac041e8cd5f85b17dc9d22008424454e8772d109c02168e9ba
MD5 5ae5b6b8d05ab3238da075ed2af7e628
BLAKE2b-256 ace6d870fabd6ed2cdf94c86cff6eb005f6ef21957e232b61931700d556c9b77

See more details on using hashes here.

File details

Details for the file claude_autoapprove_mcp-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for claude_autoapprove_mcp-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e9567c877528b5620c2cd5fed19b855e685ca54ec9e7b19096984e2b084d93bf
MD5 91d0317f3d619bad87e00aa78356b053
BLAKE2b-256 8ffa3d49dec2db7d1f72a8b18d86c1319355dbc84d8fef43641f9388d06223fa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page