> ## Documentation Index
> Fetch the complete documentation index at: https://docs.edgebook.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect an AI agent

> Read and write your EdgeBook journal from an MCP-capable AI client

## What this is

EdgeBook runs a remote MCP (Model Context Protocol) server. Any MCP-capable AI client can connect to it, sign in as you, and then read and write your journal on your behalf. There is no separate API key.

A typical session looks like this. You paste rough notes, or describe a chart screenshot, and ask the agent to log the trade. It calls `get_trading_context` to read your existing symbols, setups, strategies, and statuses, fills in the fields it can infer, and asks about anything it cannot. Once you answer, it calls `create_trade` and the entry appears in your journal.

## Endpoint

```text theme={null}
https://mcp.edgebook.io/mcp
```

<Note>
  `mcp.edgebook.io` is not live yet. Until it is, connect to `https://edgebook-mcp.alexdubelko.workers.dev/mcp`. Connections made to that URL keep working after the custom domain goes live, so there is nothing to redo later.
</Note>

The transport is Streamable HTTP.

## Authentication

Authentication is OAuth 2.1. When your client first connects, it opens an EdgeBook sign-in page where you enter your password or request a one-time email code, followed by an approval screen listing the permissions the client asked for. Approve it once and the client stores the grant. EdgeBook never issues an API key for this integration.

| Scope | Access |
| - | - |
| `edgebook:read` | Read journal entries and trading configuration |
| `edgebook:write` | Create and update entries |
| `edgebook:images` | Upload and retrieve chart images |
| `edgebook:archive` | Archive trades. Must be requested explicitly and approved separately |

A client that requests no specific scopes gets read, write, and image access. Archive access is never granted by default.

Sessions refresh in the background. If a tool replies `Session expired`, reconnect the server in your client and sign in again.

## Set up your client

<AccordionGroup>
  <Accordion title="Claude (claude.ai and desktop)" icon="message">
    On Free, Pro, and Max, open **Customize** > **Connectors** > **Add custom connector** and paste the endpoint. Free accounts are limited to one custom connector.

    On Team and Enterprise, an Owner adds it for the whole organization under **Organization settings** > **Connectors**.

    To skip the menus, open this link and confirm the dialog:

    ```text theme={null}
    https://claude.ai/customize/connectors?modal=add-custom-connector&connectorName=EdgeBook&connectorUrl=https%3A%2F%2Fedgebook-mcp.alexdubelko.workers.dev%2Fmcp
    ```
  </Accordion>

  <Accordion title="Claude Code" icon="terminal">
    ```bash theme={null}
    claude mcp add --transport http edgebook https://edgebook-mcp.alexdubelko.workers.dev/mcp
    ```

    Then run `/mcp` inside Claude Code, select EdgeBook, and complete the browser sign-in.

    Add `--scope user` to the command to make EdgeBook available in every project instead of only the current one.
  </Accordion>

  <Accordion title="ChatGPT" icon="robot">
    Custom MCP servers sit behind developer mode, and what you get depends on your plan. Business, Enterprise, and Edu accounts get the full read and write tool set. Pro accounts can connect but only see read-only tools. Free and Plus accounts cannot add custom MCP servers today.

    On Business and Enterprise, turn on developer mode under **Settings** > **Apps** > **Advanced settings**. On other eligible plans, it is under **Settings** > **Security and login** > **Developer mode**. Add the endpoint as a new connector and sign in when prompted.
  </Accordion>

  <Accordion title="Cursor" icon="i-cursor">
    Open **Settings** > **MCP** > **Add server**, choose the HTTP type, paste the endpoint, and sign in when the OAuth window appears.

    Or use the install deeplink:

    ```text theme={null}
    cursor://anysphere.cursor-deeplink/mcp/install?name=edgebook&config=eyJ1cmwiOiJodHRwczovL2VkZ2Vib29rLW1jcC5hbGV4ZHViZWxrby53b3JrZXJzLmRldi9tY3AifQ==
    ```

    The `config` value is the base64 encoding of `{"url":"https://edgebook-mcp.alexdubelko.workers.dev/mcp"}`.
  </Accordion>

  <Accordion title="VS Code (GitHub Copilot)" icon="code">
    Create `.vscode/mcp.json` in your workspace:

    ```json theme={null}
    {
      "servers": {
        "edgebook": {
          "type": "http",
          "url": "https://edgebook-mcp.alexdubelko.workers.dev/mcp"
        }
      }
    }
    ```

    Start the server from the editor and approve the OAuth prompt. Copilot's agent mode then lists the EdgeBook tools.
  </Accordion>

  <Accordion title="Windsurf" icon="wind">
    Add EdgeBook as a custom MCP server in Windsurf's MCP settings, choose the HTTP transport, and paste the endpoint. Windsurf opens the EdgeBook sign-in page on the first tool call.
  </Accordion>

  <Accordion title="Perplexity" icon="magnifying-glass">
    Remote connectors are available on Pro, Max, and Enterprise. Add a custom connector, paste the endpoint, and complete the sign-in and approval screens.
  </Accordion>

  <Accordion title="Gemini CLI" icon="gem">
    Add the server to your Gemini CLI settings file:

    ```json theme={null}
    {
      "mcpServers": {
        "edgebook": {
          "httpUrl": "https://edgebook-mcp.alexdubelko.workers.dev/mcp",
          "authProviderType": "dynamic_discovery"
        }
      }
    }
    ```

    Restart the CLI and complete the browser sign-in. Run `/mcp` to check that EdgeBook is connected.
  </Accordion>

  <Accordion title="Zapier and n8n" icon="diagram-project">
    Both can act as MCP clients. Add EdgeBook as a remote MCP server, choose Streamable HTTP as the transport, paste the endpoint, and finish OAuth in the popup. The EdgeBook tools then appear as steps you can call from a Zap or a workflow node.
  </Accordion>

  <Accordion title="Any other client" icon="puzzle-piece">
    A client works with EdgeBook if it supports Streamable HTTP and OAuth 2.1 with dynamic client registration. No manual client ID or secret is needed.

    Discovery metadata is published at:

    ```text theme={null}
    https://edgebook-mcp.alexdubelko.workers.dev/.well-known/oauth-protected-resource
    ```
  </Accordion>
</AccordionGroup>

## What an exchange looks like

**You:** took NVDA long off the 5 min at 870.20, stopped at 865, out at 895 on the daily resistance, EMA pullback setup, 200 shares

**Agent:** I'll create a long NVDA trade: entry 870.20, exit 895, stop 865, 200 shares, 5m timeframe, linked to your EMA Pullback setup. What date should I put on it?

**You:** yesterday

**Agent:** Done. The trade is in your journal under yesterday's date with the EMA Pullback setup attached. If you want the chart on it, open this link and drop or paste the screenshot: `https://edgebook-mcp…/upload/…` (it works once and expires in 15 minutes).

## Adding chart screenshots

AI chat apps don't pass the images you attach in a conversation on to connected tools. So when you want a screenshot on a trade, the agent sends you a single-use upload link instead. Open it, then drop, paste, or choose the image. The link works once and expires after 15 minutes.

Other ways to add an image:

* **A TradingView snapshot link.** Paste the "copy link" snapshot URL (`https://www.tradingview.com/x/…/`) and the agent saves the image itself.
* **Any public image link.** Paste a direct `https://` link to a PNG, JPEG, WebP, or GIF up to 5 MB.
* **ChatGPT.** Files you upload in ChatGPT reach the tool directly.
* **Claude Code and other agents that can run commands.** They can upload a file from your computer to the upload link with `curl`.

If the trade doesn't exist yet, the agent can upload the screenshot first, read the symbol and timeframe from it, and attach it when it saves the trade.

## Comments and shared trades

The agent can read and write the same discussions you see in EdgeBook:

* Comments on trades, setups, and saved views, including replies in a thread.
* Items other people shared with you. The agent can open a shared trade or setup and comment on it if you're a commenter.
* Your notifications: new comments on your items, and shares you received.

Comments the agent writes on your own items are private notes by default, visible only to you. Ask for a shared comment when you want the people the item is shared with to see it; shared comments notify them. On someone else's item, every comment is shared. Other people's comments come back labelled with who wrote them, and the agent is told to treat them as information, not instructions.

## Tools

| Tool | What it does | Scope |
| - | - | - |
| `get_trading_context` | Lists your symbols, setups, strategies, scans, tags, themes, traders, statuses, execution types, and rule and definition categories | `edgebook:read` |
| `create_trade` | Creates a trade entry, including position and stop prices | `edgebook:write` |
| `update_trade` | Updates fields, position and stop data, or linked themes without deleting the trade | `edgebook:write` |
| `list_trades` | Searches active trades with pagination | `edgebook:read` |
| `get_trade` | Returns one trade in full: every field, notes as plain text, theme labels, the attached images, the newest comments with who wrote them, and your access. Also opens trades shared with you | `edgebook:read` |
| `get_trade_stats` | Exact counts by result, win rate, average rating, screenshot coverage, and top tags and symbols, with optional date and symbol filters | `edgebook:read` |
| `search_setups` | Searches your playbook by name or description and returns totals | `edgebook:read` |
| `get_setup` | Returns one setup in full with its entry and exit checklists, including setups shared with you | `edgebook:read` |
| `search_definitions` | Searches your glossary by term, variant, or definition text | `edgebook:read` |
| `search_research_candidates` | Searches the pre-trade Research watchlist by symbol, setup, stage, label, or text | `edgebook:read` |
| `get_research_candidate` | Returns one research candidate with thesis, criteria, levels, and recent activity | `edgebook:read` |
| `list_comments` | Reads the discussion on a trade, setup, or saved view, newest first, grouped by thread | `edgebook:read` |
| `list_shared_with_me` | Lists the trades, saved views, and setups other people shared with you, with your role | `edgebook:read` |
| `get_shared_view` | Lists the trades in a saved view someone shared with you | `edgebook:read` |
| `get_inbox` | Shows your notifications and the unread count | `edgebook:read` |
| `create_chart_upload_link` | Creates a single-use link where you drop, paste, or choose a chart screenshot | `edgebook:images` |
| `get_chart_upload` | Checks whether an upload link has been used | `edgebook:images` |
| `upload_chart_image` | Saves an image from a public link (TradingView snapshot links work) or a ChatGPT upload, onto a trade or held for a trade about to be created | `edgebook:images` |
| `get_trade_images` | Returns a trade's chart images, three at a time | `edgebook:images` |
| `update_trade_image` | Changes an image's caption or makes it the trade's cover | `edgebook:images` |
| `delete_trade_image` | Removes a chart image after you confirm | `edgebook:images` |
| `draft_trade_from_notes` | Turns messy free-text notes into a structured draft with per-field confidence, evidence, and a list of fields to ask you about. Uses EdgeBook AI credits (about 0.1 per call) and never writes to the journal | `edgebook:read` |
| `analyze_chart_image` | Reads the symbol, direction, chart timeframe, and date from a chart screenshot, before or after the trade exists, with confidence and evidence. Uses a small amount of EdgeBook AI credits | `edgebook:images` |
| `delete_trade` | Archives a trade through the audited soft-delete RPC | `edgebook:archive` |
| `create_setup` | Creates a playbook setup with an optional strategy and entry/exit checklists | `edgebook:write` |
| `update_setup` | Updates setup fields. A supplied checklist replaces the existing one | `edgebook:write` |
| `create_strategy` | Creates a strategy bucket and rejects duplicate names | `edgebook:write` |
| `create_scan` | Creates a scan, indicator, or watchlist with optional setup links | `edgebook:write` |
| `update_scan` | Updates scan fields. Supplied setup links replace the existing links | `edgebook:write` |
| `add_trading_rule` | Appends a personal trading rule to your playbook | `edgebook:write` |
| `update_trading_rule` | Edits, reorders, retires, or reactivates a trading rule | `edgebook:write` |
| `log_market_posture` | Upserts the daily green, yellow, or red market-environment log | `edgebook:write` |
| `create_definition` | Adds a dictionary term with variants and a category, checked for collisions | `edgebook:write` |
| `add_comment` | Comments on a trade, setup, or saved view, or replies in a thread. Private by default on your own items | `edgebook:write` |
| `delete_comment` | Removes a comment you wrote, or any comment on your own item, after you confirm | `edgebook:write` |
| `mark_notifications_read` | Marks some or all notifications read | `edgebook:write` |
| `create_saved_view` | Creates a named filter in the Trades sidebar from symbols, tags, results, rating, and dates | `edgebook:write` |
| `create_research_candidate` | Adds a symbol to the Research watchlist; a linked setup's entry checklist becomes its criteria | `edgebook:write` |
| `update_research_candidate` | Updates a research candidate's stage, priority, labels, thesis, notes, or linked setup | `edgebook:write` |

## Writing notes an agent can use

Give the agent the symbol, the direction, the entry, the exit, the stop, the date, and the chart timeframe. Everything else it can look up or ask about.

State the timeframe as a number: `5m`, `15m`, `1H`, `4H`, or "the daily chart". Words like scalp and swing describe your intent rather than a chart, so the agent will stop and ask which timeframe you were reading.

<Tip>
  Use the setup and strategy names you already have in EdgeBook. The agent reads them through `get_trading_context`, so an exact name links the trade to your playbook instead of creating a near-duplicate.
</Tip>

## Troubleshooting

| Symptom | What to do |
| - | - |
| A `401`, or a tool replying `Session expired` | Reconnect EdgeBook in your client and sign in again |
| `This connection does not grant edgebook:archive` | Reconnect and approve the archive scope. It is never included by default |
| `Rate limit exceeded` | The server allows 60 tool calls per minute per user. Wait the number of seconds given in the message |
| A tool you expect is missing in ChatGPT | Plan gating. Pro sees read-only tools, and Free and Plus cannot use custom MCP servers |
| `Client not found` after the connection sat idle for a long time | Remove the connector and add it again |
| An upload link says it has expired | Links last 15 minutes and work once. Ask the agent for a new one |
| `You have view-only access` when commenting on a shared item | The owner shared it with you as a viewer. Ask them to make you a commenter |

## Privacy and terms

Every tool call runs as the EdgeBook user who signed in, with the same permissions you have in the app. An agent can read and change only what you can read and change yourself. For items other people shared with you, that includes their shared fields and comments, and nothing else from their journal.

An upload link carries a one-time secret after the `#` in the address. Anyone who has the link can add one image to the trade it was made for until it's used or expires, so don't share it.

EdgeBook does not receive your AI client's model credentials or API keys. The only thing exchanged is the OAuth grant you approved.

Read the [privacy policy](https://www.edgebook.io/privacy) and the [terms of service](https://www.edgebook.io/terms).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.