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

# MCP Integration — Use the Docs from Your AI Assistant

> Connect Claude Desktop, Cursor, Continue, Cline, or Windsurf directly to the unCoded documentation. Search, read, and reference docs from inside your AI workflow without copy-paste. URL: https://uncoded.ch/docs/mcp

<Info>
  **The unCoded documentation is exposed as a hosted MCP (Model Context Protocol) server.** Any MCP-capable AI client can connect to the server URL and gain two tools: `search_un_coded` (semantic search) and `query_docs_filesystem_un_coded` (read-only sandbox filesystem with the full doc tree). The result: ask your AI assistant a question about unCoded — operating modes, exchange quirks, error codes, parameter values — and it pulls the answer from the live, current documentation instead of guessing from training data.
</Info>

## Why use the MCP integration

The unCoded docs are extensive. There are nine pre-built modes, seventeen hand-tuned exchanges, dozens of indicators, and a long list of operational nuances (rate limits, recvWindow, sub-account behavior, fee schedules, regional restrictions). Pulling the right snippet at the right time matters — and copy-pasting from a browser tab into your AI chat every time you have a question is friction.

The MCP integration removes that friction. Once configured, your AI client knows the docs exist, knows how to query them, and pulls the relevant parts on demand. You ask a natural-language question — *"how much capital should I allocate to BasicMode on Bybit?"*, *"what's the right API permission set for Coinbase?"*, *"why does the bot warn about recvWindow?"* — and the AI answers from the docs themselves, with direct page references.

This is especially useful for three workflows:

<CardGroup cols={2}>
  <Card title="Operator daily-driver" icon="user">
    You run unCoded and need fast answers while configuring or debugging. The AI looks up the exact value, error code, or step instead of you searching manually.
  </Card>

  <Card title="Coding-assist around unCoded" icon="code">
    You're writing scripts, monitoring tooling, or webhook integrations that interact with unCoded. The AI pulls the relevant docs and produces code that matches the real conventions.
  </Card>

  <Card title="Onboarding new operators" icon="seedling">
    A new team member can ask the AI any unCoded question and get accurate, current answers with sources — instead of needing senior operators to answer the same questions repeatedly.
  </Card>

  <Card title="Cross-document reasoning" icon="diagram-project">
    Questions that span multiple pages (e.g., comparing two exchanges, or combining mode + risk-management info) get answered in one go — the AI reads what it needs.
  </Card>
</CardGroup>

## When NOT to use it

<Warning>
  * ❌ **As a substitute for reading the core docs once through.** The MCP server is a lookup tool, not a tutorial. New operators should still read the [Quickstart](/quickstart) and the recommended [Binance setup](/exchanges/binance) end-to-end.
  * ❌ **For account-specific questions.** The MCP server has no access to your account, your API keys, your trade history, or your bot's logs. It only sees the public documentation. Questions like *"why did my bot place this trade?"* require your own logs and dashboards, not the docs.
  * ❌ **For up-to-the-minute market data.** The docs describe the system; they don't contain live prices, fee changes the exchange announced yesterday, or current network conditions. Verify time-sensitive specifics on the exchange directly.
  * ❌ **As an authoritative source for legal/tax advice.** The docs explain unCoded's tax-export feature and operational implications. They are not legal counsel.
</Warning>

## What the MCP server exposes

Two tools, with deliberately different jobs.

<AccordionGroup>
  <Accordion title="search_un_coded — semantic search across all pages" icon="magnifying-glass">
    **What it does:** Takes a natural-language query and returns the most relevant doc chunks, each with its title and the path to its source page.

    **When the AI uses it:** For conceptual or open-ended questions where you'd otherwise scroll through several pages to find the right one. Examples:

    * *"how does the kill switch work?"*
    * *"what's the difference between BasicMode and FullBullMarket?"*
    * *"explain trailing stop-loss"*

    **What you get back:** Snippets, not full pages. If the AI needs the complete page to answer accurately, it follows up with `query_docs_filesystem_un_coded` to read it.
  </Accordion>

  <Accordion title="query_docs_filesystem_un_coded — read-only doc sandbox" icon="folder-tree">
    **What it does:** Exposes a virtual, read-only filesystem rooted at `/`, containing every `.mdx` page and the OpenAPI spec. The AI runs shell-like commands (`tree`, `ls`, `cat`, `head`, `tail`, `rg`, `grep`, `find`, `wc`, `jq`) against it.

    **When the AI uses it:** For exact-keyword matching, structural exploration, or full-page reads. Examples:

    * `tree / -L 2` — see the doc structure
    * `rg -il "recvWindow" /` — find every page mentioning a specific term
    * `cat /exchanges/binance.mdx` — read a complete page
    * `head -80 /exchanges/binance.mdx /exchanges/bybit.mdx` — compare two pages in one call
    * `rg -C 3 "API_UID" /exchanges/` — show matches with surrounding context

    **What it is NOT:** Not a real shell. There's no network, no writes, no process control, no access to your machine. It's a sandboxed in-memory filesystem that contains only the documentation.
  </Accordion>
</AccordionGroup>

## Setup — by client

The MCP server URL is the same for every client. Find it in your Mintlify dashboard preview (the URL displayed beside *"Hosted MCP server"*). Once you have the URL, the configuration is per-client.

<AccordionGroup>
  <Accordion title="Claude Desktop" icon="message">
    **Config file location:**

    * macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
    * Windows: `%APPDATA%\Claude\claude_desktop_config.json`
    * Linux: `~/.config/Claude/claude_desktop_config.json`

    **Add to the `mcpServers` block:**

    ```json theme={null}
    {
      "mcpServers": {
        "uncoded-docs": {
          "url": "https://uncoded.ch/docs/mcp"
        }
      }
    }
    ```

    Restart Claude Desktop. The two tools should appear in the tool indicator (slider icon in the input area). Ask a test question like *"what's the recvWindow value unCoded uses?"* — Claude should call the MCP tool and answer with a doc reference.

    **Note:** Older Claude Desktop versions used a `command` + `args` pattern with a local stdio bridge. The hosted MCP works directly via the `url` field — no bridge needed.
  </Accordion>

  <Accordion title="Cursor" icon="code">
    **Cursor settings → MCP → Add new server.**

    * Name: `uncoded-docs`
    * URL: [https://uncoded.ch/docs/mcp](https://uncoded.ch/docs/mcp)
    * Type: HTTP (hosted MCP)

    Save. Cursor's chat panel will list the new tools under the available-tools section. Test by asking *"how do I configure Bitvavo for EU operators?"* — Cursor's AI should pull from the docs and produce the answer with a page reference.

    **Codebase + docs combined:** Cursor can use both your local codebase context and the unCoded docs simultaneously. Useful when writing scripts that interact with the bot's outputs.
  </Accordion>

  <Accordion title="Continue (VS Code / JetBrains)" icon="puzzle-piece">
    Edit `~/.continue/config.json` (or the project-local `.continue/config.json`):

    ```json theme={null}
    {
      "experimental": {
        "modelContextProtocolServers": [
          {
            "transport": {
              "type": "http",
              "url": "https://uncoded.ch/docs/mcp"
            }
          }
        ]
      }
    }
    ```

    Reload the Continue panel. The tools surface under the model's available actions.
  </Accordion>

  <Accordion title="Cline (autonomous coding agent)" icon="robot">
    Open Cline's MCP settings panel. Add a new server:

    * Name: `uncoded-docs`
    * Type: `http` or `sse` (whichever the Cline version supports for hosted MCP)
    * URL: [https://uncoded.ch/docs/mcp](https://uncoded.ch/docs/mcp)

    Cline can then autonomously read the docs while it works on multi-step tasks (e.g., *"set up a monitoring script that respects unCoded's rate limits"*).
  </Accordion>

  <Accordion title="Windsurf" icon="wind">
    Windsurf settings → AI / Cascade → MCP servers → Add. Use the same URL. Restart the Cascade panel.
  </Accordion>

  <Accordion title="Other MCP-capable clients" icon="ellipsis">
    Any client that implements the MCP HTTP transport can connect. Look for an *"MCP servers"* or *"Model Context Protocol"* section in settings. The only required input is the server URL — no API key, no auth token. The server is read-only and serves only the public documentation.
  </Accordion>
</AccordionGroup>

## Workflow examples

These are real prompts and what happens behind the scenes. The AI is making the tool calls — you only type the natural-language question.

<AccordionGroup>
  <Accordion title="Workflow A — quick conceptual question" icon="circle-question">
    **You:** *"What's the difference between Stop-Loss and Trailing Stop-Loss in unCoded?"*

    **Behind the scenes:**

    1. AI calls `search_un_coded("stop loss trailing")` → gets snippets from `/risk-management/stop-loss-and-trailing.mdx` and a couple of related pages.
    2. AI decides the page-level context is enough — answers directly from the snippets.
    3. AI cites the page so you can read further.

    **Cost:** 1 tool call. \~1 second.
  </Accordion>

  <Accordion title="Workflow B — exact value lookup" icon="bullseye">
    **You:** *"What rate limit does unCoded apply on Binance?"*

    **Behind the scenes:**

    1. AI calls `rg -C 3 "rate limit" /exchanges/binance.mdx` → gets the exact line with surrounding context.
    2. AI answers: *"50 orders per 10 seconds — the maximum the exchange permits. See [Binance setup](/exchanges/binance)."*

    **Cost:** 1 tool call. Targeted; no wasted context window.
  </Accordion>

  <Accordion title="Workflow C — multi-page comparison" icon="diagram-project">
    **You:** *"Should I use Bitvavo or Bybit EU as my primary EU venue?"*

    **Behind the scenes:**

    1. AI calls `head -100 /exchanges/bitvavo.mdx /exchanges/bybiteu.mdx` (batched in one call).
    2. AI extracts the relevant differentiators (EUR-quoted vs. USDT-quoted, fee structure, MiCA stance, listing breadth).
    3. AI presents a side-by-side answer with a recommendation framework.

    **Cost:** 1 tool call instead of 2. Token-efficient.
  </Accordion>

  <Accordion title="Workflow D — coding-assist with doc-aware constraints" icon="code">
    **You (in Cursor):** *"Write a Python script that polls unCoded's dashboard endpoint every 30 seconds and alerts me if the bot stops trading."*

    **Behind the scenes:**

    1. AI calls `cat /modules/dashboard.mdx` → reads the dashboard's endpoint structure.
    2. AI calls `cat /operations/monitoring.mdx` → understands what "stopped trading" looks like in metrics.
    3. AI generates the script using the actual endpoint paths and the documented "trade stalled" signals.

    **Cost:** 2 targeted reads. Result: code that matches the real system, not invented endpoint names.
  </Accordion>

  <Accordion title="Workflow E — error-code triage" icon="circle-exclamation">
    **You:** *"My bot is throwing -2015 on Binance. What does that mean?"*

    **Behind the scenes:**

    1. AI calls `rg -C 5 "\-2015" /` → gets the exact section in `/troubleshooting/error-codes.mdx`.
    2. AI answers with the meaning, root cause, and the recommended fix steps.

    **Cost:** 1 tool call. Faster than the operator manually opening the troubleshooting page.
  </Accordion>

  <Accordion title="Workflow F — structural exploration" icon="folder-tree">
    **You:** *"What pages exist about backtesting?"*

    **Behind the scenes:**

    1. AI calls `tree /backtesting -L 2` → gets the directory structure.
    2. AI lists the pages with a one-line summary each.

    **Cost:** 1 tool call. Useful when the operator doesn't know what's available.
  </Accordion>
</AccordionGroup>

## Operator best practices

<Tip>
  * ✅ **Phrase questions naturally** — the AI is good at translating natural language into the right tool call. You don't need to write `rg -i "..."` yourself.
  * ✅ **Ask for sources** — *"…and link the page"* prompts the AI to cite the doc path so you can verify.
  * ✅ **Use it for exact values** — *"what's the default `recvWindow`?"* is more reliable through MCP than through the AI's training memory.
  * ✅ **Combine with your own context** — in Cursor, the AI can read both the unCoded docs AND your local repo. *"Update my monitoring script to respect unCoded's documented rate limits"* uses both sources.
  * ✅ **Trust but verify time-sensitive items** — exchange fee schedules and regional restrictions change. Confirm on the exchange directly for anything time-sensitive.
  * ✅ **Don't share API keys or account state with the AI through MCP** — the MCP server doesn't need them, and the AI shouldn't see them. Keep operational state in your own logs and dashboards.
</Tip>

## Limitations

<AccordionGroup>
  <Accordion title="Stateless calls" icon="repeat">
    Each tool call resets to `/` and forgets shell variables. The AI can't `cd /exchanges` in one call and then `ls` in the next call expecting to be in `/exchanges`. It works around this by using absolute paths or chaining commands with `&&`.

    **Operator implication:** None — this is the AI's problem, not yours. But it explains why the AI sometimes runs the same `ls /exchanges` multiple times across calls.
  </Accordion>

  <Accordion title="30 KB output cap per call" icon="weight-scale">
    Mintlify's MCP truncates each tool response at 30 KB. For large pages (the parameters reference, the glossary), the AI must use `head -N` or `rg -C` rather than blind `cat`.

    **Operator implication:** Sometimes the AI's first read won't include the section you care about. A follow-up question that names the section directly fixes this.
  </Accordion>

  <Accordion title="Public docs only" icon="lock">
    The MCP server has no access to:

    * Your account, your API keys, your trade history.
    * Internal-only docs, beta-feature docs, or anything not published to `docs.uncoded.io`.
    * Your bot's logs, your dashboard, your Telegram messages.

    **Operator implication:** For account-specific questions, use your dashboard, logs, and Telegram alerts directly. The MCP server is for the documentation, not for live state.
  </Accordion>

  <Accordion title="No write capability" icon="ban">
    The AI cannot edit the docs through MCP. If the AI says *"I'll update the page for you"* — it can't. The docs are read-only from the MCP perspective. Doc edits go through the normal Mintlify publishing flow.
  </Accordion>

  <Accordion title="Doc index lag after publishing" icon="clock">
    After a doc update is published to `docs.uncoded.io`, the MCP server's index typically catches up within minutes. There can be brief windows where the live doc shows new content but the MCP search hasn't re-indexed yet. Direct `cat /path/to/page.mdx` reads update faster than `search_un_coded`.
  </Accordion>

  <Accordion title="No live exchange data" icon="signal">
    The docs describe how unCoded interacts with exchanges. They don't contain live order books, current fees, or yesterday's announcements. For real-time data, the bot itself queries the exchanges directly — the MCP server is for the documentation about that interaction.
  </Accordion>
</AccordionGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="The two unCoded tools don't appear in my client" icon="circle-exclamation">
    **Likely causes:**

    * Client wasn't restarted after the config change. Most MCP clients only pick up new servers on full restart, not just reload.
    * URL has a typo. The path is `/mcp` (no trailing slash typically). Verify against the dashboard.
    * Client doesn't support the HTTP MCP transport. Older versions of some clients required a stdio bridge — upgrade the client.

    **Fix:** Restart the client, verify the URL, check the client's MCP-server logs (most clients have a *"View logs"* option in the MCP settings).
  </Accordion>

  <Accordion title="Tool calls fail with timeout" icon="clock">
    Network restrictions can block hosted-MCP traffic. If you're behind a corporate firewall:

    1. Whitelist `docs.uncoded.io`.
    2. Check that your client can reach the URL via plain HTTPS (a `curl` to the docs URL should succeed).

    The MCP server itself is hosted by Mintlify and has high availability — sustained timeouts almost always indicate a client-side network issue.
  </Accordion>

  <Accordion title="The AI gives answers that don't match the live docs" icon="triangle-exclamation">
    Possible causes, in order of likelihood:

    1. **The AI didn't actually call the MCP tool** — it answered from its training memory. Look at the tool-call indicator in your client. If no MCP call happened, prompt explicitly: *"Use the unCoded MCP tool to look this up — I want a current answer."*
    2. **Indexing lag** after a recent doc publish. Try a direct `cat /path.mdx` in the AI's prompt; that bypasses the search index.
    3. **Snippet truncation** — the AI got a partial snippet and inferred the rest. Ask for a follow-up read of the full page.
  </Accordion>

  <Accordion title="The AI keeps reading the same page repeatedly" icon="repeat">
    Each MCP call is stateless — the AI can't cache reads across calls within the same conversation in some clients. This is a client-implementation detail, not a server bug.

    **Mitigation:** None on the server side. Some clients (Cursor, Claude Desktop) cache MCP responses per-conversation; others don't.
  </Accordion>

  <Accordion title="I want to test the server without an AI client" icon="flask">
    The MCP server speaks the standard MCP HTTP protocol. You can test it with any MCP debug tool — Mintlify's dashboard has a built-in tool preview that shows the same tools your AI client will see, and lets you run them manually for inspection.

    For programmatic testing, use the official MCP Inspector tool from the MCP project. Pass the same URL.
  </Accordion>
</AccordionGroup>

## Privacy and security

<AccordionGroup>
  <Accordion title="What the MCP server sees" icon="eye">
    The server sees your tool-call queries (the search terms, the file paths). It does **not** see:

    * Your AI client's other context (your codebase, your other open chats).
    * Your account information, API keys, or any trading state.
    * Anything from your machine outside what your AI client explicitly sends as a query.

    Mintlify's MCP server logs queries for analytics and abuse prevention per their hosting terms. Treat queries as roughly equivalent in sensitivity to a search query on a public docs website.
  </Accordion>

  <Accordion title="What the AI client sees" icon="robot">
    Your AI client (Claude Desktop, Cursor, etc.) sees the responses from the MCP server — the doc snippets and page contents. This data is part of your conversation context with the AI vendor (Anthropic for Claude, etc.) and is governed by their data-handling policies.

    **Operator implication:** The doc content is public, so this is generally not a sensitivity concern. If you're using an AI client with strict context-isolation (e.g., enterprise Cursor on private models), MCP responses are subject to the same isolation.
  </Accordion>

  <Accordion title="No authentication required" icon="unlock">
    The unCoded MCP server is **public read-only** — no API key, no auth token. The reasoning: the docs are already public on `docs.uncoded.io`. Adding auth would only add friction without adding security.

    **Important:** Because there's no auth, anyone can connect. This is fine for public docs; it would not be fine for private MCP servers (e.g., one exposing your trading account). If you build your own MCP servers around unCoded operations, treat auth as mandatory.
  </Accordion>
</AccordionGroup>

## TL;DR

* ✅ **The unCoded docs are exposed via MCP** — Claude Desktop, Cursor, Continue, Cline, Windsurf, and any MCP-capable client can connect with one URL.
* ✅ **Two tools available**: semantic search (`search_un_coded`) for conceptual queries; read-only filesystem (`query_docs_filesystem_un_coded`) for exact-match and full-page reads.
* ✅ **Setup is one config-file edit + restart** per client. No API key required.
* ✅ **Best for** quick lookups, exact-value retrieval, multi-page comparisons, and coding-assist that needs to respect documented constraints.
* ✅ **Not for** account-specific state, live exchange data, or replacing initial onboarding reading.
* ✅ **Stateless calls, 30 KB output cap, public-only** — these are the main operational limits to be aware of.
* ✅ **No writes possible** — the AI can't change the docs. Doc updates go through the normal Mintlify publishing flow.

## What's next

<CardGroup cols={2}>
  <Card title="Daily operations" icon="calendar-day" href="/daily-operations">
    The operator's day-to-day workflow — pairs naturally with MCP for in-flight lookups.
  </Card>

  <Card title="Monitoring" icon="chart-line" href="/monitoring">
    What the bot's metrics look like and how to interpret alerts.
  </Card>

  <Card title="Support" icon="life-ring" href="/support">
    When MCP isn't enough — escalation paths and human support channels.
  </Card>

  <Card title="Common issues" icon="circle-exclamation" href="/common-issues">
    The first place the AI will land when triaging a problem you describe.
  </Card>

  <Card title="Glossary" icon="book" href="/glossary">
    The MCP server indexes the glossary too — useful for term lookups via natural language.
  </Card>

  <Card title="API key security" icon="shield" href="/api-key-security">
    Keep this in mind: the MCP server has no access to keys. Your operational hygiene applies as always.
  </Card>
</CardGroup>
