Skip to main content

SQXtreme — StrategyQuant X MCP control layer

Self-contained MCP for StrategyQuant X: Windows-first DX, Spanish localization, multi-client configs, and the 482-tool engine vendored in-tree (MIT, see THIRD_PARTY_NOTICES.md) — zero upstream dependency. PyPI publish infra for AI agents (opencode, Claude Code, Cursor, VS Code).

Repo: https://github.com/herjarsa/sqxtreme-mcp

What ships in v0.5.0

sq_mcp engine vendored in src/sq_mcp/ (origin: DAVIDAROCA27/sqx-mcp, MIT): 482 runtime tools with 14-gap stability hardening (timeouts, Windows quoting, ready-poll, databank sync, GUI-only taxonomy). SQXtreme adds (Spanish prompts, headless launcher, minimal mode, dual-port banner, MT5 ship):

  1. Windows installer — iwr install.ps1 | iex (4 modos: CheckOnly/PyPI/FromSource/FromGit)
  2. Spanish localization — 5 workflow prompts + 4 sub-agentes (prompts/es/) — es/
  3. Multi-client configs — Claude Code, opencode, Cursor, VS Code (examples/)
  4. HTTP transport — SQXTREME_TRANSPORT=http → streamable-http en :8765 (vs nativo :8082)
  5. 12 features 3 fases — AlgoWizard auto-import, Builder desde frase, Live Watch, Streaming, Data auto-fix, Auto-curator, Ship MT5, Snapshot rollback, Ashare 119, Scheduled Runner, sqx-tools wrapper, Health Dashboard
  6. CI matrix — Ubuntu + Windows × Python 3.10/3.11/3.12 — ruff + pytest
  7. PyPI OIDC — Trusted Publishing sin token manual (publish.yml)
  8. E2E test suite — tests/e2e/ corre contra server vivo en :8765 (22 tests)
  9. 26 audit fixes — seguridad hardened (2026-08-30)

Roadmap (post v0.5.0)

Live trading bridge refinements · Multi-workspace orchestrator · Research Agent Loop (moonshot E1).

Install

# One-liner (after PyPI publish)
iwr https://raw.githubusercontent.com/herjarsa/sqxtreme-mcp/main/install.ps1 -UseBasicParsing | iex

# Or from source
git clone https://github.com/herjarsa/sqxtreme-mcp.git
cd sqxtreme-mcp
.\scripts\install.ps1 -FromSource

Native tools (always available, including minimal mode)

These 3 tools are registered directly in server.py (always available, graceful-degradation if sq-mcp missing):

sq_algowizard_import

Import a Java AlgoWizard snippet into the SQ X user/extend/<Type>/ directory.

{
  "src_path": "C:\\path\\to\\MyInd.java",
  "target_type": "indicators"  // optional; inferred from package SQ.<Type> if omitted
}

Returns: {ok, dest_path, snippet_name, snippet_type, warnings} or {ok:false, error, error_type} on validation failure.

Required in .java file: package SQ.<Indicators|Signals|Conditions|...>;.

sq_builder_from_phrase

Parse a Spanish trading phrase and prepare a Builder plan (dry_run by default).

{
  "phrase": "Builder para GBPUSD H1 2023.01.01 mean reversion max 5 condiciones",
  "dry_run": true   // default; if false, would patch project.cfx via cfx_clone + cfx_apply_patch
}

Returns: {ok, dry_run, parsed: {symbol, timeframe, date_from, date_to, max_conditions, strategy_type, raw}, warnings, next_steps}.

sq_live_watch

Compute live position summary metrics from a list of position dicts.

{
  "positions": [
    {"price": 50.0, "volume": 100, "side": "long"},
    {"price": 100.0, "volume": 50, "side": "short"}
  ]
}

Returns: {net_exposure, gross, pnl_total, n_long, n_short, warnings}. Validates: price must be finite numeric; volume > 0; side ∈ {"long","short"}.

Engine tools (vendored sq_mcp, 482+ tools, always installed)

The server registers all vendored sq_mcp tool groups (pkgutil.iter_modules + import_module + register(mcp)). Key examples:

Tool Purpose
workspace_overview Count projects, databanks, .sqx files; mtime of last edits
workspace_doctor Health check: engine + license + databanks + recent errors
cfx_inspect Read .cfx: task count, ranking types, MM methods
cfx_archetype Classify .cfx by task types (Builder, Retester, Optimizer, WalkForward, MonteCarlo)
cfx_apply_patch Patch symbol/timeframe/dateFrom/dateTo across all task XMLs
cfx_lint Validate .cfx structure
builder_start / builder_stop / builder_watch_progress Launch and monitor a Builder run
retest_strategy Retest a single strategy against OOS window
workspace_insights Top 10 strategies by profit_to_dd, symbol/timeframe distribution
data_health_freshness_gate Pre-trade check: data must be <max_age_minutes old (requires last_bar_epoch + now_epoch)
health_check Engine status, license days remaining, fatal errors

For full list: run server and call MCP tools/list (485+ entries).

Spanish prompts (9)

Prompt Purpose
sqxtreme-morning Diagnóstico matutino: engine health + workspace + top strategies + alerts
sqxtreme-build-and-retest Builder desde frase → clonar template → parchear → lintear → start
sqxtreme-promote Evaluar strategy contra gates de riesgo (conservative/balanced/aggressive)
sqxtreme-post-mortem Diagnosticar job fallido + sugerir acciones
sqxtreme-portfolio-rebalance Recomputar pesos + proponer rotación
agente-constructor Sub-agent enfocado en fase de construcción
agente-promotor Sub-agent enfocado en gates de promoción
agente-diagnostico Sub-agent enfocado en diagnosticar fallos
agente-cartera Sub-agent enfocado en portfolio y rebalanceo

What this gets you (honest scope)

Running an AI agent with SQXtreme: 9 Spanish MCP prompts + 482 vendored engine tools + 3 native tools + cross-client install + audit security fixes + E2E tests against live server. No extras needed ([full] is a no-op alias since 0.8.1).

NOT included in v0.5.0: a live AI agent actually connected (manual client setup per docs/CLIENTS.md), E2E test with real SQ X engine (file-based tools work, engine-dependent tools require live engine).

Security

  • E2E-tested edge cases: phrase injection ('; DROP TABLE), NaN/Inf prices, empty inputs, traversal attempts
  • sqxtreme-mcp delegates to upstream sq-mcp which has XXE defense + atomic writes + NaN validation
  • 26 audit fixes from v0.4.3 release (security hardened)
  • See CHANGELOG.md for full security fix list

License

MIT.

Release files for sqxtreme-mcp 0.8.2

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

Source distribution (sdist)

Source distribution for sqxtreme-mcp 0.8.2
File Size Uploaded
sqxtreme_mcp-0.8.2.tar.gz 603.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sqxtreme-mcp 0.8.2
File Interpreter ABI Platform
sqxtreme_mcp-0.8.2-py3-none-any.whl Python 3 none any Details

Total release size: 1.1 MB

Release files / sqxtreme_mcp-0.8.2.tar.gz

Download URL sqxtreme_mcp-0.8.2.tar.gz
Size 603.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3c21e339d7b207829326bda6cadfd06288704f6a0aaf5b622f3f328adf80ed70
BLAKE2b-256 checksum
How to use checksums
febad25991dffce2dc5062822814c813e93b8ba668cea66fcd241c72c0d4ee94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.

Transparency log

Release files / sqxtreme_mcp-0.8.2-py3-none-any.whl

Download URL sqxtreme_mcp-0.8.2-py3-none-any.whl
Size 496.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b5392f94b280edca6ceef2ab7302379bb7588357a841d5a6b0e27ced841a545a
BLAKE2b-256 checksum
How to use checksums
167dae519c32aafe5af5642a8cd8ac4806d97fc4500cbd444a4cf4c12c41efab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.8.2 This release

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

1 release file

0.1.0

2 release files

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