Skip to content

feat: add excludeTools option to blacklist tools per server#37

Open
ahmadaccino wants to merge 1 commit intonicobailon:mainfrom
ahmadaccino:feat/exclude-tools
Open

feat: add excludeTools option to blacklist tools per server#37
ahmadaccino wants to merge 1 commit intonicobailon:mainfrom
ahmadaccino:feat/exclude-tools

Conversation

@ahmadaccino
Copy link
Copy Markdown

Closes #36

Summary

Adds an excludeTools server config option that accepts an array of tool names to exclude. This complements directTools by allowing a blacklist approach: register all tools except specific ones, rather than maintaining an explicit allowlist.

Changes

File Change
types.ts Added excludeTools?: string[] to ServerEntry
tool-metadata.ts buildToolMetadata skips excluded tools (live connections)
metadata-cache.ts reconstructToolMetadata accepts + applies excludeTools (cached metadata)
init.ts Passes definition.excludeTools to reconstructToolMetadata
direct-tools.ts Skips excluded tools when registering direct tools
mcp-panel.ts Skips excluded tools in the /mcp panel UI

Behavior

  • Matches against both original MCP names (get_screenshot) and prefixed names (figma_get_screenshot), so either format works
  • Excluded tools are filtered from direct registration, proxy search/list/describe, and the /mcp panel
  • Excluded tools cannot be called via mcp({ tool: ... }) either, since they're removed from the metadata map
  • Works with directTools: true, directTools: ["..."] , or proxy-only mode

Example Config

{
  "mcpServers": {
    "figma": {
      "url": "http://localhost:3845/mcp",
      "directTools": true,
      "excludeTools": ["get_code_connect_map", "get_figjam"]
    }
  }
}

Add excludeTools server config option that accepts an array of tool names
to exclude from registration, proxy search/list, and the /mcp panel.

Matches against both original MCP tool names and prefixed names, so either
format works in the config (e.g. 'get_screenshot' or 'figma_get_screenshot').

This complements directTools by allowing a blacklist approach: register all
tools except specific ones, rather than maintaining an explicit allowlist.
New tools added by MCP servers automatically appear without config changes.

Example config:
  {
    "mcpServers": {
      "figma": {
        "url": "http://localhost:3845/mcp",
        "directTools": true,
        "excludeTools": ["get_code_connect_map", "get_figjam"]
      }
    }
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Add excludeTools option to blacklist specific tools per server

1 participant