What is this? It's basically the WEKA the machine-learning
library that allows you to upload data, train/evaluate classifiers, cluster, mine association rules,
run diagnostics but served by your favor LLM through 46 typed Model Context Protocol tools.
MCP server for WEKA machine learning. Train, evaluate, and run ML models from Claude, ChatGPT, and any MCP client. Java REST API + TypeScript MCP server, deployable to Azure Container Apps.
weka-api — Java 17 / Javalin REST service wrapping WEKA 3.9.6. Does the real ML. Persists
models to /app/models and datasets to /app/data. Listens on 7070.
weka-mcp — TypeScript/Node MCP server. A thin, typed forwarder — no ML logic; it translates
each MCP tool call into a weka-api REST call. Supports HTTP (POST /mcp) and stdio transports.
Finds weka-api via WEKA_API_URL.
bin/setup # build + start; auto-selects free host ports, then waits for health
bin/setup is the one-command install: it probes for free host ports (starting at 3001 for
weka-mcp and 7070 for weka-api), records them in a generated .env, runs docker compose up --build -d, and waits until weka-mcp reports healthy. It prints the endpoints when done. The plain
docker compose up --build -d still works if you'd rather manage ports yourself (defaults / .env).
weka-api starts first; weka-mcp waits until weka-api reports healthy (depends_on +
healthcheck). Both services publish a host port locally; the internal mcp→api wiring
stays on the service name (weka-api:7070), mirroring the cloud shape where weka-api is internal-only.
Check it's up (bin/setup prints the exact ports it chose):
bin/remove # down -v (wipes model/data volumes), removes images, frees the ports
# or, manually:
docker compose down # stop containers, keep model/data volumes
docker compose down -v # also wipe the weka-models + weka-data volumes
Connecting an MCP client
HTTP transport (the deployed shape)
Point any MCP-over-HTTP client at http://localhost:3001/mcp. Locally the auth check is skipped. The
cloud deployment can run open (no header — so ChatGPT / claude.ai / Claude Desktop connect with
zero setup) or secured (requires an X-Internal-Auth: <secret> header); see
infrastructure/README.md → Connect a client.
stdio transport (Claude Desktop / Claude Code)
Desktop clients speak MCP over stdio. Build once, then run dist/index.js with WEKA_API_URL
pointed at a running weka-api:
stdio needs weka-api reachable at WEKA_API_URL. The compose stack does not publish weka-api to
the host; for stdio dev either run weka-api directly (cd weka-api && mvn -q package -DskipTests && PORT=7070 java -jar target/weka-api-*-shaded.jar) or temporarily add ports: ["7070:7070"] to the
weka-api service in compose.yaml.
Environment variables
weka-api (read in weka-api/src/main/java/com/wekaapi/config/Config.java):
Variable
Default
Purpose
PORT
7070
HTTP port Javalin binds
MODELS_DIR
/app/models
serialized .model files
DATA_DIR
/app/data
uploaded ARFF/CSV datasets
MAX_UPLOAD_MB
100
upload size cap (MB)
LOG_LEVEL
INFO
Logback root level
JAVA_TOOL_OPTIONS
(unset)
JVM flags; compose sets -XX:MaxRAMPercentage=75.0 under the container cap
weka-mcp (read in weka-mcp/src/config.ts and client.ts):
Variable
Default
Purpose
WEKA_API_URL
http://localhost:7070
base URL of weka-api (compose: http://weka-api:7070)
MCP_HTTP_PORT
3000
port the HTTP transport listens on (POST /mcp)
WEKA_API_TIMEOUT_MS
210000
per-request timeout to weka-api (kept < ~240s Envoy ceiling)
INTERNAL_AUTH_SHARED_SECRET
(unset)
if set, POST /mcp requires header X-Internal-Auth: <secret>; unset ⇒ check skipped
MCP_HOST_PORT (default 3001) is a compose-only convenience that sets the host port published for
weka-mcp; the container still listens on MCP_HTTP_PORT (3000). See .env.example.
Run cd weka-mcp && npm run smoke to assert all 46 register with descriptions (no API needed). The
per-service READMEs — weka-mcp/README.md and WEKA-ORIGINAL-README.md
(the REST API contract) — go deeper on individual tools/endpoints.
Deploy to Azure
Container Apps + Bicep, as infra-as-code, lives in infrastructure/: weka-api gets
internal-only ingress (never public); weka-mcp gets public ingress — either open for a
zero-setup public demo or secured behind the X-Internal-Auth header. Cost is bounded by
scale-to-zero + a hard maxReplicas cap + a monthly budget alert, and an Azure Files share backs the
models/data volumes. See infrastructure/README.md for deploy steps and
how to connect ChatGPT / Claude.
W
Weka
iamademar·2 个星标·
MCP server for WEKA machine learning. Train, evaluate, and run ML models from Claude, ChatGPT, and any MCP client. Java REST API + TypeScript MCP server, deployable to Azure Container Apps.
上次检查时间:2026-10-27。 MCP server for WEKA machine learning. Train, evaluate, and run ML models from Claude, ChatGPT, and any MCP client. Java REST API + TypeScript MCP server, deployable to Azure Container Apps.