Back to MCP Servers

QuantConnect Server

A Dockerized Python MCP server that bridges your local AI (e.g., Claude Desktop, etc) with the QuantConnect API—empowering you to create projects, backtest strategies, manage collaborators, and deploy live-trading workflows directly via natural-language prompts.

finance-fintechpythondockerapiai
By QuantConnect
7831Updated 1 month agoPythonApache-2.0

Installation

npx -y mcp-server

Configuration

{
  "mcpServers": {
    "mcp-server": {
      "command": "npx",
      "args": ["-y", "mcp-server"]
    }
  }
}

How to use

  1. Run the installation command above (if needed)
  2. Open your Claude Code settings file (~/.claude/settings.json)
  3. Add the configuration to the mcpServers section
  4. Restart Claude Code to apply changes

This repository is deprecated for now - the preferred way to use our MCP is through the one embedded in VSCode.

See https://www.quantconnect.com/docs/v2/ai-assistance/mcp-server/key-concepts

<img width="1575" height="280" alt="github-header" src="https://github.com/user-attachments/assets/6cec1ef7-0340-416e-ab81-c73fbc8ff847" />

QuantConnect MCP Server

The QuantConnect MCP Server is a bridge for AIs (such as Claude and OpenAI o3 Pro) to interact with our cloud platform. When equipped with our MCP, the AI can perform tasks on your behalf through our API such as updating projects, writing strategies, backtesting, and deploying strategies to production live-trading.

This is the OFFICIAL implementation of QuantConnect's MCP, maintained by the QuantConnect team. We recommend using the official version to ensure security of your code and API tokens. Our implementation is tested and dockerized for easy cross-platform deployment.

Getting Started

To connect local MCP clients (like Claude Desktop) to the QC MCP Server, follow these steps:

  1. Install and open Docker Desktop.
  2. Install and open Claude Desktop.
  3. In Claude Desktop, click File > Settings > Developer > Edit Config.
  4. Edit the claude_desktop_config.json file to include the following quantconnect configuration:
{
  "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.

  1. Restart Claude Desktop.

    Claude Desktop automatically pulls our MCP server from Docker Hub and connects to it.

To view all the MCP clients and the features they support, see the Feature Support Matrix in the MCP documentation.

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

docker pull quantconnect/mcp-server

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

Available Tools (64)

Tools provided by this ServerShort Description
read_accountRead the organization account status.
create_projectCreate a new project in your default organization.
read_projectList the details of a project or a set of recent projects.
list_projectsList the details of all projects.
update_projectUpdate a project's name or description.
delete_projectDelete a project.
create_project_collaboratorAdd a collaborator to a project.
read_project_collaboratorsList all collaborators on a project.
update_project_collaboratorUpdate collaborator information in a project.
delete_project_collaboratorRemove a collaborator from a project.
lock_project_with_collaboratorsLock a project so you can edit it.
read_project_nodesRead the available and selected nodes of a project.
update_project_nodesUpdate the active state of the given nodes to true.
create_compileAsynchronously create a compile job request for a project.
read_compileRead a compile packet job result.
create_fileAdd a file to a given project.
read_fileRead a file from a project, or all files in the project if no file name is provided.
update_file_nameUpdate the name of a file.
update_file_contentsUpdate the contents of a file.
patch_fileApply a patch (unified diff) to a file in a project.
delete_fileDelete a file in a project.
create_backtestCreate a new backtest request and get the backtest Id.
read_backtestRead the results of a backtest.
list_backtestsList all the backtests for the project.
read_backtest_chartRead a chart from a backtest.
read_backtest_ordersRead out the orders of a backtest.
read_backtest_insightsRead out the insights of a backtest.
update_backtestUpdate the name or note of a backtest.
delete_backtestDelete a backtest from a project.
estimate_optimization_timeEstimate the execution time of an optimization with the specified parameters.
create_optimizationCreate an optimization with the specified parameters.
read_optimizationRead an optimization.
list_optimizationsList all the optimizations for a project.
update_optimizationUpdate the name of an optimization.
abort_optimizationAbort an optimization.
delete_optimizationDelete an optimization.
authorize_connectionAuthorize an external connection with a live brokerage or data provider.
create_live_algorithmCreate a live algorithm.
read_live_algorithmRead details of a live algorithm.
list_live_algorithmsList all your past and current live trading deployments.
read_live_chartRead a chart from a live algorithm.
read_live_logsGet the logs of a live algorithm.
read_live_portfolioRead out the portfolio state of a live algorithm.
read_live_ordersRead out the orders of a live algorithm.
read_live_insightsRead out the insights of a live algorithm.
stop_live_algorithmStop a live algorithm.
liquidate_live_algorithmLiquidate and stop a live algorithm.
create_live_commandSend a command to a live trading algorithm.
broadcast_live_commandBroadcast a live command to all live algorithms in an organization.
upload_objectUpload files to the Object Store.
read_object_propertiesGet Object Store properties of a specific organization and key.
read_object_store_file_job_idCreate a job to download files from the Object Store and then read the job Id.
read_object_store_file_download_urlGet the URL for downloading files from the Object Store.
list_object_store_filesList the Object Store files under a specific directory in an organization.
delete_objectDelete the Object Store file of a specific organization and key.
read_lean_versionsReturns a list of LEAN versions with basic information for each version.
check_initialization_errorsRun a backtest for a few seconds to initialize the algorithm and get inialization errors if any.
complete_codeShow the code completion for a specific text input.
enhance_error_messageShow additional context and suggestions for error messages.
update_code_to_pep8Update Python code to follow PEP8 style.
check_syntaxCheck the syntax of a code.
search_quantconnectSearch for content in QuantConnect.
read_mcp_server_versionReturns the version of the QC MCP Server that's running.
read_latest_mcp_server_versionReturns the latest version of the QC MCP Server released.

Tool Details

Tool: read_account

Read the organization account status.

This tool doesn't modify it's environment.

This tool may interact with an "open world" of external entities.


Tool: create_project

Create a new project in your default organization.

ParameterTypeDescription
namestringProject name.
languagestringProgramming language to use.
organizationIdstring optionalThe organization to create project under. If you don't provide a value, it defaults to your preferred organization.

This tool modifies it's environment.

This tool doesn't perform destructive updates.

Calling this tool repeatedly with the same arguments has additional effects.

This tool may interact with an "open world" of external entities.


Tool: read_project

List the details of a project or a set of recent projects.

ParameterTypeDescription
projectIdinteger optionalId of the project to read.
startinteger optionalStarting (inclusive, zero-based) index of the projects to fetch. If you provide this property, omit the project Id property.
endinteger optionalLast (exlusive) index of the projects to fetch. If you provide this property, omit the project Id property.

This tool doesn't modify it's environment.

This tool may interact with an "open world" of external entities.


Tool: list_projects

List the details of all projects.

This tool doesn't modify it's environment.

This tool may interact with an "open world" of external entities.


Tool: update_project

Update a project's name or description.

ParameterTypeDescription
projectIdintegerProject Id to which the file belongs.
namestring optionalThe new name for the project.
descriptionstring optionalThe new description for the project.

This tool modifies it's environment.

This tool may perform destructive updates.

Calling this tool repeatedly with the same arguments has no additional effect.

This tool may interact with an "open world" of external entities.


Tool: delete_project

Delete a project.

ParameterTypeDescription
projectIdintegerId of the project to delete.

This tool modifies it's environment.

This tool may perform destructive updates.

Calling this tool repeatedly with the same arguments has no additional effect.

This tool may interact with an "open world" of external entities.


Tool: create_project_collaborator

Add a collaborator to a project.

ParameterTypeDescription
projectIdintegerId of the project to add the collaborator to.
collaboratorUserIdstringUser Id of the collaborator to add.
collaborationLiveControlbooleanGives the right to deploy and stop live algorithms.
collaborationWritebooleanGives the right to edit the code.

This tool modifies it's environment.

This tool doesn't perform destructive updates.

Calling this tool repeatedly with the same arguments has no additional effect.

This tool may interact with an "open world" of external entities.


Tool: read_project_collaborators

List all collaborators on a project.

ParameterTypeDescription
projectIdintegerId of the project from which to read the collaborators.

This tool doesn't modify it's environment.

This tool may interact with an "open world" of external entities.


Tool: update_project_collaborator

Update collaborator information in a project.

ParameterTypeDescription
projectIdintegerId of the project the collaborator is on.
collaboratorUserIdstringUser Id of the collaborator to update.
liveControlbooleanGives the right to deploy and stop live algorithms.
writebooleanGives the right to edit the code.

This tool modifies it's environment.

This tool may perform destructive updates.

*Calling this tool repeatedly with the same arguments ha

View source on GitHub