AutoTuneMPC is an MCP server published by com.autotunempc, hosted at api.autotunempc.com. When last checked on 2026-11-24 it was working: it answers and lists its tools. It declares 10 tools, including identify_discrete_plant, validate_problem, solve_mpc, reset_warm_start, start_autotune_job.
Constrained nonlinear MPC and Optuna tuning over HTTPS JSON.
Nothing else in the archive shares these values.
Squares are this server's values; dots are other servers sharing them. A shared address or publisher is a lead, not proof of a common operator.
Inferred from the host name and headers: what a server runs on, not who runs it.
Fit a discrete linear A, B, and dt from logged (t, u, y) samples. This tool stays free when payment enforcement is on. It does not call IPOPT. Pass the returned matrices to ``solve_mpc`` as a linear system. Send 4 to 2000 samples. Each ``y`` has length 1..24 and each ``u`` has length 1..12, the same widths on every row, all finite, with strictly increasing timestamps. Anything else is rejected before the fit.
| Parameter | Type | Description |
|---|---|---|
| request * | object | Logged (t, u, y) samples for a free discrete linear fit. No X-API-Key and no x402 charge. Pass A, B, and dt to solve_mpc after a free validate_problem. |
{
"name": "identify_discrete_plant",
"title": "Identify a discrete plant",
"description": "Fit a discrete linear A, B, and dt from logged (t, u, y) samples.\n\nThis tool stays free when payment enforcement is on. It does not call\nIPOPT. Pass the returned matrices to ``solve_mpc`` as a linear system.\nSend 4 to 2000 samples. Each ``y`` has length 1..24 and each ``u`` has\nlength 1..12, the same widths on every row, all finite, with strictly\nincreasing timestamps. Anything else is rejected before the fit.",
"inputSchema": {
"type": "object",
"required": [
"request"
],
"properties": {
"request": {
"type": "object",
"required": [
"samples"
],
"properties": {
"samples": {
"type": "array",
"items": {
"type": "object",
"required": [
"t",
"u",
"y"
],
"properties": {
"t": {
"type": "number",
"description": "Sample time. Must be finite, and strictly increasing from row to row. Use one time unit for the whole log."
},
"u": {
"type": "array",
"items": {
"type": "number"
},
"maxItems": 12,
"minItems": 1,
"description": "Input sample, length 1 to 12. A scalar is wrapped as a one-element list. Every row uses the same length."
},
"y": {
"type": "array",
"items": {
"type": "number"
},
"maxItems": 24,
"minItems": 1,
"description": "Output sample, length 1 to 24. A scalar is wrapped as a one-element list. Every row uses the same length."
}
},
"description": "One logged sample. ``u`` and ``y`` are scalars or vectors.",
"additionalProperties": false
},
"maxItems": 2000,
"minItems": 4,
"description": "Logged (t, u, y) rows. Length 4 to 2000. This fit is free: no X-API-Key and no x402 charge."
}
},
"description": "Logged (t, u, y) samples for a free discrete linear fit. No X-API-Key and no x402 charge. Pass A, B, and dt to solve_mpc after a free validate_problem.",
"additionalProperties": false
}
},
"additionalProperties": false
},
"outputSchema": {
"type": "object",
"additionalProperties": true
},
"annotations": {
"title": "Identify a discrete plant",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Check dimensions, bounds, and linear controllability before a solve. This is POST /v1/validate and stays free when payment enforcement is on. It does not use X-API-Key and it does not return HTTP 402. Call it before solve_mpc when you want the plant rejected without spending a credit.
Schema too large to show here (20,885 characters).
{
"name": "validate_problem",
"title": "Validate a problem",
"description": "Check dimensions, bounds, and linear controllability before a solve.\n\nThis is POST /v1/validate and stays free when payment enforcement is on.\nIt does not use X-API-Key and it does not return HTTP 402. Call it before\nsolve_mpc when you want the plant rejected without spending a credit.",
"inputSchema": {
"truncated": true,
"chars": 20885
},
"outputSchema": {
"type": "object",
"additionalProperties": true
},
"annotations": {
"title": "Validate a problem",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Solve a multi-step constrained MPC problem on the server. Use this when the horizon has soft state bounds, hard input and slew limits, and an offset-free disturbance rejection term. Pass the same ``session_id`` on later calls of one closed loop so the shifted primal and dual warm start is restored. Omit ``session_id`` for a single stateless solve. Do not call this for a one-step linear update you can do locally (a matrix multiply, a threshold, or reading a sensor). Those do not need IPOPT. CasADi and IPOPT return u0 and the predicted trajectory for robotics, energy storage, and process control. session_id is the warm start. This is POST /v1/solve at $0.02. Send header X-API-Key when a $29 pack still has solve credits. With no key, or when those credits are gone, the call is HTTP 402 and an agent pays with x402. There is no second payment path. Set ``reset_warm_start`` or call the ``reset_warm_start`` tool to drop the seed for that session. The compiled solver stays. A reset only clears the seed stored for the caller who owns it.
Schema too large to show here (23,438 characters).
{
"name": "solve_mpc",
"title": "Solve MPC",
"description": "Solve a multi-step constrained MPC problem on the server.\n\nUse this when the horizon has soft state bounds, hard input and slew limits,\nand an offset-free disturbance rejection term. Pass the same ``session_id``\non later calls of one closed loop so the shifted primal and dual warm start\nis restored. Omit ``session_id`` for a single stateless solve.\n\nDo not call this for a one-step linear update you can do locally (a matrix\nmultiply, a threshold, or reading a sensor). Those do not need IPOPT.\nCasADi and IPOPT return u0 and the predicted trajectory for robotics,\nenergy storage, and process control. session_id is the warm start.\n\nThis is POST /v1/solve at $0.02. Send header X-API-Key when a $29 pack still\nhas solve credits. With no key, or when those credits are gone, the call is\nHTTP 402 and an agent pays with x402. There is no second payment path.\n\nSet ``reset_warm_start`` or call the ``reset_warm_start`` tool to drop the\nseed for that session. The compiled solver stays. A reset only clears the\nseed stored for the caller who owns it.",
"inputSchema": {
"truncated": true,
"chars": 23438
},
"outputSchema": {
"type": "object",
"additionalProperties": true
},
"annotations": {
"title": "Solve MPC",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": false,
"destructiveHint": false
}
}Clear one session's shifted primal and dual. Next ``solve_mpc`` / ``POST /v1/solve`` with this ``session_id`` is cold. The compiled solver stays. Stateless calls omit ``session_id`` and already clear warm-start memory, so they do not use this tool.
| Parameter | Type | Description |
|---|---|---|
| session_id * | string | Session id whose warm-start seed to drop. Required, and at most 128 characters. Free: it does not spend a credit. The compiled solver stays. The next solve_mpc with this id is a cold start. Clearing an unknown id changes nothing. |
{
"name": "reset_warm_start",
"title": "Reset warm start",
"description": "Clear one session's shifted primal and dual.\n\nNext ``solve_mpc`` / ``POST /v1/solve`` with this ``session_id`` is cold.\nThe compiled solver stays. Stateless calls omit ``session_id`` and already\nclear warm-start memory, so they do not use this tool.",
"inputSchema": {
"type": "object",
"required": [
"session_id"
],
"properties": {
"session_id": {
"type": "string",
"description": "Session id whose warm-start seed to drop. Required, and at most 128 characters. Free: it does not spend a credit. The compiled solver stays. The next solve_mpc with this id is a cold start. Clearing an unknown id changes nothing."
}
},
"additionalProperties": false
},
"outputSchema": {
"type": "object",
"additionalProperties": true
},
"annotations": {
"title": "Reset warm start",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Queue an Optuna search for Q, R, Rd, and Qf. Then poll ``get_autotune_job``. The tuner needs discrete or continuous linear matrices A and B, one of double_integrator, thermal_rc_zone, soil_moisture_cascade, cart_pendulum, unicycle_kinematics, gravity_tank, icr_skid_steer, and ackermann, or a kind expression plant with one allowlisted scalar expression per state row. Expressions outside that allowlist are rejected. Optional h rows and fixed obstacle slots, path-frame residuals, and zone bands are accepted. Call this when the weights are unknown and you can afford a closed-loop study with plant mismatch. Optuna tunes Q, R, Rd, and Qf on the single scenario in the request and reports overshoot and settling time. There is no scenario bank and no never-worse check: the result is the best trial of that study, not a comparison with weights you already have. It is an alternative to manual PID or hand-tuned MPC. The reply is a ``job_id``. When payment enforcement is on it also includes a ``job_token`` for ``get_autotune_job``. It does not contain the weights. Poll until ``status`` is ``complete`` or ``failed``. The finished result's ``Q``, ``R``, ``Rd``, and ``Qf`` are the physical weights. ``normalized_Q`` and its siblings are the unitless search box. Payment settles when the job is accepted onto the queue, not when the study finishes. This is POST /v1/autotune at $1.50. Send header X-API-Key when a $29 pack still has an autotune credit. With no key, or when those credits are gone, the call is HTTP 402 and an agent pays with x402. A full queue is HTTP 429 and is not charged. The template study uses sampler seed 7. The study itself stops at ``timeout_seconds``. A process restart marks leftover ``running`` rows ``failed`` with ``interrupted_by_restart`` instead of deleting a paid job.
Schema too large to show here (25,923 characters).
{
"name": "start_autotune_job",
"title": "Autotune weights",
"description": "Queue an Optuna search for Q, R, Rd, and Qf. Then poll ``get_autotune_job``.\n\nThe tuner needs discrete or continuous linear matrices A and B, one of\ndouble_integrator, thermal_rc_zone, soil_moisture_cascade, cart_pendulum,\nunicycle_kinematics, gravity_tank, icr_skid_steer, and ackermann, or a kind\nexpression plant with one allowlisted scalar expression per state row.\nExpressions outside that allowlist are rejected. Optional h rows and fixed\nobstacle slots, path-frame residuals, and zone bands are accepted.\n\nCall this when the weights are unknown and you can afford a closed-loop\nstudy with plant mismatch. Optuna tunes Q, R, Rd, and Qf on the single\nscenario in the request and reports overshoot and settling time. There is\nno scenario bank and no never-worse check: the result is the best trial of\nthat study, not a comparison with weights you already have. It is an alternative to manual PID or\nhand-tuned MPC. The reply is a ``job_id``. When payment\nenforcement is on it also includes a ``job_token`` for ``get_autotune_job``.\nIt does not contain the weights. Poll until ``status`` is ``complete`` or\n``failed``. The finished result's ``Q``, ``R``, ``Rd``, and ``Qf`` are the\nphysical weights. ``normalized_Q`` and its siblings are the unitless search box.\n\nPayment settles when the job is accepted onto the queue, not when the study\nfinishes. This is POST /v1/autotune at $1.50. Send header X-API-Key when a\n$29 pack still has an autotune credit. With no key, or when those credits\nare gone, the call is HTTP 402 and an agent pays with x402. A full queue is HTTP 429 and is not charged. The template study uses sampler seed 7. The study itself stops\nat ``timeout_seconds``. A process restart marks leftover ``running`` rows\n``failed`` with ``interrupted_by_restart`` instead of deleting a paid job.",
"inputSchema": {
"truncated": true,
"chars": 25923
},
"outputSchema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"annotations": {
"title": "Autotune weights",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": false,
"destructiveHint": false
}
}Read one autotune job started by ``start_autotune_job``. ``status`` is ``running``, ``complete``, or ``failed``. On ``complete``, ``result`` holds the Pareto-best weights, overshoot, settling time, RMSE, and solve time. Poll again while it is ``running``. When payment enforcement is on, pass the ``job_token`` from the start call or the ``X-Job-Token`` header. A failed job reports ``autotune_failed``.
| Parameter | Type | Description |
|---|---|---|
| job_id * | string | Job id returned by start_autotune_job. |
| job_token | any | Token returned with the job when payment enforcement is on. Omit it when the X-Job-Token header carries the same token. This poll is free and does not spend a credit. |
{
"name": "get_autotune_job",
"title": "Read an autotune job",
"description": "Read one autotune job started by ``start_autotune_job``.\n\n``status`` is ``running``, ``complete``, or ``failed``. On ``complete``,\n``result`` holds the Pareto-best weights, overshoot, settling time, RMSE,\nand solve time. Poll again while it is ``running``. When payment enforcement\nis on, pass the ``job_token`` from the start call or the ``X-Job-Token``\nheader. A failed job reports ``autotune_failed``.",
"inputSchema": {
"type": "object",
"required": [
"job_id"
],
"properties": {
"job_id": {
"type": "string",
"description": "Job id returned by start_autotune_job."
},
"job_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Token returned with the job when payment enforcement is on. Omit it when the X-Job-Token header carries the same token. This poll is free and does not spend a credit."
}
},
"additionalProperties": false
},
"outputSchema": {
"type": "object",
"additionalProperties": true
},
"annotations": {
"title": "Read an autotune job",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Tune valve weights for the three-layer root-zone irrigation template. Same payment as autotune_template: X-API-Key spends 2 autotune credits, and a missing key or an empty pack is HTTP 402 for x402. The default study is physics-v1. Pass study_version published to run the older scenario.
| Parameter | Type | Description |
|---|---|---|
| max_trials | integer | Optuna trials for the root-zone irrigation plant. Default 20. Values below 1 are raised to 1. Paid at $2.00: X-API-Key spends 2 autotune credits, or HTTP 402 is x402 Base USDC. Each call starts a new study. |
| study_version | any | Omit for physics-v1 (start [0.17, 0.22, 0.22], horizon 9). published keeps the older start-on-reference horizon 24 scenario. |
{
"name": "autotune_root_zone_irrigation",
"title": "Autotune root-zone irrigation",
"description": "Tune valve weights for the three-layer root-zone irrigation template.\n\nSame payment as autotune_template: X-API-Key spends 2 autotune credits, and\na missing key or an empty pack is HTTP 402 for x402. The default study is\nphysics-v1. Pass study_version published to run the older scenario.",
"inputSchema": {
"type": "object",
"properties": {
"max_trials": {
"type": "integer",
"default": 20,
"description": "Optuna trials for the root-zone irrigation plant. Default 20. Values below 1 are raised to 1. Paid at $2.00: X-API-Key spends 2 autotune credits, or HTTP 402 is x402 Base USDC. Each call starts a new study."
},
"study_version": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Omit for physics-v1 (start [0.17, 0.22, 0.22], horizon 9). published keeps the older start-on-reference horizon 24 scenario."
}
},
"additionalProperties": false
},
"outputSchema": {
"type": "object",
"additionalProperties": true
},
"annotations": {
"title": "Autotune root-zone irrigation",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": false,
"destructiveHint": false
}
}Tune charge power weights for the battery peak-shaving template. Same payment as autotune_template: X-API-Key spends 2 autotune credits, and a missing key or an empty pack is HTTP 402 for x402.
| Parameter | Type | Description |
|---|---|---|
| max_trials | integer | Optuna trials for the battery peak-shaving plant. Default 20. Values below 1 are raised to 1. Paid at $2.00: X-API-Key spends 2 autotune credits, or HTTP 402 is x402 Base USDC. Each call starts a new study. |
{
"name": "autotune_battery_peak_shaving",
"title": "Autotune battery peak shaving",
"description": "Tune charge power weights for the battery peak-shaving template.\n\nSame payment as autotune_template: X-API-Key spends 2 autotune credits, and\na missing key or an empty pack is HTTP 402 for x402.",
"inputSchema": {
"type": "object",
"properties": {
"max_trials": {
"type": "integer",
"default": 20,
"description": "Optuna trials for the battery peak-shaving plant. Default 20. Values below 1 are raised to 1. Paid at $2.00: X-API-Key spends 2 autotune credits, or HTTP 402 is x402 Base USDC. Each call starts a new study."
}
},
"additionalProperties": false
},
"outputSchema": {
"type": "object",
"additionalProperties": true
},
"annotations": {
"title": "Autotune battery peak shaving",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": false,
"destructiveHint": false
}
}Tune a linear plant and write a zero-heap C99 bundle. The reply's ``codegen`` object lists ``mpc_bundle.h`` and ``mpc_bundle.c`` plus ``usage_example_c`` and ``controller_kind``. A linear plant is a condensed QP (``linear_qp``). A nonlinear plant, including differential drive, is a linearized iteration (``linearized_rti``): Jacobians at the current state, then projected-gradient steps. That is not a full nonlinear SQP. Compile with ``gcc -O3 -std=c99 -Wall -Wextra -fPIC -shared -lm``. Each control step is ``mpc_compute_u0`` then, after the plant measurement, ``mpc_observer_update``. Neither function allocates on the heap. ``MPC_NX``, ``MPC_NU``, ``MPC_ND``, and ``MPC_HORIZON`` in the header are the array sizes. Same payment as autotune_template: X-API-Key spends 2 autotune credits, and a missing key or an empty pack is HTTP 402 for x402.
| Parameter | Type | Description |
|---|---|---|
| max_trials | integer | Optuna trials before the C99 bundle is written. Default 1. Values below 1 are raised to 1. Paid at $2.00: X-API-Key spends 2 autotune credits, or HTTP 402 is x402 Base USDC. Each call starts a new study and writes a new bundle. |
{
"name": "autotune_embedded_controller_with_c_codegen",
"title": "Autotune an embedded controller",
"description": "Tune a linear plant and write a zero-heap C99 bundle.\n\nThe reply's ``codegen`` object lists ``mpc_bundle.h`` and ``mpc_bundle.c``\nplus ``usage_example_c`` and ``controller_kind``. A linear plant is a\ncondensed QP (``linear_qp``). A nonlinear plant, including differential\ndrive, is a linearized iteration (``linearized_rti``): Jacobians\nat the current state, then projected-gradient steps. That is not a full\nnonlinear SQP. Compile with\n``gcc -O3 -std=c99 -Wall -Wextra -fPIC -shared -lm``. Each control step is\n``mpc_compute_u0`` then, after the plant measurement, ``mpc_observer_update``.\nNeither function allocates on the heap. ``MPC_NX``, ``MPC_NU``, ``MPC_ND``,\nand ``MPC_HORIZON`` in the header are the array sizes.\n\nSame payment as autotune_template: X-API-Key spends 2 autotune credits, and\na missing key or an empty pack is HTTP 402 for x402.",
"inputSchema": {
"type": "object",
"properties": {
"max_trials": {
"type": "integer",
"default": 1,
"description": "Optuna trials before the C99 bundle is written. Default 1. Values below 1 are raised to 1. Paid at $2.00: X-API-Key spends 2 autotune credits, or HTTP 402 is x402 Base USDC. Each call starts a new study and writes a new bundle."
}
},
"additionalProperties": false
},
"outputSchema": {
"type": "object",
"additionalProperties": true
},
"annotations": {
"title": "Autotune an embedded controller",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": false,
"destructiveHint": false
}
}Tune differential_drive, battery_peak_shaving, or root_zone_irrigation. This is POST /v1/templates/autotune at $2.00. The name is differential_drive, battery_peak_shaving, or root_zone_irrigation. The reply returns tuned Q, R, Rd, and Qf. Send name and max_trials. Send header X-API-Key when a $29 pack still has autotune credits. One call spends 2 of those credits. With no key, or when the credits are gone, the call is HTTP 402 and an agent pays with x402. The reply returns the tuned weights for that template. Payment uses the same gate as the HTTP route.
| Parameter | Type | Description |
|---|---|---|
| request * | object | Paid template tune at $2.00 for differential_drive, battery_peak_shaving, or root_zone_irrigation. Send X-API-Key (spends 2 autotune credits) or pay HTTP 402 with x402 on Base USDC. Validate a custom plant free first; these three names are built in. Each call starts a new study. |
{
"name": "autotune_template",
"title": "Autotune a template",
"description": "Tune differential_drive, battery_peak_shaving, or root_zone_irrigation.\n\nThis is POST /v1/templates/autotune at $2.00. The name is differential_drive,\nbattery_peak_shaving, or root_zone_irrigation. The reply returns tuned\nQ, R, Rd, and Qf. Send name and max_trials.\nSend header X-API-Key when a $29 pack still has autotune credits. One call\nspends 2 of those credits. With no key, or when the credits are gone, the\ncall is HTTP 402 and an agent pays with x402. The reply returns the tuned\nweights for that template. Payment uses the same gate as the HTTP route.",
"inputSchema": {
"type": "object",
"required": [
"request"
],
"properties": {
"request": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"enum": [
"root_zone_irrigation",
"battery_peak_shaving",
"differential_drive"
],
"type": "string",
"description": "Built-in plant: root_zone_irrigation, battery_peak_shaving, or differential_drive."
},
"max_trials": {
"type": "integer",
"default": 20,
"maximum": 30,
"minimum": 1,
"description": "Optuna trials for that plant. Default 20, must be >= 1 and <= 30."
},
"study_version": {
"anyOf": [
{
"enum": [
"published",
"physics-v1"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Irrigation only. Omit for physics-v1: start [0.17, 0.22, 0.22], comfort reference, horizon 9. published keeps the older start-on-reference horizon 24 scenario."
}
},
"description": "Paid template tune at $2.00 for differential_drive, battery_peak_shaving, or root_zone_irrigation. Send X-API-Key (spends 2 autotune credits) or pay HTTP 402 with x402 on Base USDC. Validate a custom plant free first; these three names are built in. Each call starts a new study.",
"additionalProperties": false
}
},
"additionalProperties": false
},
"outputSchema": {
"type": "object",
"additionalProperties": true
},
"annotations": {
"title": "Autotune a template",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": false,
"destructiveHint": false
}
}Names, descriptions and schemas were written by the server and are shown as data.
Pattern matches on what the server declares. They show what it says it can do, not what it does.
Too large to show here.