Per-client default toolset for Automatic resolution#176
Merged
Conversation
Each entry in `$supportedMCPClients` now carries a `DefaultToolset` key, and
`InstallMCPServer`/`DeployAgentTools` route the `Automatic` server through a
new `defaultToolsetForTarget` helper. CLI/IDE clients default to
"WolframLanguage" while desktop clients (Claude Desktop, Goose) keep "Wolfram".
Aliases, `{name, dir}` pairs, file targets, and unknown clients fall back to
`$defaultMCPServer`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Used in existing `appname_test.json` test fixture filenames in `Tests/DeployAgentTools.wlt`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Project-scoped MCP server config is per-developer and shouldn't be tracked. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces per-client default MCP toolset selection so Automatic no longer always means the same server for every client. It updates the supported-client metadata and threads that metadata into InstallMCPServer and DeployAgentTools, with new tests for the new resolution path.
Changes:
- Add
DefaultToolsetmetadata to supported MCP clients and expose a shareddefaultToolsetForTargethelper. - Route
InstallMCPServer[..., Automatic]andDeployAgentTools[..., Automatic]through that helper. - Add focused tests for Automatic resolution plus minor repo housekeeping updates (
.gitignore, cspell).
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
Tests/InstallMCPServer.wlt |
Adds tests for defaultToolsetForTarget and Automatic install resolution. |
Tests/DeployAgentTools.wlt |
Adds tests for Automatic deploy resolution. |
Kernel/SupportedClients.wl |
Adds per-client DefaultToolset metadata and the lookup helper. |
Kernel/InstallMCPServer.wl |
Changes Automatic install resolution to use per-client defaults. |
Kernel/DeployAgentTools.wl |
Changes Automatic deploy resolution to use per-client defaults. |
Kernel/CommonSymbols.wl |
Exports the shared helper symbol in the common context. |
.gitignore |
Ignores local .mcp.json files. |
.cspell.json |
Adds appname to the spelling dictionary. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Updates user-facing docs to reflect the behavior introduced in ff07e83: `InstallMCPServer`/`DeployAgentTools` resolve `Automatic` to the target client's `DefaultToolset` (`"WolframLanguage"` for coding clients, `"Wolfram"` for chat clients) rather than always falling back to `"Wolfram"`. - `docs/mcp-clients.md`: add a **Default Toolset** column to the supported-clients table, document the `"DefaultToolset"` field in the new-client field reference and example entry. - `docs/servers.md`: clarify that `"Wolfram"` is the default only for chat clients (`ClaudeDesktop`, `Goose`). - `docs/deploy-agent-tools.md`: correct the `server` argument description that previously claimed `Automatic` always resolves to `"Wolfram"`. - `README.md`: note per-client defaults after the Quick Start install example. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
When `InstallMCPServer`/`DeployAgentTools` is called with an `Automatic` server and a `File[...]` target whose path doesn't reveal the client, the explicit `"ApplicationName"` option now drives the default toolset choice. Previously the path-based guess fell through to `"Wolfram"` even when the caller had named a client whose `DefaultToolset` is `"WolframLanguage"` (e.g. Cline at a custom location). Adds a 2-arg `defaultToolsetForTarget[target, appName]` form so an explicit application name overrides target-based resolution, and routes both call sites through it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 12 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Reflects that the per-client default only applies when the path or content identifies a known client (or `"ApplicationName"` is supplied); other `File[...]` targets fall back to `"Wolfram"`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds positive tests for path-based client detection in `defaultToolsetForTarget`, `InstallMCPServer`, and `DeployAgentTools` (`.mcp.json`, `.vscode/mcp.json`, `opencode.json`) and a suite-level assertion that every `\$SupportedMCPClients` entry has a string `DefaultToolset` resolving to a real predefined server. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The `SupportedMCPClients-DefaultToolset-Coverage` test enforces that every entry in `$supportedMCPClients` defines a valid string `"DefaultToolset"`, so the contributor-facing table should reflect that invariant. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
DefaultToolsetfield to each entry in$supportedMCPClientsso different clients can advertise different default toolsets.defaultToolsetForTargetto look up that field for a client name, alias,{name, dir}pair, or file target — falling back to$defaultMCPServerfor unknown inputs.InstallMCPServer[target, Automatic]andDeployAgentTools[target, Automatic]through the helper so coding-focused clients (Claude Code, Cursor, Codex, Copilot CLI, Augment, Antigravity, Kiro, OpenCode, VS Code, Windsurf, Amazon Q, Cline, Zed) default to"WolframLanguage", while desktop clients (Claude Desktop, Goose) keep"Wolfram".appnameto the cspell dictionary (matches existingappname_test.jsontest fixture filenames)..mcp.jsonClaude Code project config.Test plan
TestReportonTests/InstallMCPServer.wlt— coversdefaultToolsetForTargetfor canonical names, aliases,{name, dir}pairs, file targets, and unknown inputs, plus end-to-endInstallMCPServer[..., Automatic]and the 1-arg form.TestReportonTests/DeployAgentTools.wlt— coversDeployAgentTools[..., Automatic]and the 1-arg form forClaudeCode.InstallMCPServer[{"ClaudeCode", dir}]produces aWolframLanguageserver, andInstallMCPServer[{"ClaudeDesktop", dir}]still producesWolfram.🤖 Generated with Claude Code