stonex-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@stonex-mcpWhat are my current account balances?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
stonex-mcp
Typed TypeScript client for the StoneX Client (torchapi) REST API, plus an MCP server that exposes those endpoints as tools.
Auth is not automated (no Okta/MFA in this project). You log into StoneX Client in a browser, export a cookies.txt file, and pass the path to that file on the CLI.
Requirements
Bun 1.1+ (for local development /
preparebuild)Node.js 18+ (to run the published
binbundle)
Related MCP server: claude-tws-connect
Install
bun installAuth: cookies.txt
Install a browser extension that exports Netscape
cookies.txt(e.g. Get cookies.txt LOCALLY).Log into https://client.stonex.com/client/.
Export cookies for
client.stonex.comto a file (e.g.client.stonex.com_cookies.txt).Pass that path to the server:
stonex-mcp --cookies /path/to/client.stonex.com_cookies.txtThe server reads session cookies from that file and calls GET https://client.stonex.com/client/token only when it needs a Bearer JWT.
Token cache
Derived access tokens are cached on disk so repeated MCP tool calls do not mint a new token every time:
OS | Path |
Windows |
|
macOS |
|
Linux |
|
When the cached JWT is missing or near expiry, a new token is requested using the cookies file and written back to the cache. If refresh starts failing with 401, re-export cookies after logging into StoneX Client again.
Treat the cookies file and cached token like passwords. Do not commit them.
Run the MCP server
bun start -- --cookies /path/to/client.stonex.com_cookies.txt
# or after build:
node dist/stonex-mcp.js --cookies /path/to/client.stonex.com_cookies.txtCursor / Claude Desktop config
{
"mcpServers": {
"stonex": {
"command": "npx",
"args": [
"-y",
"stonex-mcp",
"--cookies",
"C:/Users/YOU/Downloads/client.stonex.com_cookies.txt"
]
}
}
}npx runs the built Node bundle (dist/stonex-mcp.js, produced by bun run build / prepare). Local equivalent: "command": "bun", "args": ["run", "/path/to/stonex-mcp/src/cli.ts", "--cookies", "/path/to/cookies.txt"].
Typed client
import { StoneXClient } from "./src/client/index.ts";
import { sessionCookieFromCookiesTxtFile } from "./src/auth/cookiesTxt.ts";
import { resolveAuth } from "./src/auth/resolveAuth.ts";
import { writeTokenCache } from "./src/auth/tokenCache.ts";
const { accessToken, sessionCookie } = await resolveAuth(
"/path/to/client.stonex.com_cookies.txt",
);
const client = new StoneXClient({
accessToken,
sessionCookie,
onAccessToken: (token) => writeTokenCache(token),
});
const accounts = await client.getAccounts();
const summary = await client.getAccountSummary({
accountNumber: accounts[0]!.acctNo,
});Or build a cookie header yourself with sessionCookieFromCookiesTxtFile(...).
Endpoints mirror the StoneX Client SPA (https://vulcan.stonex.com/torchapi): accounts, balances, summary, positions, activity, performance, projected income, documents, and related user/account metadata.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseDqualityDmaintenanceMCP server that exposes Alpaca Market Data & Broker API as tools, enabling access to financial data like stock bars, assets, market days, and news through the Message Control Protocol.Last updated4312ISC
- Alicense-qualityDmaintenanceAn MCP server that enables interaction with Interactive Brokers TWS/Gateway via natural language for portfolio management and market data retrieval. It provides tools for account summaries, historical data, and a secure two-step confirmation process for placing and canceling orders.Last updated6MIT
- Flicense-qualityDmaintenanceMCP server exposing Tradier brokerage tools to Claude, enabling account balance checks, position management, order operations, and market data queries.Last updated
- Alicense-qualityCmaintenanceFastMCP server exposing brokerage and market tools (Angel One, Coinbase, News) via the Model Context Protocol, enabling portfolio queries and trade execution through natural language.Last updated1MIT
Related MCP Connectors
MCP server exposing the Backtest360 engine API as tools for AI agents.
Real SEC, 13F, insider, congress & macro data your AI agent can cite. Hosted MCP, 24 tools.
MCP server for Gainium — manage trading bots, deals, and balances via AI assistants
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/anaisbetts/stonex-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server