Skip to content

fix(mcp): expose new tools under the server approval default (#1959) - #1978

Merged
Aaronontheweb merged 8 commits into
netclaw-dev:devfrom
Aaronontheweb:fix/1959-mcp-new-tool-hidden
Aug 18, 2026
Merged

fix(mcp): expose new tools under the server approval default (#1959)#1978
Aaronontheweb merged 8 commits into
netclaw-dev:devfrom
Aaronontheweb:fix/1959-mcp-new-tool-hidden

Conversation

@Aaronontheweb

@Aaronontheweb Aaronontheweb commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Fixes #1959.

Problem

A remote MCP server can add a tool after a user saves custom tool rules. A stale McpServerToolGrants list hid the new tool from a Personal audience.

The new tool should use the server approval default. An effective Deny must still hide and block the tool.

Change

  • The All MCP server mode does not apply McpServerToolGrants.
  • A new tool in that mode inherits the server default.
  • The Allowlist MCP server mode keeps its current closed grant list.
  • An effective Deny removes an MCP tool from the model tool list.
  • The TUI and CLI use an exact Deny override to disable a tool in the All mode.
  • The TUI and CLI preserve exact Auto and Approve overrides.
  • The TUI and CLI honor both accepted exact-key forms.
  • The daemon skips grant drift checks for the All mode.

This PR does not change the configuration schema. Issue #1984 tracks the larger MCP access and automatic migration cleanup.

Validation

  • Actor MCP policy tests: 20 passed.
  • CLI MCP command and TUI model tests: 57 passed.
  • Daemon MCP manager tests: 23 passed.
  • The native mcp-permissions tape passed.
  • Copyright headers passed.
  • Slopwatch found no new issue.
  • The changed C# files passed the formatter check.

The model eval suite needs a configured model endpoint. This test host has no endpoint, so that gate did not run locally.

…etclaw-dev#1959)

A remote MCP server can add a tool after the operator sets custom per-tool
rules. The frozen McpServerToolGrants allow-list hid the new tool. The operator
expected the new tool to inherit the server default posture.

Make the per-tool grant posture-aware. In All posture the grant list is
additive: an unnamed tool passes the audience check and inherits the server
default. Allowlist posture (Team/Public) keeps the closed allow-list and stays
fail-closed for an unseen tool.

Model a disabled tool as approval mode Deny, and hide a Deny MCP tool from the
exposed tool list for every audience. The model never receives a tool the
policy will block. The TUI checkbox and the `netclaw mcp tools` grant/revoke map
disable to Deny in open posture; enable over a Deny server default writes an
explicit Approval override so the toggle always takes effect. The daemon drift
warning fires only for Allowlist posture; All-posture grant lists are additive
and produce no drift.

Resolve the audience profile one time for each tool-filter pass instead of one
time for each tool. The exposure checks take the resolved profile, so a large
tool catalog does not re-resolve the profile per tool.

Update the netclaw-operations skill with the posture-aware permission model.
@Aaronontheweb Aaronontheweb added mcp Model context protocol server / client issues. config Configuration issues, netclaw doctor, schema validation. bug Something isn't working labels Aug 18, 2026
@Aaronontheweb Aaronontheweb changed the title fix(mcp): expose new remote tools under the server default posture (#1959) fix(mcp): expose new tools under the server approval default (#1959) Aug 18, 2026

@Aaronontheweb Aaronontheweb left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Aaronontheweb
Aaronontheweb merged commit 5ad7d2e into netclaw-dev:dev Aug 18, 2026
17 checks passed
@Aaronontheweb
Aaronontheweb deleted the fix/1959-mcp-new-tool-hidden branch August 18, 2026 13:57
@Aaronontheweb Aaronontheweb mentioned this pull request Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working config Configuration issues, netclaw doctor, schema validation. mcp Model context protocol server / client issues.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP: new tool added by remote server unavailable when running with custom mcp permissions

1 participant