shap-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| load_modelA | Load a model file and instantiate the appropriate SHAP explainer. Note: Prompt the user to provide local filesystem paths on their machine, public URLs, or upload via http://localhost:8765/ui/. Files attached directly in chat are stored in a cloud container (/mnt/user-data/) that local tools cannot reach. Parametersmodel_path : str | None Path to a local .joblib or .pkl model file. model_url : str | None Public URL to download a model file. model_type : str One of 'tree', 'linear', 'deep', 'kernel'. Default is 'tree'. background_path : str | None Path to background CSV dataset (optional for tree/kernel, required for deep). |
| run_analysisB | Run SHAP explainer against a dataset. Note: Ask the user for local file paths, public URLs ( Parametersdata_path : str | None Path to a local CSV file. data_url : str | None Public URL to download a CSV dataset file. data : list[dict] | None Inline dataset passed as a JSON array. sample_size : int | None Override default auto-cap for dataset row sampling. |
| get_feature_importanceA | Return global feature importance from stored SHAP values. Parameterstop_n : int Number of top features to return (default: 10). |
| explain_predictionC | Return SHAP breakdown for a single instance. Parametersindex : int | None Row index in the analyzed dataset. data : dict[str, Any] | None Inline feature dictionary for explaining an arbitrary instance. |
| get_interactionB | Return SHAP interaction values between two features (Tree models only). Parametersfeature_a : str Name of the first feature. feature_b : str Name of the second feature. |
| get_plotA | Generate a SHAP visualization, save it as a PNG file, and return file path and URL. Parametersplot_type : str One of 'summary', 'bar', 'waterfall', 'force', 'dependence', 'heatmap'. index : int | None Row index in dataset (required for waterfall and force). feature_name : str | None Feature name (required for dependence). top_n : int Max features to show (default: 10). color_feature : str | None Feature to color by for dependence plots. output_path : str | None Override default output directory path. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| setup_analysis | Guide analysis setup with model type inference and sensible defaults. |
| interpret_results | Structure factual interpretation of SHAP feature importance results. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 6 tools
Each tool has a clearly distinct purpose: model loading, SHAP computation, global importance, local explanation, interaction values, and plotting. There is no overlap or ambiguity in what each tool does, so an agent can reliably select the correct one for a given task.
All tool names follow a consistent verb_noun pattern with lowercase and underscores (load_model, run_analysis, get_feature_importance, etc.). The verbs vary but are semantically appropriate, and the naming style is uniform across the set, making the API predictable.
Six tools provide a well-scoped surface for SHAP analysis. This is an appropriate size that covers the core workflow (load, analyze, query results, plot) without redundancy or unnecessary bloat. Each tool earns its place in the server.
The tool surface covers the full lifecycle of a SHAP analysis: loading a model, running the explainer, retrieving global and local explanations, getting interactions, and generating visualizations. There are no obvious gaps that would block an agent from completing typical analysis tasks.