MCP Server

Amazon Q

Introduction

Amazon Q is an AI coding assistant that can connect various Large Language Models (LLM) to the QuantConnect MCP Server. This page explains how to set up and use the server with Amazon Q in Local Platform. To set up Amazon Q with the other IDEs or the CLI, see Get started with Amazon Q Developer in the Amazon Q documentation.

Getting Started

To connect Amazon Q in Local Platform to the QC MCP Server, follow these steps:

  1. Install and open Docker Desktop.
  2. In a terminal, pull the QC MCP Server from Docker Hub.
  3. $ docker pull quantconnect/mcp-server

    If you have an ARM chip, add the --platform linux/arm64 option.

  4. Install and open Local Platform.
  5. Install the Amazon Q extension.
  6. In the left navigation menu of Local Platform, right-click the VS Code Amazon Q icon Amazon Q icon and then click Move To > Secondary Side Bar.
  7. This layout enables you to view the QuantConnect Project panel and the Amazon Q panel at the same time.

    Local Platform where the QuantConnect panel and Amazon Q panel are both open at the same time.
  8. Edit the ~ / .aws / amazonq / mcp.json file on your machine to include the following QuantConnect configuration:
  9. {
      "mcpServers": {
        "quantconnect": {
          "command": "docker",
          "args": [
            "run",
            "-i",
            "--rm",
            "-e", "QUANTCONNECT_USER_ID",
            "-e", "QUANTCONNECT_API_TOKEN",
            "-e", "AGENT_NAME",
            "--platform", "<your_platform>",
            "quantconnect/mcp-server"
          ],
          "env": {
            "QUANTCONNECT_USER_ID": "<your_user_id>",
            "QUANTCONNECT_API_TOKEN": "<your_api_token>",
            "AGENT_NAME": "MCP Server"
          }
        }
      }
    }

    To get your user Id and API token, see Request API Token.

    Our MCP server is multi-platform capable. The options are linux/amd64 for Intel/AMD chips and linux/arm64 for ARM chips (for example, Apple's M-series chips).

    If you simultaneously run multiple agents, set a unique value for the AGENT_NAME environment variable for each agent to keep record of the request source.

  10. Restart Local Platform.

To keep the Docker image up-to-date, in a terminal, pull the latest MCP server from Docker Hub.

$ docker pull quantconnect/mcp-server

If you have an ARM chip, add the --platform linux/arm64 option.

Models

Amazon Q supports several versions of the Claude LLM that you can use in the Amazon Q panel. To change the model, click the model name at the bottom of the Amazon Q panel and then click the name of the model to use.

Arrow clicking the model name in the Amazon Q panel of VS Code, showing the list of available models.

To view all the available models for Amazon Q, see Selecting a model for Amazon Q chat in IDEs in the Amazon Q documentation.

Quotas

There are no quotas on the QuantConnect API, but Amazon Q and the LLMs have some. To view the quotas, see the Pricing page in the Amazon Q documentation and Does Claude have any message limits? on the Anthropic website.

Troubleshooting

The following sections explain some issues you may encounter and how to resolve them.

Connection Error Code -32000

The docker run ... command in the configuration file also accepts a --name option, which sets the name of the Docker container when the MCP Server starts running. If your computer tries to start up two MCP Server containers with the same name, this -32000 error occurs. To avoid the error, remove the --name option and its value from the configuration file. For an example of a working configuration file, see Getting Started.

Service Outages

The MCP server relies on the QuantConnect API and the client application. To check the status of the QuantConnect API, see our Status page. To check the status of Claude, see the Anthropic Status page.

Other Issues

For more information about troubleshooting the MCP server in Local Platform, see Troubleshooting your MCP configuration in the Amazon Q documentation.

Examples

The following examples demonstrate the MCP server with Amazon Q.

Example 1: Hello World

To test the server and client are working and connected, enter the following prompt into the Amazon Q chat:

> Read my QuantConnect account.

The agent should call the read_account tool.

Example 2: Strategy Development and Deployment

This example uses Amazon Q in Local Platform to brainstorm new strategy ideas, edit files, run backtests, and deploy to paper trading.

You can also see our Videos. You can also get in touch with us via Discord.

Did you find this page helpful?

Contribute to the documentation: