Skip to main content

sequenx-mcp (SequenxAI MCP server)

MCP server that exposes the SequenxAI public API as tools for AI hosts (Claude Desktop, Cursor, …). It is a thin adapter: every tool maps one-to-one onto an existing operation and calls the Python SDK — there is no second HTTP client and no business logic here (see docs/plans/phase_3/06-MCP服务器与宿主Agent工具面.md).

Not published on PyPI yet; it lives in this repository.

Install

The server depends on the sibling SDK, which is not on PyPI either — install it from this repository first:

pip install -e packages/sequenx-py
pip install -e packages/sequenx-mcp

Run

The server speaks stdio, the transport a local MCP host starts as a child process:

SEQUENX_API_KEY=sqx_live_... python -m sequenx_mcp
Variable Meaning
SEQUENX_API_KEY The sqx_live_* key the tools call with (required).
SEQUENX_API_BASE_URL Base URL override; default https://api.sequenxai.com/v1.

Host configuration (any MCP host that starts stdio servers):

{
  "mcpServers": {
    "sequenx": {
      "command": "python",
      "args": ["-m", "sequenx_mcp"],
      "env": { "SEQUENX_API_KEY": "sqx_live_..." }
    }
  }
}

Tools

Tool Endpoint What it does
list_models GET /v1/models The public model catalog for the key: ids, the default model, per-model context / horizon limits and capabilities.
clean_data POST /v1/clean The free cleaning dry-run: cleaning report and effective policy. No inference, no billing. Takes series, options, freq, model and clean_series.
forecast POST /v1/forecast Synchronous forecast over inline rows: points and intervals, data-quality report, billed usage. Takes series, h, model, freq, level and options.

Input rows are the contract's long table: unique_id, ds, y.

Limits. forecast takes inline rows only — the public API has no dataset upload, so the tool is for small-to-medium series. The model reads only the most recent points of a series: a longer history is truncated by the API and reported (model_input[].truncated plus a context_truncated warning), and list_models gives each model's context window. The server adds no limit of its own. For larger data use the REST or SDK batch path: POST /v1/forecast/batch, then poll GET /v1/forecast/batch/{job_id}.

Errors. A tool error carries the contract's error body ({"error": {code, message, request_id, category, retryable, details?}}), so the host agent sees a structured error instead of a silent empty answer. The MCP framework prefixes the message with its own text, so the envelope travels inside the error text. 403 is not retried; 429 carries retry_after and limit_type (rpm / daily) in details.

Three codes are the SDK's own, because the contract's code list covers server-side failures only: HTTP_<status> (a response without a code), REQUEST_FAILED (a response body the SDK could not read) and TRANSPORT_ERROR (the request never reached the server).

Development

pip install -e packages/sequenx-py
pip install -e packages/sequenx-mcp -r packages/sequenx-mcp/requirements-dev.txt
cd packages/sequenx-mcp
python -m pytest -q
python -m ruff check src tests

Gitee Go runs the suite via scripts/ci/gitee-verify.sh mcp.

Use a separate virtualenv for this package: mcp 2.x installs httpx2, and a control-plane environment that has httpx2 next to httpx breaks Starlette's test client (services/api needs httpx 1.x).

Metadata

Release files for sequenx-mcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sequenx-mcp 0.1.0
File Size Uploaded Provenance Actions
sequenx_mcp-0.1.0.tar.gz 12.7 kB Without provenance Details for sequenx_mcp-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sequenx-mcp 0.1.0
File Interpreter ABI Platform Actions
sequenx_mcp-0.1.0-py3-none-any.whl Python 3 none any Details for sequenx_mcp-0.1.0-py3-none-any.whl

Total release size: 21.2 kB

Release files / sequenx_mcp-0.1.0.tar.gz

Download URL sequenx_mcp-0.1.0.tar.gz
Size 12.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4e21301f877c3403cd3967b5a6910915722781861e428ad1ff126866ba3d92f5
BLAKE2b-256 checksum
How to use checksums
c3c1685b86e3e1ccb95f73782830598a15c06785d190785c9d203af7b5b85377
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / sequenx_mcp-0.1.0-py3-none-any.whl

Download URL sequenx_mcp-0.1.0-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a16bad32890808e48440e461bbbbe58fc5bc4fdf1a5c64cb77f1005787e8790c
BLAKE2b-256 checksum
How to use checksums
771e566e81620442ab3cf78a3b577f62b22f52d952584902968a7c674deaf625
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Security for sequenx-mcp 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page