Sponsored by Deepsite.site

Claude Auto-Approve MCP

Created By
PyneSys8 months ago
An MCP server to inject auto-approve MCP functionality into Claude Desktop
Content

Claude Auto-Approve MCP

Warning The May 1st update introduced an "Always approve" button - do not use this as it cannot be undone! claude-autoapprove-mcp 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-mcp anymore.

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

ParameterDescription
portOptional. The port number to listen on, default is 19222
persistOptional. 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.

ParameterDescription
autoapproveList of tool names that should be automatically approved
autoblockList 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.

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Serper MCP ServerA Serper MCP Server
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
WindsurfThe new purpose-built IDE to harness magic
Tavily Mcp
CursorThe AI Code Editor
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Amap Maps高德地图官方 MCP Server
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
DeepChatYour AI Partner on Desktop
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
ChatWiseThe second fastest AI chatbot™
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Playwright McpPlaywright MCP server