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! š
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.