RemoteXG MCP Server
Enables LLMs to perform distributed XGBoost training via the Model Context Protocol, allowing gradient-boosted tree model training directly from AI assistants.
README
RemoteXG 🚀
A stateless, production-ready Model Context Protocol (MCP) server that exposes distributed XGBoost training capabilities directly to LLMs, autonomous coding assistants, and local orchestration frameworks.
RemoteXG allows tools like Claude Code, Cursor, Windsurf, or custom agentic loops to instantly run optimized gradient-boosted tree architectures via standard protocols, completely decoupling heavy ML compute execution from context limits.
Architecture Overview
┌────────────────────────────────────────────────────────┐
│ AI Client │
│ (Claude Code, Cursor, Windsurf, MCP Inspector) │
└───────────────────────────┬────────────────────────────┘
│
▼ [ Standard I/O (stdio) Transport ]
┌────────────────────────────────────────────────────────┐
│ RemoteXG Server │
│ (Python 3.11 + FastMCP Framework) │
└───────────────────────────┬────────────────────────────┘
│
▼ [ Parallel Machine Learning Compute ]
┌────────────────────────────────────────────────────────┐
│ XGBoost Core Engine │
│ (libomp Multi-threaded Runtime) │
└────────────────────────────────────────────────────────┘
The system uses the Model Context Protocol (MCP) via standard input/output (stdio) streams. When an LLM client requests a training run, the server spins up a stateless local tracking context, trains an optimized native configuration on the input matrix data, and packages weights alongside key metrics back to the context window without saving heavy state artifacts to your filesystem.
Prerequisite Configurations (macOS Installation)
XGBoost utilizes an internal parallel computing multi-threading architecture called OpenMP (libomp). Since Apple Silicon / macOS platforms do not ship with this compiler backend by default, you must configure it globally before running the tool:
- Install OpenMP Runtime via Homebrew:
brew install libomp
- Install Required Python Dependencies: Install the core machine learning libraries along with the Model Context Protocol framework globally:
pip install xgboost scikit-learn mcp
- Verify Python Environment: Ensure you are using standard Homebrew or global Python 3.11 interpreters:
python3 --version
Local Development & Debugging Workflow
To isolate code parsing errors without relying on production deployment resources, you can test the script interactively through the graphical web interface provided by the official MCP Inspector.
Step 1: Initialize the MCP Inspector Interface
Run the network-isolated inspector loop in a clean terminal panel:
npx @modelcontextprotocol/inspector
This process will automatically build your testing dashboard and output the local web URL (typically http://localhost:3000).
Step 2: Establish the Standard I/O Connection Bridge
Open the dashboard link in your browser. Inside the left-hand configuration sidebar, configure these exact transport instructions to safely spin up your local environment:
- Transport Type:
STDIO - Command:
env - Arguments:
python3 RemoteXG.py
Click the dark blue Connect button. The interface will display a green Connected status marker and map out RemoteXG under the active server logs block.
Step 3: Interactive Verification Test Case
Navigate to the Tools tab at the top of the interface. Locate the train_xgboost tool schema, input these dummy arrays into the fields, and verify execution:
X(JSON Matrix):[[1.0, 2.0], [2.0, 3.0], [3.0, 4.0], [4.0, 5.0], [5.0, 6.0]]y(JSON Vector):[1.5, 2.5, 3.5, 4.5, 5.5]max_depth:3learning_rate:0.3n_estimators:100objective:reg:squarederror
Click Run Tool. A successful execution returns a raw structured text response highlighting computed loss values and a compiled Base64 binary serialization format of your newly generated booster architecture.
Transitioning to Live Production (Butterbase Integration)
Once local execution parameters have been stabilized inside the browser interface, your stateless structure is ready to be transitioned out into high-performance cloud hosting via Butterbase.
Step 1: Acquire your Production Credentials
Log into your project console at butterbase.ai/dashboard and navigate to the API Keys section. Capture your unique master authorization token (bb_sk_...). You will need this key if you are configuring editor-level extensions like Cursor, Claude Code, or Windsurf to authenticate global background processes against your account.
Step 2: Log Into Your Butterbase Workspace via CLI
For deployment and direct invocation testing, authenticate your terminal session natively to bypass end-user JWT requirements:
npx @butterbase/cli login
Follow the terminal prompts to paste your API token or complete the terminal handshake.
Step 3: Provision Your Serverless Infrastructure
Deploy the project bundle directly to your host workspace. By targeting your edge-optimized JavaScript handler, the system processes your files and builds the serverless function mapping:
npx @butterbase/cli functions deploy index.js
Upon a successful upload build string, the CLI will output your live invocation path:
✔ Function deployed successfully!
Invoke URL: /v1/app_chc5aqphyxmx/fn/index
Step 4: Register RemoteXG to your Global mcp.json Config
To hook the newly containerized cloud endpoint into tools like Claude Desktop, append the server configuration parameters directly into your local configuration file (typically mapped at ~/Library/Application Support/Claude/mcp.json):
{
"mcpServers": {
"remotexg-prod": {
"command": "npx",
"args": [
"@butterbase/cli",
"functions",
"invoke",
"index"
]
}
}
}
Step 5: Perform a Live End-to-End Test
Verify that your active workspace session seamlessly signs your payloads by executing the live production endpoint directly using the session-aware CLI utility:
npx @butterbase/cli functions invoke index --data '{
"X": [[1.0, 2.0], [2.0, 3.0], [3.0, 4.0], [4.0, 5.0], [5.0, 6.0]],
"y": [1.5, 2.5, 3.5, 4.5, 5.5],
"max_depth": 3,
"learning_rate": 0.3,
"n_estimators": 10
}' | jq -r '.model_b64' | base64 -d > models/model.json
A valid execution handshake will return your structured decision tree matrices and final training loss metrics directly in your console! 🚀
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。