home / mcp / quantplay mcp server
Provides access to QuantPlay accounts, positions, and holdings via MCP clients.
Configuration
View docs{
"mcpServers": {
"quantplay-quantplay-mcp": {
"command": "python",
"args": [
"-m",
"quantplay_mcp"
],
"env": {
"QUANTPLAY_API_KEY": "your_api_key_here"
}
}
}
}You will run a Python-based MCP server that exposes your QuantPlay trading data—accounts, positions, and holdings—through an MCP client. This server lets you query any of your trading data from Claude Desktop or other MCP-compatible assistants, enabling hands-free access and automation.
After you configure the MCP client to talk to the QuantPlay MCP server, you can ask your assistant to retrieve your accounts, positions, or holdings. The server provides three tools you can invoke from your MCP client: get_accounts(), get_positions(nickname), and get_holdings(nickname). Use them to build conversational flows such as: - List all trading accounts you hold - Check the current positions in a specific account - Review holdings in a chosen account to assess exposure and diversification.
Prerequisites: Python 3.11+ and a QuantPlay API key. You will install the MCP server package, configure your API key, and run the server so your MCP client can connect.
Step-by-step commands to install and run the server locally.
# Install from PyPI
pip install quantplay-mcp
# Or install from source
git clone https://github.com/your-username/quantplay-mcp.git
cd quantplay-mcp
pip install -e .1) Create your API key in your QuantPlay account settings, then store it in a safe location as QUANTPLAY_API_KEY.
2) Create a local environment file named .env in your project directory and set your key: QUANTPLAY_API_KEY=your_api_key_here.
3) Configure your MCP client to connect to the server. You have two practical options: a) run the server as a stdio process with Python, or b) run the server as a module command.
{
"mcpServers": {
"Quantplay": {
"command": "python",
"args": [
"-m",
"quantplay_mcp"
],
"env": {
"QUANTPLAY_API_KEY": "your_api_key_here"
}
}
}
}Keep your API key secure. Do not commit it to version control or share it. Use a dedicated environment file or secret manager when possible. Restrict permissions for the MCP client to only what you need.
If the server does not start, verify your Python version, ensure the API key is set, and check that the environment file is loaded by your process. If you see authentication errors, re-check the API key in your QuantPlay account settings.
For Claude Desktop or other MCP clients, you typically configure the server either by running the Python module directly or by pointing the MCP client to the Python path of your module. Ensure the QUANTPLAY_API_KEY is available to the running process.
Retrieve all broker accounts accessible with your QuantPlay credentials.
Fetch positions for a specific account identified by nickname.
Fetch holdings for a specific account identified by nickname.