composer-trade-mcp


Namecomposer-trade-mcp JSON
Version 0.1.3 PyPI version JSON
download
home_pageNone
SummaryComposer MCP Server - Backtest and Automate your trades with LLMs
upload_time2025-07-10 18:19:24
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseNone
keywords ai-crypto-trader ai-stock-trader ai-trading algorithmic-trading automated-trading backtesting composer financial-technology fintech investment-automation llm mcp no-code-trading portfolio-management quantitative-trading risk-management symphony-trading trading-execution trading-strategies
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![composermcpheader](https://github.com/user-attachments/assets/786b71f3-78a3-48f3-a4ee-f42f85a52949)

<div class="title-block" style="text-align: center;" align="center">

  [![Twitter](https://img.shields.io/badge/Twitter-@ComposerTrade-000000.svg?style=for-the-badge&logo=x&labelColor=000)](https://x.com/composertrade)
  [![PyPI](https://img.shields.io/badge/PyPI-composer--mcp-000000.svg?style=for-the-badge&logo=pypi&labelColor=000)](https://pypi.org/project/composer-trade-mcp)
  [![Reddit Community](https://img.shields.io/badge/reddit-r/ComposerTrade-000000.svg?style=for-the-badge&logo=reddit&labelColor=000)](https://www.reddit.com/r/ComposerTrade)

</div>

<p align="center">
  <strong>Vibe Trading is here!</strong>
</p>
<p align="center">
  Official <a href="https://www.composer.trade">Composer</a> Model Context Protocol (MCP) server that allows MCP-enabled LLMs like Claude Desktop, Cursor, OpenAI Agents and others to validate investment ideas via backtests and even trade multiple strategies (called "symphonies") in parallel to compare their live performance.
</p>

## Features
- **Create automated investing strategies**
  - Use indicators like Relative Strength Index (RSI), Moving Average (MA), and Exponential Moving Average (EMA) with a diverse range of equity and crypto offerings to build your ideal portfolio.
  - Don't just make one-off trades. Composer symphonies constantly monitor the market and rebalance accordingly.
  - Try asking Claude: "_Build me a crypto strategy with a maximum drawdown of 30% or less._"
- **Backtest your ideas**
  - Our Backtesting API provides a fast feedback loop for AI to iterate and validate its hypotheses.
  - Try asking Claude: "_Compare the strategy's performance against the S&P 500. Plot the results._"
- **Monitor performance** (requires [API Key](https://github.com/invest-composer/composer-trade-mcp?tab=readme-ov-file#getting-your-api-key))
  - View performance statistics for your overall account as well as for individual symphonies.
  - Try asking Claude: "_Identify my best-performing symphonies. Analyze why they are working._"
- **Control your investments** (requires API Key + [Composer subscription](https://www.composer.trade/pricing))
  - Ask AI to analyze your investments and adjust your exposure accordingly!
  - Try asking Claude: "_Research the latest trends and news. Analyze my symphonies and determine whether I should increase / decrease my investments._"

## Quickstart with Claude Desktop
This section will get you started with creating symphonies and backtesting them.
You don't even need a Composer account to use these features!

Note that other tools will require an [API Key](https://github.com/invest-composer/composer-trade-mcp?tab=readme-ov-file#getting-your-api-key).

1. Install `uv` (Python package manager) with `curl -LsSf https://astral.sh/uv/install.sh | sh` or see the `uv` [repo](https://github.com/astral-sh/uv) for additional install methods.
1. Download [composer-trade-mcp.dxt](https://storage.googleapis.com/www.investcomposer.com/downloads/composer-trade-mcp.dxt)
1. Go to Claude > Settings > Extensions then drag the `composer-trade-mcp.dxt` file into the window.

<div align="center">
 <img src="https://github.com/user-attachments/assets/e5ffe326-41ec-4f8c-8b6f-e2abf3340622" alt="CleanShot 2025-06-25 at 14 35 15@2x" width="500">
</div>

4. Click "Install"
    - You can choose to add your [API Key](https://github.com/invest-composer/composer-trade-mcp?tab=readme-ov-file#getting-your-api-key) here for more advanced features but it's not necessary for backtesting.
1. That's it. Your MCP client can now interact with Composer! Try asking Claude something like, "_Create and backtest a basic 60-40 strategy._"

## Manual install
If the approach above did not work or your AI client doesn't support DXT, you can try the following:

1. Install `uv` (Python package manager) with `curl -LsSf https://astral.sh/uv/install.sh | sh` or see the `uv` [repo](https://github.com/astral-sh/uv) for additional install methods.
1. Open your Terminal and run `which uvx`
1. Go to Claude > Settings > Developer > Edit Config > claude_desktop_config.json to include the following:

```
{
  "mcpServers": {
    "composer": {
      "command": "uvx",  <--------- Replace "uvx" with the result of `which uvx` in the prior step
      "args": [
        "composer-trade-mcp"
      ]
    }
  }
}
```
4. Close and re-open Claude and you can now interact with Composer!

## Getting your API Key

An API key will be necessary to interact with your Composer account. For example, saving a Composer Symphony for later or viewing statistics about your portfolio.

Trading a symphony will require a paid subscription, although you can always liquidate a position regardless of your subscription status. Composer also includes a 14-day free trial so you can try without any commitment.

Get your API key from [Composer](https://app.composer.trade) by following these steps:

1. If you haven't already done so, [create an account](https://app.composer.trade/register).
1. Open your "Accounts & Funding" page
   ![CleanShot 2025-06-25 at 14 28 12@2x](https://github.com/user-attachments/assets/7821f9f8-07ad-4fa9-87e0-24b29e6bbd87)
1. Request an API key
   <div align="center">
     <img src="https://github.com/user-attachments/assets/df6d8f23-de5a-44fb-a1c7-0bffa7e3173f" alt="CleanShot 2025-06-25 at 14 35 15@2x" width="500">
   </div>
1. Save your API key and secret
   <div align="center">
     <img src="https://github.com/user-attachments/assets/dd4d2828-6bfd-4db5-9fe0-6a78694f87c6" alt="CleanShot 2025-06-25 at 14 35 15@2x" width="500">
   </div>
1. Depending on how you installed the Composer MCP server, do the following:
    1. If you installed via `composer-trade-mcp.dxt`:
        - Go to Claude > Settings > Extensions > Composer MCP Server > Configure
        - Add your API Key and Secret
    1. If you installed via `claude_desktop_config.json`:
        - Modify your `claude_desktop_config.json` to include your API key and secret:
```
{
  "mcpServers": {
    "composer": {
      "command": "uvx",
      "args": [
        "composer-trade-mcp"
      ],
      "env": {
        "COMPOSER_API_KEY": "<insert-your-api-key-here>",
        "COMPOSER_SECRET_KEY": "<insert-your-api-secret-here>"
      }
    }
  }
}
```

## Available tools
Once your LLM is connected to the Composer MCP Server, it will have access to the following tools:

- `create_symphony` - Define an automated strategy using Composer's system.
- `backtest_symphony` - Backtest a symphony that was created with `create_symphony`
- `backtest_symphony_by_id` - Backtest an existing symphony given its ID
- `save_symphony` - Save a symphony to the user's account
- `copy_symphony` - Copy an existing symphony to the user's account
- `update_saved_symphony` - Update a saved symphony
- `list_accounts` - List all brokerage accounts available to the Composer user
- `get_account_holdings` - Get the holdings of a brokerage account
- `get_aggregate_portfolio_stats` - Get the aggregate portfolio statistics of a brokerage account
- `get_aggregate_symphony_stats` - Get stats for every symphony in a brokerage account
- `get_symphony_daily_performance` - Get daily performance for a specific symphony in a brokerage account
- `get_portfolio_daily_performance` - Get the daily performance for a brokerage account
- `get_saved_symphony` - Get the definition about an existing symphony given its ID.
- `get_market_hours` - Get market hours for the next week
- `invest_in_symphony` - Invest in a symphony for a specific account
- `withdraw_from_symphony` - Withdraw money from a symphony for a specific account
- `cancel_invest_or_withdraw` - Cancel an invest or withdraw request that has not been processed yet
- `skip_automated_rebalance_for_symphony` - Skip automated rebalance for a symphony in a specific account
- `go_to_cash_for_symphony` - Immediately sell all assets in a symphony
- `liquidate_symphony` - Immediately sell all assets in a symphony (or queue for market open if outside of market hours)
- `preview_rebalance_for_user` - Perform a dry run of rebalancing across all accounts to see what trades would be recommended
- `preview_rebalance_for_symphony` - Perform a dry run of rebalancing for a specific symphony to see what trades would be recommended
- `rebalance_symphony_now` - Rebalance a symphony NOW instead of waiting for the next automated rebalance
- `execute_single_trade` - Execute a single order for a specific symbol like you would in a traditional brokerage account
- `cancel_single_trade` - Cancel a request for a single trade that has not executed yet

## Recommendations
We recommend the following for the best experience with Composer:
- Use Claude Opus 4 instead of Sonnet. Opus is much better at tool use.
- Turn on Claude's Research mode if you need the latest financial data and news.
- Tools that execute trades or affect your funds should only be allowed once. Do not set them to "Always Allow".
  - The following tools should be handled with care: `invest_in_symphony`, `withdraw_from_symphony`, `skip_automated_rebalance_for_symphony`, `go_to_cash_for_symphony`, `liquidate_symphony`, `rebalance_symphony_now`, `execute_single_trade`

## Troubleshooting

Logs when running with Claude Desktop can be found at:

- **Windows**: `%APPDATA%\Claude\logs\mcp-server-composer.log`
- **macOS**: `~/Library/Logs/Claude/mcp-server-composer.log`

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "composer-trade-mcp",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "ai-crypto-trader, ai-stock-trader, ai-trading, algorithmic-trading, automated-trading, backtesting, composer, financial-technology, fintech, investment-automation, llm, mcp, no-code-trading, portfolio-management, quantitative-trading, risk-management, symphony-trading, trading-execution, trading-strategies",
    "author": null,
    "author_email": "\"Composer Technologies Inc.\" <help@composer.trade>",
    "download_url": "https://files.pythonhosted.org/packages/69/74/92967c25bf90fcd45f8f6c60f59e516c9d61a446a4c5fdcb0deff4c998af/composer_trade_mcp-0.1.3.tar.gz",
    "platform": null,
    "description": "![composermcpheader](https://github.com/user-attachments/assets/786b71f3-78a3-48f3-a4ee-f42f85a52949)\n\n<div class=\"title-block\" style=\"text-align: center;\" align=\"center\">\n\n  [![Twitter](https://img.shields.io/badge/Twitter-@ComposerTrade-000000.svg?style=for-the-badge&logo=x&labelColor=000)](https://x.com/composertrade)\n  [![PyPI](https://img.shields.io/badge/PyPI-composer--mcp-000000.svg?style=for-the-badge&logo=pypi&labelColor=000)](https://pypi.org/project/composer-trade-mcp)\n  [![Reddit Community](https://img.shields.io/badge/reddit-r/ComposerTrade-000000.svg?style=for-the-badge&logo=reddit&labelColor=000)](https://www.reddit.com/r/ComposerTrade)\n\n</div>\n\n<p align=\"center\">\n  <strong>Vibe Trading is here!</strong>\n</p>\n<p align=\"center\">\n  Official <a href=\"https://www.composer.trade\">Composer</a> Model Context Protocol (MCP) server that allows MCP-enabled LLMs like Claude Desktop, Cursor, OpenAI Agents and others to validate investment ideas via backtests and even trade multiple strategies (called \"symphonies\") in parallel to compare their live performance.\n</p>\n\n## Features\n- **Create automated investing strategies**\n  - Use indicators like Relative Strength Index (RSI), Moving Average (MA), and Exponential Moving Average (EMA) with a diverse range of equity and crypto offerings to build your ideal portfolio.\n  - Don't just make one-off trades. Composer symphonies constantly monitor the market and rebalance accordingly.\n  - Try asking Claude: \"_Build me a crypto strategy with a maximum drawdown of 30% or less._\"\n- **Backtest your ideas**\n  - Our Backtesting API provides a fast feedback loop for AI to iterate and validate its hypotheses.\n  - Try asking Claude: \"_Compare the strategy's performance against the S&P 500. Plot the results._\"\n- **Monitor performance** (requires [API Key](https://github.com/invest-composer/composer-trade-mcp?tab=readme-ov-file#getting-your-api-key))\n  - View performance statistics for your overall account as well as for individual symphonies.\n  - Try asking Claude: \"_Identify my best-performing symphonies. Analyze why they are working._\"\n- **Control your investments** (requires API Key + [Composer subscription](https://www.composer.trade/pricing))\n  - Ask AI to analyze your investments and adjust your exposure accordingly!\n  - Try asking Claude: \"_Research the latest trends and news. Analyze my symphonies and determine whether I should increase / decrease my investments._\"\n\n## Quickstart with Claude Desktop\nThis section will get you started with creating symphonies and backtesting them.\nYou don't even need a Composer account to use these features!\n\nNote that other tools will require an [API Key](https://github.com/invest-composer/composer-trade-mcp?tab=readme-ov-file#getting-your-api-key).\n\n1. Install `uv` (Python package manager) with `curl -LsSf https://astral.sh/uv/install.sh | sh` or see the `uv` [repo](https://github.com/astral-sh/uv) for additional install methods.\n1. Download [composer-trade-mcp.dxt](https://storage.googleapis.com/www.investcomposer.com/downloads/composer-trade-mcp.dxt)\n1. Go to Claude > Settings > Extensions then drag the `composer-trade-mcp.dxt` file into the window.\n\n<div align=\"center\">\n <img src=\"https://github.com/user-attachments/assets/e5ffe326-41ec-4f8c-8b6f-e2abf3340622\" alt=\"CleanShot 2025-06-25 at 14 35 15@2x\" width=\"500\">\n</div>\n\n4. Click \"Install\"\n    - You can choose to add your [API Key](https://github.com/invest-composer/composer-trade-mcp?tab=readme-ov-file#getting-your-api-key) here for more advanced features but it's not necessary for backtesting.\n1. That's it. Your MCP client can now interact with Composer! Try asking Claude something like, \"_Create and backtest a basic 60-40 strategy._\"\n\n## Manual install\nIf the approach above did not work or your AI client doesn't support DXT, you can try the following:\n\n1. Install `uv` (Python package manager) with `curl -LsSf https://astral.sh/uv/install.sh | sh` or see the `uv` [repo](https://github.com/astral-sh/uv) for additional install methods.\n1. Open your Terminal and run `which uvx`\n1. Go to Claude > Settings > Developer > Edit Config > claude_desktop_config.json to include the following:\n\n```\n{\n  \"mcpServers\": {\n    \"composer\": {\n      \"command\": \"uvx\",  <--------- Replace \"uvx\" with the result of `which uvx` in the prior step\n      \"args\": [\n        \"composer-trade-mcp\"\n      ]\n    }\n  }\n}\n```\n4. Close and re-open Claude and you can now interact with Composer!\n\n## Getting your API Key\n\nAn API key will be necessary to interact with your Composer account. For example, saving a Composer Symphony for later or viewing statistics about your portfolio.\n\nTrading a symphony will require a paid subscription, although you can always liquidate a position regardless of your subscription status. Composer also includes a 14-day free trial so you can try without any commitment.\n\nGet your API key from [Composer](https://app.composer.trade) by following these steps:\n\n1. If you haven't already done so, [create an account](https://app.composer.trade/register).\n1. Open your \"Accounts & Funding\" page\n   ![CleanShot 2025-06-25 at 14 28 12@2x](https://github.com/user-attachments/assets/7821f9f8-07ad-4fa9-87e0-24b29e6bbd87)\n1. Request an API key\n   <div align=\"center\">\n     <img src=\"https://github.com/user-attachments/assets/df6d8f23-de5a-44fb-a1c7-0bffa7e3173f\" alt=\"CleanShot 2025-06-25 at 14 35 15@2x\" width=\"500\">\n   </div>\n1. Save your API key and secret\n   <div align=\"center\">\n     <img src=\"https://github.com/user-attachments/assets/dd4d2828-6bfd-4db5-9fe0-6a78694f87c6\" alt=\"CleanShot 2025-06-25 at 14 35 15@2x\" width=\"500\">\n   </div>\n1. Depending on how you installed the Composer MCP server, do the following:\n    1. If you installed via `composer-trade-mcp.dxt`:\n        - Go to Claude > Settings > Extensions > Composer MCP Server > Configure\n        - Add your API Key and Secret\n    1. If you installed via `claude_desktop_config.json`:\n        - Modify your `claude_desktop_config.json` to include your API key and secret:\n```\n{\n  \"mcpServers\": {\n    \"composer\": {\n      \"command\": \"uvx\",\n      \"args\": [\n        \"composer-trade-mcp\"\n      ],\n      \"env\": {\n        \"COMPOSER_API_KEY\": \"<insert-your-api-key-here>\",\n        \"COMPOSER_SECRET_KEY\": \"<insert-your-api-secret-here>\"\n      }\n    }\n  }\n}\n```\n\n## Available tools\nOnce your LLM is connected to the Composer MCP Server, it will have access to the following tools:\n\n- `create_symphony` - Define an automated strategy using Composer's system.\n- `backtest_symphony` - Backtest a symphony that was created with `create_symphony`\n- `backtest_symphony_by_id` - Backtest an existing symphony given its ID\n- `save_symphony` - Save a symphony to the user's account\n- `copy_symphony` - Copy an existing symphony to the user's account\n- `update_saved_symphony` - Update a saved symphony\n- `list_accounts` - List all brokerage accounts available to the Composer user\n- `get_account_holdings` - Get the holdings of a brokerage account\n- `get_aggregate_portfolio_stats` - Get the aggregate portfolio statistics of a brokerage account\n- `get_aggregate_symphony_stats` - Get stats for every symphony in a brokerage account\n- `get_symphony_daily_performance` - Get daily performance for a specific symphony in a brokerage account\n- `get_portfolio_daily_performance` - Get the daily performance for a brokerage account\n- `get_saved_symphony` - Get the definition about an existing symphony given its ID.\n- `get_market_hours` - Get market hours for the next week\n- `invest_in_symphony` - Invest in a symphony for a specific account\n- `withdraw_from_symphony` - Withdraw money from a symphony for a specific account\n- `cancel_invest_or_withdraw` - Cancel an invest or withdraw request that has not been processed yet\n- `skip_automated_rebalance_for_symphony` - Skip automated rebalance for a symphony in a specific account\n- `go_to_cash_for_symphony` - Immediately sell all assets in a symphony\n- `liquidate_symphony` - Immediately sell all assets in a symphony (or queue for market open if outside of market hours)\n- `preview_rebalance_for_user` - Perform a dry run of rebalancing across all accounts to see what trades would be recommended\n- `preview_rebalance_for_symphony` - Perform a dry run of rebalancing for a specific symphony to see what trades would be recommended\n- `rebalance_symphony_now` - Rebalance a symphony NOW instead of waiting for the next automated rebalance\n- `execute_single_trade` - Execute a single order for a specific symbol like you would in a traditional brokerage account\n- `cancel_single_trade` - Cancel a request for a single trade that has not executed yet\n\n## Recommendations\nWe recommend the following for the best experience with Composer:\n- Use Claude Opus 4 instead of Sonnet. Opus is much better at tool use.\n- Turn on Claude's Research mode if you need the latest financial data and news.\n- Tools that execute trades or affect your funds should only be allowed once. Do not set them to \"Always Allow\".\n  - The following tools should be handled with care: `invest_in_symphony`, `withdraw_from_symphony`, `skip_automated_rebalance_for_symphony`, `go_to_cash_for_symphony`, `liquidate_symphony`, `rebalance_symphony_now`, `execute_single_trade`\n\n## Troubleshooting\n\nLogs when running with Claude Desktop can be found at:\n\n- **Windows**: `%APPDATA%\\Claude\\logs\\mcp-server-composer.log`\n- **macOS**: `~/Library/Logs/Claude/mcp-server-composer.log`\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Composer MCP Server - Backtest and Automate your trades with LLMs",
    "version": "0.1.3",
    "project_urls": {
        "Documentation": "https://github.com/invest-composer/composer-trade-mcp#readme",
        "Homepage": "https://github.com/invest-composer/composer-trade-mcp",
        "Issues": "https://github.com/invest-composer/composer-trade-mcp/issues",
        "Repository": "https://github.com/invest-composer/composer-trade-mcp.git"
    },
    "split_keywords": [
        "ai-crypto-trader",
        " ai-stock-trader",
        " ai-trading",
        " algorithmic-trading",
        " automated-trading",
        " backtesting",
        " composer",
        " financial-technology",
        " fintech",
        " investment-automation",
        " llm",
        " mcp",
        " no-code-trading",
        " portfolio-management",
        " quantitative-trading",
        " risk-management",
        " symphony-trading",
        " trading-execution",
        " trading-strategies"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d9d9e788ed2853442adae4ee3abba2c2ffc3cd2ea5324a550df1d528718d8c3e",
                "md5": "3298e6bd16f2b02eed1d763b99fa3db9",
                "sha256": "0116288fa2de0db092a320120953c5e9492fc83bdc5d7be0a5c66081980d6a30"
            },
            "downloads": -1,
            "filename": "composer_trade_mcp-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3298e6bd16f2b02eed1d763b99fa3db9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 22364,
            "upload_time": "2025-07-10T18:19:23",
            "upload_time_iso_8601": "2025-07-10T18:19:23.619169Z",
            "url": "https://files.pythonhosted.org/packages/d9/d9/e788ed2853442adae4ee3abba2c2ffc3cd2ea5324a550df1d528718d8c3e/composer_trade_mcp-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "697492967c25bf90fcd45f8f6c60f59e516c9d61a446a4c5fdcb0deff4c998af",
                "md5": "a65659eb33c0956180bf9f4dcb2cc063",
                "sha256": "039424536c6a411a88791ac2f019a259c8f7405e7e9ce4285c57184683da04e7"
            },
            "downloads": -1,
            "filename": "composer_trade_mcp-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "a65659eb33c0956180bf9f4dcb2cc063",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 830048,
            "upload_time": "2025-07-10T18:19:24",
            "upload_time_iso_8601": "2025-07-10T18:19:24.551955Z",
            "url": "https://files.pythonhosted.org/packages/69/74/92967c25bf90fcd45f8f6c60f59e516c9d61a446a4c5fdcb0deff4c998af/composer_trade_mcp-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-10 18:19:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "invest-composer",
    "github_project": "composer-trade-mcp#readme",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "composer-trade-mcp"
}
        
Elapsed time: 0.55086s