TSFM.ai developer documentation.
Multiple pages, one contract. API, MCP, and CLI are aligned on the same schema so teams can move from manual calls to production automation with zero drift.
MCP
Connect your AI to TSFM.ai
Give ChatGPT, Claude, Cursor, or any MCP-compatible client direct access to time-series forecasting. Point your client at the endpoint below and it can browse models, run forecasts, detect anomalies, and more — no code required. Authentication is handled via OAuth 2.1, so most clients will prompt you to sign in automatically.
Endpoint
https://api.tsfm.ai/mcpTransport is Streamable HTTP — stateless, no sessions, works behind any edge proxy. Your client sends POST requests to this URL.
Authentication
The server supports OAuth 2.1 with PKCE per the MCP specification. When your client first connects, it discovers the authorization server automatically and prompts you to sign in through your browser. Once authenticated, all tool calls use your account.
- Model browsing and health checks work without authentication.
- Forecast, anomaly detection, and other inference tools require a signed-in account.
- Tokens are short-lived and scoped to MCP tool access only.
Setup
Pick your client and paste the config. No local server or install required.
Open Settings → Apps & Connectors → Advanced Settings, enable Developer Mode, and add to your config. Requires a Pro, Team, Enterprise, or Edu plan.
[mcp_servers.tsfm]
url = "https://api.tsfm.ai/mcp"Available tools
Your AI discovers these automatically. Authenticated operations require signing in via the OAuth prompt — no manual API key setup needed.
forecastRun a time-series forecast against any supported model.forecastBatchRun up to 64 forecast jobs in a single request.detectAnomaliesFlag anomalous observations in a series.classifySeriesClassify a time series into categories.imputeSeriesFill missing values using model-based interpolation.backtestSeriesEvaluate forecast accuracy on historical data.evaluateSeriesCompute accuracy metrics for a series.crossValidateRun cross-validation across rolling windows.ingestSeriesSourceNormalize series data from a URL or inline payload.listModelsBrowse the model catalog with filters.getModelByIdGet full details for a specific model.validateCredentialCheck whether your API key or token is valid.list_api_operationsDiscover all available tools and their parameters.Programmatic access
Building your own MCP client? Use the TypeScript SDK to connect directly.
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
const client = new Client({ name: "my-app", version: "1.0.0" });
const transport = new StreamableHTTPClientTransport(new URL("https://api.tsfm.ai/mcp"));
await client.connect(transport);
const result = await client.callTool({
name: "forecast",
arguments: {
base_url: "https://api.tsfm.ai",
api_key: process.env.TSFM_API_KEY,
body: {
model: "amazon/chronos-t5-large",
inputs: [{ item_id: "series_1", target: [1, 2, 3, 4, 5, 6] }],
parameters: { prediction_length: 6, freq: "D" }
}
}
});const ops = await client.callTool({
name: "list_api_operations",
arguments: { include_schema_path: true }
});
console.log(ops.structuredContent.operations.map((op) => op.operationId));