RHTHS Trading Gateway
kingwa5/THS_MCP_Quant
MCP and CLI gateway that lets Hermes Agent query and order through the Tonghuashun PC trading client
RHTHS Trading Gateway is a local gateway that connects Hermes Agent, OpenClaw and other MCP clients to the Tonghuashun PC trading client for account queries and orders. It also ships a CLI for quant scripts.
What RHTHS Trading Gateway does
RHTHS calls the ths_api built into the Tonghuashun strategy environment from inside the client process, then forwards requests through a local gateway on port 19312 to MCP clients and a CLI. The README contrasts this with window-automation approaches that simulate clicks and read the screen, and says funds, positions and orders match what the client shows.
Configured as the rhths-trade MCP server in Hermes Agent or OpenClaw, it exposes tools such as rh_trade_account, rh_trade_positions, rh_trade_orders_today and rh_trade_buy, plus market queries. Orders default to simulation (dry run), and switching to live trading needs an explicit confirmation. It targets the free PC client, the Financial Master and Yuanhang editions, broker-branded versions and the standalone order program xiadan. The README says no external API authorization is required.
Key features
- MCP server named rhths-trade for Hermes Agent, OpenClaw and Cursor
- Account, position and same-day order queries
- Simulated orders by default, live mode needs confirmation
- CLI for quant scripts that shares the same trading semantics
- Works with several Tonghuashun PC client editions
- Machine-readable MCP config template and tool list
When to use it
- Asking Hermes Agent for your current funds and positions in plain language
- Dry-running a stock order before deciding to trade
- Running scheduled quant scripts through the CLI
Who it is for: Tonghuashun PC users who want an AI agent or script to read their account and place orders.
How it fits with Hermes Agent
The README names Hermes Agent, together with OpenClaw, as a preferred MCP client and shows the conversation flow from Hermes through MCP to the gateway.
Requirements: A Tonghuashun PC client or xiadan order program you can log in to and trade with; the installer package includes rhths-gui.exe, rhths.exe and rhths-mcp.exe
Note: The README is in Chinese, says the standard edition caps live trades per day, and states that trading risk rests with the user.
FAQ
What is RHTHS Trading Gateway?
It is a local gateway that exposes the Tonghuashun PC client's built-in ths_api to AI agents over MCP and to scripts through a CLI.
Does RHTHS Trading Gateway work with Hermes Agent?
Yes. The README lists Hermes Agent as a preferred client; you merge the rhths-trade MCP entry into its configuration, using either a local command or a remote URL.
What do I need to run RHTHS Trading Gateway?
You need a Tonghuashun PC client or the standalone xiadan order program on which you can already log in and trade. You install the RHTHS package, deploy its hook from the GUI, then start the client and check rhths health.
Similar mcp & tools for Hermes Agent
All mcp & toolsMCP server and browser editor for building Ren'Py visual novels with Claude Code, Cursor or hermes-agent
ExpeditedProjects HutchDBSchema-free MCP database that lets Claude Code, Codex, Hermes and other agents share records
chushixixin dsh-harness-mcp-serverMCP server that lets Hermes drive DeepSeek Harness agents to run real coding tasks
ksimback hermes-atlas-mcpMCP server that searches the Hermes Atlas catalog of 100+ Hermes Agent tools, skills and plugins
pranrichh Spectre MCPMCP server with 104 tools for X/Twitter automation, usable from Hermes Agent and other MCP clients
JorG18 AgentCrawlSelf-hosted web scraper that turns pages into Markdown for AI agents via CLI, API or MCP
Related guides: What is Hermes Agent? · How to run Hermes Agent securely