Repository navigation
Add opt-in tool allowlists for local-model clients - #32
Draft
dylanoliverdo-coder wants to merge 1 commit into
Draft
dylanoliverdo-coder wants to merge 1 commit into
dylanoliverdo-coder wants to merge 1 commit into
Conversation
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.
Clients currently receive the full registered tool catalog even when a task needs only a few tools. This adds an optional
MASTERCAM_MCP_TOOLScomma-separated allowlist, passed through both stdio and HTTP server creation. Help and capability discovery describe the same selected catalog, and omitted tools have no registered call handler.The approach comes from the explicit allowlists and bounded MCP discovery used in my Journeyman local assistant, where the shop-side model runs on an 8 GB GPU. This is a new TypeScript implementation of the allowlist portion; it contains no Journeyman source, customer data, SDK files, or credentials.
The setting only narrows the existing backend surface. It cannot enable a hidden native mapping or override profile, read-only, or approval policy. Unset preserves existing behavior; explicitly empty registers zero tools; unknown or unregistered names reject server creation. Existing resources and internal tool dependencies retain their current behavior.
Validation
node work/local-model-catalog.mjsmeasures the synthetic fixture's serialized tool arrays: full catalog 59 tools / 87,555 bytes; documented example 4 tools / 7,339 bytes.b41ab3f9db37544b9941ec3c8b88b3b2a54d5a9c.This is a schema-payload measurement. Local-model inference accuracy, latency, GPU memory use, and licensed live Mastercam behavior remain untested by this PR. The local-model guide records how to evaluate those separately.