Xplainable Mcp Server

io.github.xplainable由 GitHub 账号 xplainable 发布v1.0.0更新于 Oct 24, 2026

Train, explain, optimise and deploy transparent glass-box ML models via workflow tools.

已验证Streamable HTTP可网页运行数据与分析AI 与机器学习

概览

AI 生成的概览

将助手连接到 Xplainable 平台,用于训练、解释、优化并部署透明的白盒机器学习模型。

可以做什么
  • 列出并预览团队数据集与模型,查看列、类型和样本行
  • 创建并预览预处理转换器,推断或设置特征关系
  • 在服务端训练模型,读取训练/测试指标与特征重要性
  • 检查并解释模型,对单个特征重新拟合并反复迭代训练
  • 部署并激活模型版本,再执行预测、优化器和报告任务
适用场景
适合希望由助手在 Xplainable 上完成整个建模流程的场景:检查数据、选择特征与预处理、训练并比较透明模型、解释模型并部署结果。更适合已在使用 Xplainable 平台的团队,而非一次性的本地实验。
运行要求
可使用 mcp.xplainable.io 远程端点并通过 OAuth 登录,或在本地以 stdio 方式运行并配置平台生成的 Xplainable API 密钥。本地方式需要 Python 及 uvx 或克隆的代码仓库;可选变量可覆盖平台主机、推理主机、组织/团队绑定、传输方式和日志级别。
安装前请注意
训练、部署、推理、优化器运行和报告创建都会作用于团队的平台账户并改变服务端状态,部署与激活会影响线上模型。本地模式需要 XPLAINABLE_API_KEY,该密钥从环境变量读取。数据集与模型数据会发送到 Xplainable 平台进行训练。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Xplainable Mcp Server,将其添加到工作区。
  2. 连接 所需的 凭据。它们会被私密存储,绝不会在公开页面上展示。
  3. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.xplainable%2Fxplainable-mcp-server/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。 客户端会在首次连接时完成 OAuth 登录。

{
  "mcpServers": {
    "xplainable": {
      "type": "http",
      "url": "https://mcp.xplainable.io/mcp"
    }
  }
}

README

Xplainable MCP Server

A Model Context Protocol server for the Xplainable platform. It lets an LLM agent (Claude, or any MCP client) train, deploy, optimise, and explain transparent machine-learning models. The agent is the orchestrator: it inspects the data, decides features and preprocessing, trains, reads the metrics, and iterates.

Training always runs server-side on the Xplainable platform — the MCP host never fits a model locally.

Two Ways to Use It

  1. Hosted — connect your MCP client to https://mcp.xplainable.io (OAuth login, no installation).
  2. Local — run the server yourself over stdio with an Xplainable API key. This is what the rest of this README covers.

Quick Start (Local)

1. Get an API key

Create one at platform.xplainable.io.

2a. Claude Code

bash
claude mcp add xplainable \  -e XPLAINABLE_API_KEY=your-api-key-here \  -- uvx --from git+https://github.com/xplainable/xplainable-mcp-server.git xplainable-mcp

2b. Claude Desktop

Add to your MCP settings file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json
json
{  "mcpServers": {    "xplainable": {      "command": "uvx",      "args": ["--from", "git+https://github.com/xplainable/xplainable-mcp-server.git", "xplainable-mcp"],      "env": {        "XPLAINABLE_API_KEY": "your-api-key-here"      }    }  }}

No uv? Clone and install instead:

bash
git clone https://github.com/xplainable/xplainable-mcp-server.gitcd xplainable-mcp-serverpython -m venv .venv && source .venv/bin/activatepip install -e .

then use "command": "/path/to/xplainable-mcp-server/.venv/bin/xplainable-mcp" (no args) in the config above.

3. Try it

Ask your agent: "What models and datasets do I have?" — it should call models_list_team_models and datasets_list_team_datasets.

The Iterate Loop

The tool surface puts the agent in control of every training decision:

  1. datasets_list_team_datasets / models_list_team_models / deployments_list_deployments — see the team's assets
  2. datasets_preview_dataset_json(dataset_id) — inspect columns, types, and sample rows; decide the target, columns to drop, and whether preprocessing is needed
  3. (Optional) preprocessing_list_available_transformers → preprocessing_create_preprocessor_from_spec → preprocessing_preview_from_data to verify transformed output 3b. Declare feature relationships once per dataset: datasets_infer_relationships proposes derived columns, implications and monotonic hints with evidence; commit with datasets_set_relationships (re-apply to old versions with models_apply_relationships)
  4. models_train_model(dataset_id, target_column, model_name, ...) — synchronous server-side training; returns model/version IDs, train/test metrics, and feature importances
  5. Inspect: models_get_feature_info / gpt_explain_model; compare train vs test metrics
  6. Iterate: models_refit_features for per-feature tuning, or train again with different features / preprocessing
  7. deployments_deploy(version_id) — deploy once satisfied (then deployments_activate_deployment)
  8. Act on the model: inference_predict / optimisers_run_optimiser / reports_create_report (+ poll reports_get_job_status)

Tool Surface

Tools are generated at server startup from @mcp_tool-decorated methods in the xplainable-client package — there are no checked-in generated files. The surface is flat: every registry tool is exposed, with MCP annotations derived from its category (read → read-only hint, write → destructive hint).

Configuration

VariableRequiredDescription
XPLAINABLE_API_KEYyes (local)API key from platform.xplainable.io
XPLAINABLE_HOST / XPLAINABLE_HOSTNAMEnoPlatform host override (defaults to https://platform.xplainable.io). Set both to the same value.
XPLAINABLE_INFERENCE_HOSTnoInference server override for the direct-to-inference tools (inference_score_dataset, optimisers_run_portfolio); defaults to https://inference.xplainable.io. Set it whenever the platform host is non-prod.
XPLAINABLE_ORG_ID / XPLAINABLE_TEAM_IDnoOrg/team binding, if your API key is not bound to a team
MCP_TRANSPORTnostdio (default) or streamable-http
LOG_LEVELnoDEBUG, INFO (default), WARNING, ERROR

See .env.example. The API key is read from the environment only and is never exposed through a tool.

CLI

bash
xplainable-mcp-cli list-tools            # list all available toolsxplainable-mcp-cli validate-config       # check env configurationxplainable-mcp-cli test-connection       # test API connectivityxplainable-mcp-cli generate-docs         # generate tool documentation

Docker (HTTP mode)

bash
cp .env.example .env   # fill in your API keydocker compose up --build

The container serves streamable-HTTP on port 8000 with a /health endpoint. For anything beyond localhost, terminate TLS at a reverse proxy.

Development

bash
git clone https://github.com/xplainable/xplainable-mcp-server.gitcd xplainable-mcp-serverpip install -e ".[dev]"
pytest            # run testsruff check .      # lint

Runtime tool generation

Client-backed tools are generated at import time by xplainable_mcp/runtime_tools.py from the @mcp_tool registry in xplainable-client — there is no sync step. Upgrading the pinned xplainable-client version is all it takes to pick up new or changed tools; the test suite (tests/test_surface.py) pins the tool count so surface changes are always deliberate.

Compatibility

MCP Serverxplainable-clientfastmcp
current (main)>=1.13.0>=2.0.0,<3.0.0

Contributing

See CONTRIBUTING.md.

License

MIT License — see LICENSE.

来源:README.md,提交 eeba577

工具

0
该服务器需要登录,因此 SourceWeft 无法在没有账号的情况下读取其工具,也未收录。已连接账号所能看到的内容可能因账号及其权限而异。

版本历史

1
  1. v1.0.0最新Sep 16, 2026

评分

已满足适用检查项的 85%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分