churn-mcp-server
Provides a thin adapter over an existing FastAPI-based churn-prediction service: predict_churn submits the 19-field customer schema and returns churn probability, prediction, and threshold, while check_model_health proxies the API's /health endpoint.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@churn-mcp-serverPredict churn for customer 1059 using their latest account features"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
churn-mcp-server
Exposes the existing ml-production-template churn-prediction API as an MCP
tool, so an MCP-aware client (Claude Desktop, Claude Code, or any MCP client)
can call predict_churn directly.
Design
This is a thin adapter, not a rewrite of the model server. It does not load
the model itself -- it calls the already-deployed churn-api service's
/predict endpoint over HTTP. That means:
The MCP layer can be redeployed or scaled independently of the model.
If
churn-apirestarts, this doesn't need to.The "real" ML system (FastAPI + MLflow) is untouched; MCP is an additive interface on top of it, matching how you'd actually integrate MCP into an existing production service rather than baking it into the model server.
Two tools are exposed:
predict_churn-- the 19-field customer schema from the real API, returns churn_probability / churn_prediction / threshold_used.check_model_health-- proxies the API's/healthendpoint.
Related MCP server: MCP from API
A version note
The official mcp Python SDK shipped a v2.0 recently that renamed FastMCP
to MCPServer and moved import paths. This project pins mcp<2.0.0 and uses
from mcp.server.fastmcp import FastMCP, since that's still the stable,
widely-documented line as of this writing. If you're reading this later and
pip install mcp pulls v2 by default, you'll need to port the import
(mcp.server.fastmcp.FastMCP → mcp.server.MCPServer) — check the SDK's
migration guide before assuming the code below still applies as-is.
Local test (stdio, no Docker)
pip install -r requirements.txt
$env:MCP_TRANSPORT="stdio"
$env:CHURN_API_URL="http://localhost:8000" # your local churn-api
python server.pyPoint Claude Desktop's claude_desktop_config.json at it:
{
"mcpServers": {
"churn-predictor": {
"command": "python",
"args": ["C:\\path\\to\\churn-mcp-server\\server.py"],
"env": { "CHURN_API_URL": "http://localhost:8000" }
}
}
}Deploying into the existing kind cluster
This assumes the churn-api Deployment + Service from the Kubernetes
project are already running in your kind cluster.
docker build -t churn-mcp-server:local .
kind load docker-image churn-mcp-server:local --name <your-cluster-name>
kubectl apply -f k8s/deployment.yaml
kubectl get pods -l app=churn-mcp-serverVerify:
kubectl port-forward svc/churn-mcp-server 8080:80
curl http://localhost:8080/healthzThis server cannot be deployed
Maintenance
Related MCP Connectors
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
Security & DLP proxy for MCP: tool-poisoning scans, PII redaction on tool args/results. Beta.
The OpenRouter for tools. One MCP connection gives any AI agent 254 hosted tools, pay per call.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceA unified HTTP/HTTPS service that exposes Model Context Protocol (MCP) functionality over HTTP endpoints, allowing clients to list available tools and call them through a standardized API.4 npm-
- FlicenseNot gradedqualityDmaintenanceEnables users to expose arbitrary HTTP APIs as configurable MCP tools by defining tool specifications in a JSON configuration file.2,159 npm3-
- AlicenseNot gradedqualityDmaintenanceProvides a standardized MCP interface for interacting with HTTP tools and services, enabling unified API access and management.MIT
- AlicenseAqualityDmaintenanceSelf-healing proxy for MCP servers that wraps tool calls with automatic retry, circuit breaker protection, and observability.526 npmMIT