Symphony XTS MCP Agent
README.md
# Symphony XTS MCP Agent
**Read-only Symphony XTS tools for your AI client, with a local trend chart.**
Developed by **Sreenivasulu Malkari**. Independent community software; not an official
Symphony Fintech or broker product. Each user supplies their own broker endpoints,
API entitlement and valid sessions. No KuberaOS, Jainam server, Redis or Kafka is needed.
| Ask your MCP client | What the agent does |
| --- | --- |
| “Check my XTS configuration” | Offline flags, without returning credentials |
| “Show holdings and current positions” | Reads the configured account |
| “Find the current NIFTY futures contract” | Searches broker reference data |
| “Get depth for this segment/instrument” | Reads a quote/depth snapshot |
| “Review this 5-minute trend” | Reads candles, calculates ADX/DMI, RSI, Supertrend, EMA/SMA and candle VWAP |
There are **no order placement, modification, cancellation, conversion, square-off,
login/logout or generic HTTP tools**. This package cannot execute a strategy.
MCP tools return data; chart rendering in an AI client depends on that client.
A separate local browser chart is included.
## Install the preview release
Python 3.11–3.13 and Git are the CI targets; see the Actions page for actual results.
Use a dedicated environment; do not install into your broker's existing production environment.
```sh
git clone --branch v0.1.0 https://github.com/malkarisreenivasulu/symphony-xts-mcp-agent.git
cd symphony-xts-mcp-agent
python3 -m venv .venv
# macOS / Linux:
source .venv/bin/activate
# Windows PowerShell instead: .venv\Scripts\Activate.ps1
python -m pip install .
python -m symphony_xts_mcp configure
python -m symphony_xts_mcp doctor
```
On Windows use `py -3` or your installed Python executable in place of `python3`.
Tagged wheels and source distributions are on [GitHub Releases](https://github.com/malkarisreenivasulu/symphony-xts-mcp-agent/releases).
This release is not published to PyPI; a bare `pip install symphony-xts-mcp-agent`
is not the documented installation method.
`configure` asks for your full HTTPS Marketdata and/or Interactive base URLs and
**existing session tokens**. Tokens and optional client ID use hidden terminal
prompts and are saved outside the repository. Marketdata-only use does not need an
Interactive session. An app key/secret is **not** a session token: obtain a session
through your broker's approved flow or SDK. Session renewal stays with the user or
their existing publisher; no automatic login or token rotation occurs here.
Endpoint examples use placeholders, not a working shared account:
- `https://YOUR-BROKER-HOST/apibinarymarketdata` or `/apimarketdata`
- `https://YOUR-BROKER-HOST/interactive` or `/1interactive`
Enter the exact base supplied by your broker. The default is deliberately empty.
Trimmed/OAuth interactive variants may require a broker-issued session and different
endpoint prefix. This release does not implement those authentication flows.
## Connect a client
```sh
python -m symphony_xts_mcp client-config claude
python -m symphony_xts_mcp client-config vscode
```
These commands output local launch JSON using the correct Python executable and
configuration path, **without tokens**. Merge the Claude `mcpServers` entry into
your client's configuration, or the VS Code `servers` entry into `.vscode/mcp.json`.
Restart/reconnect the client and ask it to call `xts_status` first. Do not paste your
private credential file into client configuration or chat.
For an MCP client supporting local Streamable HTTP:
```sh
python -m symphony_xts_mcp serve --transport streamable-http --port 8768
```
Endpoint: `http://127.0.0.1:8768/mcp`. Default MCP transport is stdio.
Clients requiring a public HTTPS/OAuth connector cannot use this loopback URL
as-is. Public hosting and client-specific remote authentication are outside this
preview; do not publicly expose your personal broker session.
## Open the local chart
```sh
python -m symphony_xts_mcp chart
```
Open **http://127.0.0.1:8767/charts**. Resolve a current instrument with the MCP search
tool, enter its segment/ID and load candles. The example ID is not a recommendation.
No broker call runs until you load an instrument.
The chart includes candlesticks, drawings, EMA 20/50, RSI 14, Wilder ADX/DMI 14,
Wilder-ATR Supertrend 10/3 and candle-based session VWAP. The optional library picker
provides extra visual studies. The default studies and trend panel use the same
backend calculations. More details: [study rules](docs/TREND_AND_CHARTS.md).
**Auto refresh is REST polling, not Socket.IO streaming or exchange TBT:** one quote
request every 5 seconds and candle refresh every 30 seconds while the tab is visible.
Only completed candles enter the trend analysis. The latest quote is a separate
snapshot; forming candles are not fabricated from sampled prices. Rate-limit errors
stop auto refresh. Broker timestamps are retained raw; receipt time does not prove
exchange freshness. Close the process with Ctrl+C.
## Compatibility and privacy
- Uses documented XTS JSON envelopes and pipe-delimited `dataReponse` OHLCV history.
Supports both object and single-element array success envelopes; quote strings
are decoded. Different broker payloads may need adapters.
- Configurable base URLs are not proof of compatibility with every XTS deployment.
Check your broker version, entitlement, price units, timestamp convention and
`DayWise`/`NetWise` parameter expectations before relying on results.
- Maximum 50 instruments per quote call, 31 calendar days / 10,000 candles per
history call and 8 MB broker response. No automatic retry, backfill or subscription.
Broker limits may be lower. Expired contracts/history may be unavailable.
- Account data requested over MCP goes to your selected AI provider. Common secrets
and identifiers are redacted, but the remaining financial data is private.
- No live Socket.IO/binary decoding, multicast, exact tick/trade completeness,
profit guarantee, persistent alerts or order execution is claimed.
[Getting started](docs/GETTING_STARTED.md) · [Tools](docs/TOOLS.md) ·
[Charts and rules](docs/TREND_AND_CHARTS.md) · [Validation](docs/VALIDATION.md) ·
[Troubleshooting](docs/TROUBLESHOOTING.md) · [Security](SECURITY.md)
## Development
```sh
python -m pip install -e '.[dev]'
python -m pytest -q
python -m ruff check .
python scripts/scan_secrets.py
python -m build
python scripts/smoke_install.py dist/symphony_xts_mcp_agent-0.1.0-py3-none-any.whl
```
MIT licensed. Bundled OpenAlgo Charts 2.7.5 is Apache-2.0, with upstream LICENSE and
NOTICE retained. Its trade tier is not bundled and no order callback is installed.
Primary API references: [Symphony Marketdata](https://developers.symphonyfintech.in/doc/apimarketdata/),
[Interactive](https://developers.symphonyfintech.in/doc/interactive/),
[official SDK](https://github.com/symphonyfintech/xts-pythonclient-api-sdk).
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues