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., "@QuantPlay MCP ServerShow me my current positions in my 'Main' account"
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.
QuantPlay MCP Server
An MCP (Model Context Protocol) server for the QuantPlay trading API, providing access to account data, positions, and holdings through AI assistants.
Features
Account Management: Retrieve all broker accounts
Position Tracking: Get positions by account nickname
Holdings Analysis: Access holdings data by account nickname
MCP Integration: Works with Claude Desktop and other MCP-compatible clients
Installation
Install from PyPI:
Or install from source:
Setup
1. Get Your QuantPlay API Key
Visit QuantPlay and sign up for an account
Navigate to your API settings to generate an API key
Copy your API key for the next step
2. Environment Configuration
Create a .env file in your project directory:
3. MCP Client Configuration
For Claude Desktop
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
Example with conda/miniconda:
For Other MCP Clients
Run the server directly:
Or use Python module execution:
Available Tools
The MCP server provides three tools:
get_accounts()
Description: Get all broker accounts for the user
Parameters: None
Returns: List of account dictionaries with account details
get_positions(nickname: str)
Description: Get positions for a specific account
Parameters:
nickname: The account nickname to query
Returns: List of position dictionaries
get_holdings(nickname: str)
Description: Get holdings for a specific account
Parameters:
nickname: The account nickname to query
Returns: List of holdings dictionaries
Usage Examples
Once configured, you can use these tools through your MCP client:
Development
Requirements
Python 3.11+
QuantPlay API key
Local Development
Clone the repository
Install dependencies:
pip install -r requirements.txtSet up your
.envfile with your API keyRun the server:
python -m quantplay_mcp
Version
Current version: 0.1.21
Support
For issues and questions:
Check the Issues page
Visit QuantPlay Documentation for API details