anthropics / anthropics/claude-code

[FEATURE] Per-server "always allow" for locally installed MCP servers (persisted across sessions and chats, revocable)

Open
#95,166 0 comments 0 reactions 0 assignees View on GitHub
area:mcp area:permissions enhancement
Dominant language
Python
Stars
145k
Forks
23.1k
PR merge metrics
PR metrics pending

Description

### Preflight Checklist

- [x] I have searched [existing requests](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20label%3Aenhancement) and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)

### Problem Statement

I develop and run a local stdio MCP server on my own machine.
I wrote it, I build it, and I install it myself.

Approval today is per tool, per session.
A server that exposes more than a dozen tools can cost that many approval dialogs before any real work starts.
During development the server is rebuilt often, and the prompts come back after updates as well.

Why the existing options don't cover it:

- "Allow all for this task" works, but only for that one task. The next task starts over.
- "Always allow" is reported not to persist across sessions - #24433, which proposed exactly this and was closed as not planned.
- Related and still open: re-prompting after a server update even with always-allow set (anthropics/claude-ai-mcp#1032),
"Allow all for this task" greyed out for custom remote connectors (anthropics/claude-ai-mcp#491),
and the same request on the Chrome surface (#66125).

The current model is workable for someone who already knows the product.
For a first-time user connecting a local server, the first session is a wall of dialogs,
which pushes people toward "Skip all approvals" - the least safe option -
precisely because the safe middle ground is the tedious one.

### Proposed Solution

A way to say, once: "I installed this MCP server on my own machine. Always allow it,
and always allow all of its tools." Persisted across sessions and chats, revocable at any time, and opt-in.

Either or both of these shapes would solve it:

1. Config-based, as suggested in #24433:

```json
{
"mcpServers": {
"my-server": {
"command": "my-server.exe",
"args": ["mcp-server"],
"alwaysAllow": true
}
}
}
```

2. An "Always allow this app" / "Trust this connector" toggle in Settings next to the installed server,
with a visible revoke button and an optional expiry (8 hours / until the app quits / indefinitely).

On the security trade-off: I understand why the client cannot delegate trust to a server's own consent screen.
A server claiming "the user approved this" cannot be verified, so a client-side gate has to exist.
I am not asking for that gate to be removed.
I am asking that the user be allowed to make the decision once, explicitly, for a server they installed themselves,
with the decision visible and revocable - instead of re-deciding the same thing every session and every chat.

### Alternative Solutions

Workarounds I use today: setting the task approval mode to "Automatically approve",
or clicking "Allow all for this task" at the start of every task.
Both work, but both have to be repeated for every new task and every new chat,
and neither is a decision about the server itself.

Scoping alternatives that would still solve the problem, if a blanket setting is too broad:
restrict it to local stdio servers and leave remote connectors out, keep it off by default,
require an explicit toggle in Settings rather than a checkbox inside an approval prompt,
list trusted servers in one place with a revoke action,
and optionally let the trust expire after a chosen period.

### Priority

High - Significant impact on productivity

### Feature Category

MCP server integration

### Use Case Example

1. I install my own local MCP server on my machine and connect it to Claude Desktop.
2. I open a chat and ask Claude to do something that uses it.
3. The first tool call opens an approval dialog. So does the second, and the third,
each one for a different tool of the same server I installed myself.
4. I finish the task. The next day I open a new chat and the same dialogs appear again.
5. During development I rebuild the server, and the dialogs come back after that too.

With this feature, I would have switched on "Always allow this app" once,
right after installing the server, and steps 3 to 5 would not happen.
If I later stopped trusting it, I would switch it off in the same place.

### Additional Context

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names no files or tests. Start by tracing the MCP server configuration and approval flow, especially the mcpServers config and the Settings surface; determine where local stdio servers and tool approvals are persisted. Done means an explicit opt-in trust decision survives sessions and chats, applies to the server's tools, and has a visible revoke path.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.