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.
- Generate an API key from the TraderFitAI platform dashboard.
- Clone this repository:
git clone https://github.com/rizkisyaf/traderfit-bridge.git - Navigate into the directory:
cd traderfit-bridge - Create and activate a Python virtual environment:
python3 -m venv venv source venv/bin/activate
- Install dependencies:
pip install -e .(Installs in editable mode) - Find the absolute path to the installed
traderfit-bridgeexecutable (usually withinvenv/bin/) and the project's root directory (pwd). - 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 ...
}
}
- 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
-
Clone the repository:
git clone https://github.com/rizkisyaf/traderfit-bridge.git cd traderfit-bridge
-
Create a Python virtual environment:
python3 -m venv venv source venv/bin/activate
-
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.) -
Create a
.envfile 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
-
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9cc773023fa280018c636bf4edbd5ff3966c843cea9c83f85184ce63c9d8ac38
|
|
| MD5 |
cf46ca249d881a60e21f6dd54f9629ba
|
|
| BLAKE2b-256 |
f7d249209f6cd5ebb0da819312034b775218adbe5bbf8875c04502081ba94dc9
|
File details
Details for the file traderfit_bridge-0.1.0-py3-none-any.whl.
File metadata
- Download URL: traderfit_bridge-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d19b0ee4efede8b91073f7236bf2c0314b7922deda659d26a9ea12ec1a0ecd2
|
|
| MD5 |
b54ff795bfd4df01e0c79046af571aba
|
|
| BLAKE2b-256 |
74e8f06eebe064eb2f625b315c72a109b48c003e1e1e41f4807de6c698ef8a25
|