Skip to main content

A stdio bridge for the TraderFit MCP API

Project description

TraderFit Bridge (StdIO)

This package provides a Machine Cognition Protocol (MCP) bridge using standard input/output (stdio) to connect an MCP client (like Cursor) to the TraderFitAI backend API.

Features

  • Dynamically fetches available tools from the TraderFitAI OpenAPI schema.
  • Executes tool calls by forwarding requests to the TraderFitAI API.
  • Authenticates with the backend using an API key provided via environment variable.

Installation

# Coming soon to PyPI!
# pip install traderfit-bridge 

(Currently, installation requires cloning the repository and setting up the environment manually - see Development Setup below)

Configuration (Command-Based - Current Method)

To use this bridge with Cursor, you need to configure it in your ~/.cursor/mcp.json file within the "mcpServers" section.

Important: You must replace the placeholder paths with the absolute paths on your local machine.

  1. Generate an API key from the TraderFitAI platform dashboard.
  2. Clone this repository: git clone https://github.com/rizkisyaf/traderfit-bridge.git
  3. Navigate into the directory: cd traderfit-bridge
  4. Create and activate a Python virtual environment:
    python3 -m venv venv
    source venv/bin/activate 
    
  5. Install dependencies: pip install -e . (Installs in editable mode)
  6. Find the absolute path to the installed traderfit-bridge executable (usually within venv/bin/) and the project's root directory (pwd).
  7. Add the following configuration to your ~/.cursor/mcp.json, replacing placeholders:
{
    "mcpServers": {
        "traderfit": {
            "name": "TraderFit",
            "description": "TraderFitAI Bridge (StdIO)",
            "protocol": "stdio",
            "command": "/absolute/path/to/your/traderfit-bridge/venv/bin/traderfit-bridge",
            "cwd": "/absolute/path/to/your/traderfit-bridge", 
            "env": {
                "TRADERFIT_API_KEY": "YOUR_TRADERFIT_API_KEY_HERE",
                "TRADERFIT_MCP_URL": "https://traderfit-mcp.skolp.com" 
            }
        }
        // ... other servers ...
    }
}
  1. Reload MCP Clients in Cursor.

Configuration (Package-Based - Future)

(Details on configuring via a package manager and handling API keys via a config file will be added once implemented.)

Development Setup

  1. Clone the repository:

    git clone https://github.com/rizkisyaf/traderfit-bridge.git
    cd traderfit-bridge
    
  2. Create a Python virtual environment:

    python3 -m venv venv
    source venv/bin/activate 
    
  3. Install dependencies, including development tools:

    pip install -e ".[dev]" 
    

    (Note: Requires defining [project.optional-dependencies] in pyproject.toml if you have dev tools like pytest, ruff, etc.)

  4. Create a .env file in the project root with your API key for local testing:

    TRADERFIT_API_KEY=YOUR_TRADERFIT_API_KEY_HERE
    TRADERFIT_MCP_URL=https://traderfit-mcp.skolp.com 
    # Optional: Set LOG_LEVEL=DEBUG for more verbose logging
    # LOG_LEVEL=DEBUG 
    
  5. Run the bridge directly (for testing purposes):

    python -m traderfit_bridge.main 
    

License

This project is licensed under the MIT License - see the LICENSE file for details (if one exists).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

traderfit_bridge-0.1.0.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

traderfit_bridge-0.1.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file traderfit_bridge-0.1.0.tar.gz.

File metadata

  • Download URL: traderfit_bridge-0.1.0.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for traderfit_bridge-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9cc773023fa280018c636bf4edbd5ff3966c843cea9c83f85184ce63c9d8ac38
MD5 cf46ca249d881a60e21f6dd54f9629ba
BLAKE2b-256 f7d249209f6cd5ebb0da819312034b775218adbe5bbf8875c04502081ba94dc9

See more details on using hashes here.

File details

Details for the file traderfit_bridge-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for traderfit_bridge-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6d19b0ee4efede8b91073f7236bf2c0314b7922deda659d26a9ea12ec1a0ecd2
MD5 b54ff795bfd4df01e0c79046af571aba
BLAKE2b-256 74e8f06eebe064eb2f625b315c72a109b48c003e1e1e41f4807de6c698ef8a25

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page