feat: add excludeTools option to blacklist tools per server#37
Open
ahmadaccino wants to merge 1 commit intonicobailon:mainfrom
Open
feat: add excludeTools option to blacklist tools per server#37ahmadaccino wants to merge 1 commit intonicobailon:mainfrom
ahmadaccino wants to merge 1 commit intonicobailon:mainfrom
Conversation
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"]
}
}
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #36
Summary
Adds an
excludeToolsserver config option that accepts an array of tool names to exclude. This complementsdirectToolsby allowing a blacklist approach: register all tools except specific ones, rather than maintaining an explicit allowlist.Changes
types.tsexcludeTools?: string[]toServerEntrytool-metadata.tsbuildToolMetadataskips excluded tools (live connections)metadata-cache.tsreconstructToolMetadataaccepts + appliesexcludeTools(cached metadata)init.tsdefinition.excludeToolstoreconstructToolMetadatadirect-tools.tsmcp-panel.ts/mcppanel UIBehavior
get_screenshot) and prefixed names (figma_get_screenshot), so either format works/mcppanelmcp({ tool: ... })either, since they're removed from the metadata mapdirectTools: true,directTools: ["..."], or proxy-only modeExample Config
{ "mcpServers": { "figma": { "url": "http://localhost:3845/mcp", "directTools": true, "excludeTools": ["get_code_connect_map", "get_figjam"] } } }