# agent-trading-journal [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/smizxe/agent-trading-journal  
**GitHub Stars:** 1  
**npm Downloads (last month):** 316  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/agent-trading-journal

## Description
AI trading journal: your agent logs trades from chart screenshots and checks your own rules.

## Tools
Capabilities this server exposes over MCP:

- **get_setup_status** — Profile, strategies, accounts and counts. Tells you whether onboarding is needed.
- **get_onboarding_guide** — The interview script for setting the journal up around this trader. Follow it when get_setup_status says onboarding is needed.
- **get_workflow** — Step-by-step instructions for a packaged workflow: onboarding, log_trade_from_screenshot, weekly_review, pre_session_check.
- **set_profile** — Upsert trader profile entries (language, markets, style, sessions, timezone, experience, goals, weaknesses, ...). null deletes a key.
- **list_presets** — Example strategies to start from (always adapt them to the user).
- **import_preset** — Copy a preset into the journal as a strategy (optionally under a new slug/name), then edit it with upsert_strategy.
- **upsert_strategy** — Save the full strategy definition: plan, custom fields (what to measure per trade) and rules (entry checklist). Fields/rules left out are archived, not deleted.
- **get_strategy** — Full definition with field guides and rules. Call before logging trades.
- **list_strategies** — All strategies with version, number of fields/rules and trades.
- **export_strategy** — Portable JSON of a strategy (same format as presets) — to back up or share.
- **upsert_account** — Trading account with its risk limits (prop-firm style). Same name = update; omitted fields stay unchanged.
- **list_accounts** — Accounts with their limits.
- **check_risk** — Today's R and estimated % vs the account's daily loss / drawdown / trade-count / loss-streak limits. status: ok | caution | stop.
- **start_session** — A backtest / forward / live session. Returns session_id for log_trade.
- **list_sessions** — Sessions with trade count, win count and total R.
- **log_trade** — Log one trade into a session with custom fields and rule checks. Skipped setups count too (status=skipped + skip_reason). RR, R and outcome are derived when possible.
- **update_trade** — Change any field, custom field or rule check. Send only what changes.
- **delete_trade** — Delete a trade logged by mistake (with its rule checks and screenshot records).
- **query_trades** — Trades matching filters, newest first.
- **get_trade** — One trade with fields, rule checks, screenshots and lessons.
- **add_screenshot** — Copy an image (png/jpg/gif/webp, absolute path) into the journal and attach it to a trade.
- **add_lesson** — Record a lesson linked to a session and/or trade. Suggested categories: discipline, strategy, market, risk, psychology, execution.
- **update_lesson** — Edit text or category.
- **delete_lesson** — Delete a lesson recorded by mistake.
- **list_lessons** — Lessons, newest first.
- **get_stats** — Win rate, total R, expectancy, profit factor, payoff, drawdown, streaks, Edge Score, breakdowns (direction, symbol, weekday, hour, every custom field), rule adherence, calendar, equity curve.
- **run_sql_readonly** — Any SELECT for ad-hoc analysis. Tables: profile, strategies, strategy_fields, strategy_rules, accounts, sessions, trades (custom fields in fields_json → json_extract), trade_rule_checks, attachments, lessons.
- **import_statement** — Import closed trades from an export file. Formats: MetaTrader 4/5 (HTML statement), Interactive Brokers (activity statement), Interactive Brokers (Flex Query), ThinkorSwim / Charles Schwab (account statement), TradeZella (trades export), Tradervue (executions export), TopstepX (fills export), TradingView (paper trading history), NinjaTrader (executions export), Tradovate (orders export), Webull (orders export), DAS Trader Pro (executions export). Duplicates are skipped. Run with dry_run first.
- **export_review** — Markdown review of a scope (Obsidian-friendly). Returns the text, or writes it to path.
- **start_dashboard** — Start the local web dashboard (http://localhost:3777). Only when the user asks.
- **stop_dashboard** — Stop the dashboard started by this server.
- **dashboard_status** — Whether the dashboard started by this server is running.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "agent-trading-journal": {
    "command": "npx",
    "args": ["-y","agent-trading-journal"]
  }
}
```

## Documentation

## What agent-trading-journal does

The agent-trading-journal MCP server turns an AI agent into the data-entry interface for a local trading journal. You can provide a chart screenshot and ask the agent to log the trade. The agent can populate strategy-specific fields, evaluate the configured rules, and attach the image to the journal entry. Trades can be reviewed by session, account, strategy, instrument, and result in R multiples.

The journal is configured around the trader's own process rather than a fixed form. An onboarding workflow asks about markets, risk limits, bias, setups, entries, stops, targets, management, and no-trade conditions. The answers become custom fields and a checklist of rules. Rule adherence can then be compared with trade expectancy, while skipped setups can also be recorded for later review.

## How it works

The package runs as an MCP server over stdio and does not call an LLM itself. The connected client supplies the AI capabilities, while the server stores journal data in SQLite and images in a local screenshots directory. A dashboard can run at `http://localhost:3777`; by default it binds to `127.0.0.1`.

Sessions represent live trading, backtesting, or forward testing and may be associated with an account. Accounts can include limits such as daily loss, maximum drawdown, trades per day, and loss streak. The `check_risk` tool reports against those limits. Strategy changes create new versions, so older trades retain the fields and rules used when they were logged.

The agent-trading-journal MCP server also accepts statement imports from supported exports, including MetaTrader 4/5, TradingView, IBKR, ThinkorSwim, NinjaTrader, Tradovate, TopstepX, Webull, DAS, TradeZella, Tradervue, and generic CSV files.

## Setup and configuration

Node.js 22 or newer is required. For a stdio client, configure the command `npx` with arguments `-y` and `agent-trading-journal`. The repository provides setup output for Claude Code, Claude Desktop, and Codex. After connecting, ask the agent to set up the journal and confirm the proposed profile, fields, and rules.

By default, data is stored under `~/.agent-trading-journal`, including `journal.db` and `screenshots/`. `JOURNAL_DATA_DIR` changes the base directory; `JOURNAL_DB` and `JOURNAL_SCREENSHOTS` override individual paths. `JOURNAL_PORT` changes the dashboard port, and `JOURNAL_WEB=1` starts the dashboard with the MCP process. Additional dashboard language files can be placed in the directory selected by `JOURNAL_LOCALES_DIR`.

## Tools and capabilities

The agent-trading-journal MCP server exposes tools for:

- Setup, onboarding, profiles, presets, and versioned strategies.
- Accounts, risk checks, sessions, trade creation, editing, deletion, and queries.
- Screenshot attachments, lessons, statistics, read-only SQL, and Markdown review exports.
- Statement imports and dashboard start, stop, and status operations.

Clients with MCP prompt support can use onboarding, screenshot-based trade logging, weekly review, and pre-session checks. Other clients can access the same workflows through `get_workflow`. The command-line interface also supports demo data, dashboard startup, setup snippets, and file imports.

## Limitations and notes

This is a recording and analysis tool, not an execution system. It does not connect to brokers to place orders, generate trading signals, or provide financial advice. Chart interpretation by the agent can be incorrect, so logged values remain visible and editable.

The journal keeps data on the local machine in the configured SQLite file and screenshot folder; the dashboard is local by default. Backups can be made by copying the data directory. Demo mode uses a separate directory and generated data, rather than a real trading account.

The agent-trading-journal MCP server requires an MCP client to provide the AI interaction. No separate Anthropic or OpenAI API key is used by the journal itself. Presets are starting templates, not trading recommendations, and the edge score is withheld until at least five trades exist.

_Full upstream README: https://allmcps.com/mcp/agent-trading-journal/readme_

