trading-platform-mcp-invest.../README.md
2026-01-16 08:33:11 -06:00

83 lines
2.7 KiB
Markdown

# MCP Investment Server
Investment/Agent Allocation MCP Server for the Trading Platform. Manages Money Manager agents (Atlas, Orion, Nova) allocations and profit distributions.
## Agents
| Agent | Risk Level | Target Return | Max Drawdown | Mgmt Fee | Perf Fee |
|-------|------------|---------------|--------------|----------|----------|
| **Atlas** | Conservative | 8%/yr | 5% | 1.5% | 15% |
| **Orion** | Moderate | 15%/yr | 12% | 2.0% | 20% |
| **Nova** | Aggressive | 25%/yr | 25% | 2.5% | 25% |
## Quick Start
```bash
npm install
cp .env.example .env
npm run dev
```
## API Endpoints
### Agents
- `GET /api/v1/agents` - List all agents
- `GET /api/v1/agents/:agentType` - Get agent config
- `GET /api/v1/agents/:agentType/performance` - Agent performance metrics
- `GET /api/v1/agents/:agentType/distributions` - Profit distribution history
### Allocations
- `POST /api/v1/allocations` - Create allocation (debits wallet)
- `GET /api/v1/allocations` - List allocations
- `GET /api/v1/allocations/:id` - Get allocation
- `POST /api/v1/allocations/:id/fund` - Add funds
- `POST /api/v1/allocations/:id/withdraw` - Withdraw funds
- `PATCH /api/v1/allocations/:id/status` - Update status
- `GET /api/v1/allocations/:id/transactions` - Transaction history
### User
- `GET /api/v1/users/:userId/allocations` - User allocations
- `GET /api/v1/users/:userId/investment-summary` - Portfolio summary
### Admin
- `POST /api/v1/admin/distribute-profits` - Distribute profits
## MCP Tools (14)
| Tool | Description |
|------|-------------|
| `investment_list_agents` | List agents |
| `investment_get_agent` | Get agent config |
| `investment_create_allocation` | Create allocation |
| `investment_get_allocation` | Get allocation |
| `investment_list_allocations` | List allocations |
| `investment_get_user_allocations` | User allocations |
| `investment_fund_allocation` | Add funds |
| `investment_withdraw` | Withdraw funds |
| `investment_update_status` | Update status |
| `investment_get_transactions` | Get transactions |
| `investment_distribute_profits` | Distribute profits |
| `investment_get_distributions` | Distribution history |
| `investment_get_user_summary` | User summary |
| `investment_get_agent_performance` | Agent metrics |
## Allocation Status
- `pending` - Awaiting activation
- `active` - Active and trading
- `paused` - Temporarily paused
- `liquidating` - Liquidation in progress
- `closed` - Closed/fully withdrawn
## Features
- 7-day lock period for new allocations
- 5% early withdrawal penalty
- Automatic profit distribution to allocations
- Management and performance fee deduction
- Integration with Wallet service for funding/withdrawals
## License
UNLICENSED - Private