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

# MCP Server

> The knowledge harness for AI-native finance — drop in once, every agent picks it up.

<Note icon="sparkles">
  **`@llmquant/data-mcp`** — one config gives every MCP-compatible agent access to 26 financial and personal-context tools. Source on [`LLMQuant/data-mcp`](https://github.com/LLMQuant/data-mcp).
</Note>

<Badge color="green" icon="circle-check">Live</Badge>
 
<Badge color="blue" size="sm">npm · @llmquant/data-mcp</Badge>

## Why MCP

LLMQuant Data is built **agent-first**. The REST API exists as a fallback; the canonical interface is the [Model Context Protocol](https://modelcontextprotocol.io) — a standard that lets any agent runtime (Claude, Cursor, Codex, Gemini CLI, OpenClaw, ChatGPT custom GPTs…) **call our data tools natively**, with structured arguments and typed results, no glue code.

<Tip>
  **Configure once — every environment below picks it up.**
</Tip>

## Where it runs

<Columns cols={3}>
  <Card title="Chatbots" icon="message">
    ChatGPT · Claude · Cursor
  </Card>

  <Card title="Agent CLIs" icon="terminal">
    Claude Code · Codex · Gemini CLI · OpenClaw
  </Card>

  <Card title="SDKs" icon="code">
    LangGraph · Google ADK · Vercel AI SDK
  </Card>
</Columns>

If your runtime speaks MCP, LLMQuant Data is one config away.

## Remote connectors

Claude web, Claude iOS, and other cloud-hosted agents cannot run a local `npx` stdio server. Use the hosted Streamable HTTP endpoint instead:

<Steps>
  <Step title="Generate a Remote MCP URL" icon="link">
    Sign in to the [Dashboard](https://llmquantdata.com/dashboard) → **Connect** → **Remote MCP URL**. Copy the URL once when it is created.

    ```text theme={null}
    https://mcp.llmquantdata.com/u/lqd_mcp_.../mcp
    ```
  </Step>

  <Step title="Paste it into Claude custom connectors" icon="plug">
    Choose Claude's **No Authentication** connector mode and paste the full URL. The token lives in the URL path, is stored hashed by LLMQuant Data, and can be revoked from the Dashboard without rotating your API key.
  </Step>

  <Step title="Verify credit and revoke behavior" icon="circle-check">
    Run a paid search or read tool, confirm the Dashboard balance changes, then revoke a test URL and confirm it fails immediately.
  </Step>
</Steps>

<Note>
  Local desktop and CLI clients can keep using the stdio setup below. Remote URLs are for cloud clients and synced Claude connectors that need a public HTTPS MCP endpoint.
</Note>

## Quick setup

<Steps>
  <Step title="Get an API key" icon="key">
    Sign in to the [Dashboard](https://llmquantdata.com/dashboard) → **API Keys** → **Create API key**. Store it as an environment variable named `LLMQUANT_API_KEY`.
  </Step>

  <Step title="Add data-mcp to your client" icon="plug">
    **Drop this prompt into your agent — it will read the canonical setup from GitHub:**

    ```text theme={null}
    Install the LLMQuant data-mcp server in this environment by following https://github.com/LLMQuant/data-mcp
    ```

    <Accordion title="Or install manually" icon="terminal">
      Pick your runtime below. Each block is the canonical config — drop it in, save, restart the client.

      <Tabs>
        <Tab title="Claude Code">
          ```bash theme={null}
          claude mcp add llmquant-data \
            -e LLMQUANT_API_KEY=$LLMQUANT_API_KEY \
            -- npx -y @llmquant/data-mcp
          ```
        </Tab>

        <Tab title="Cursor">
          Add to `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (global):
          JSON config files usually do not expand shell variables, so paste your actual API key value.

          ```json title=".cursor/mcp.json" theme={null}
          {
            "mcpServers": {
              "llmquant-data": {
                "command": "npx",
                "args": ["-y", "@llmquant/data-mcp"],
                "env": {
                  "LLMQUANT_API_KEY": "your_api_key_here"
                }
              }
            }
          }
          ```
        </Tab>

        <Tab title="Codex CLI">
          ```bash theme={null}
          codex mcp add llmquant-data \
            --env LLMQUANT_API_KEY=$LLMQUANT_API_KEY \
            -- npx -y @llmquant/data-mcp
          ```
        </Tab>

        <Tab title="Gemini CLI">
          ```bash theme={null}
          gemini mcp add -s user \
            -e LLMQUANT_API_KEY=$LLMQUANT_API_KEY \
            llmquant-data \
            npx -y @llmquant/data-mcp
          ```
        </Tab>

        <Tab title="Claude Desktop">
          Edit `claude_desktop_config.json` (macOS: `~/Library/Application Support/Claude/`):
          JSON config files usually do not expand shell variables, so paste your actual API key value.

          ```json title="claude_desktop_config.json" theme={null}
          {
            "mcpServers": {
              "llmquant-data": {
                "command": "npx",
                "args": ["-y", "@llmquant/data-mcp"],
                "env": {
                  "LLMQUANT_API_KEY": "your_api_key_here"
                }
              }
            }
          }
          ```
        </Tab>

        <Tab title="Other (stdio)">
          Any MCP client supporting stdio transport accepts this generic config:
          JSON config files usually do not expand shell variables, so paste your actual API key value.

          ```json theme={null}
          {
            "mcpServers": {
              "llmquant-data": {
                "command": "npx",
                "args": ["-y", "@llmquant/data-mcp"],
                "env": {
                  "LLMQUANT_API_KEY": "your_api_key_here"
                }
              }
            }
          }
          ```

          Don't see your client? [Open an issue](https://github.com/LLMQuant/data-mcp/issues) and we'll add it.
        </Tab>
      </Tabs>
    </Accordion>
  </Step>

  <Step title="Ask the agent something it should now know" icon="sparkles">
    Restart the client. Then drop one of these into any chat / agent session — the agent will discover the new tools, pick the right one, and return structured results.

    <Prompt description="Wiki two-step lookup">
      Search the Quant Wiki for "momentum factor" and read the top result.
    </Prompt>

    <Prompt description="Live crypto check">
      What's BTC trading at right now? And what's its 24h change?
    </Prompt>

    <Prompt description="Research discovery">
      Find recent papers on transformer-based factor models.
    </Prompt>
  </Step>
</Steps>

## Available tools

Each tool is one MCP capability the agent can invoke. Pricing is per-call, billed in credits.

| Tool                            | What it does                                                                                                                                              | Credits |
| ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | :-----: |
| `wiki_search`                   | Semantic search over 50,000+ Quant Wiki entries                                                                                                           |    1    |
| `wiki_read`                     | Load the full markdown body of a wiki item by ID                                                                                                          |    0    |
| `paper_search`                  | Semantic search over 1,200+ research paper summaries                                                                                                      |    1    |
| `paper_read`                    | Read specific sections of a paper (intro, methods, conclusion…)                                                                                           |    0    |
| `crypto_historical_klines`      | Crypto OHLCV candles with configurable interval                                                                                                           |    1    |
| `crypto_snapshot`               | Latest spot price + 24h stats for a crypto pair                                                                                                           |    0    |
| `polymarket_event_browse`       | List or exact-filter finance-scoped Prediction Markets events                                                                                             |    1    |
| `polymarket_event_search`       | Semantic search over finance-scoped Prediction Markets events                                                                                             |    2    |
| `polymarket_event_read`         | Read one Prediction Markets event card with child market previews                                                                                         |    0    |
| `polymarket_market_read`        | Read one Prediction Markets market card with outcomes and outcome token ids                                                                               |    0    |
| `polymarket_price_history`      | Hourly or daily implied-probability history for one outcome token                                                                                         |    0    |
| `equity_historical_prices`      | US equity daily OHLCV + dividend / split adjustments. Also serves ETF price history.                                                                      |    0    |
| `equity_intraday_prices`        | US equity `1h` regular-session OHLCV bars (recent N or short date range)                                                                                  |    1    |
| `etf_lookup`                    | ETF basic info + top holdings summary + sector / country / asset-type exposure                                                                            |    0    |
| `etf_holdings`                  | Full ETF holdings (latest available SEC regulatory disclosure snapshot, sorted by weight). Tickers outside coverage still return `200`, no credit charge. |    1    |
| `macro_indicator_search`        | Browse 50+ curated macro indicators                                                                                                                       |    0    |
| `macro_indicator_history`       | Historical observations for a macro series                                                                                                                |    1    |
| `macro_indicator_snapshot`      | Latest value for a macro indicator                                                                                                                        |    0    |
| `sec_filing_browse`             | Browse SEC 10-K / 10-Q / 8-K filing metadata                                                                                                              |    0    |
| `sec_filing_read`               | Read specific sections of a SEC filing                                                                                                                    |    1    |
| `sec_13f_list_manager_holdings` | A manager's 13F holdings (Top 1,000 × at least the last 4 quarters)                                                                                       |    1    |
| `sec_13f_list_ticker_holders`   | Institutional holders of a ticker (Top 1,000 × at least the last 4 quarters)                                                                              |    1    |
| `sec_13f_list_top_managers`     | Top N smart-money managers ranked by 13F reportable value                                                                                                 |    0    |
| `news_browse`                   | Browse recent company news by ticker, event, topic, or date                                                                                               |    2    |
| `personal_holdings`             | Read the holdings you saved in Dashboard → Profile (your own account only)                                                                                |    0    |
| `personal_profile`              | Read the financial profile you saved in Dashboard → Profile (your own account only)                                                                       |    0    |

<Tip>
  More data products, including fundamentals and earnings transcripts, are on the [roadmap](https://github.com/LLMQuant/data-mcp#roadmap).
</Tip>

## Environment variables

<ParamField path="LLMQUANT_API_KEY" type="string" required>
  Your LLMQuant Data API key. Generate at [Dashboard → API Keys](https://llmquantdata.com/dashboard).
</ParamField>

<ParamField path="LLMQUANT_BASE_URL" type="string" default="https://api.llmquantdata.com">
  Override the API base URL. Useful for self-hosted proxies or another compatible LLMQuant Data deployment.
</ParamField>

<ParamField path="LLMQUANT_API_TIMEOUT_MS" type="number" default={15000}>
  Request timeout in milliseconds. Max `120000`.
</ParamField>

## What's next

<Columns cols={2}>
  <Card title="Browse the data tools" icon="book-open" href="/en/api/knowledge/wiki-search">
    Each tool maps 1:1 to an endpoint page with `Agent flow` diagram + response schema.
  </Card>

  <Card title="Source on GitHub" icon="github" href="https://github.com/LLMQuant/data-mcp">
    Read the source, file an issue, and follow the roadmap.
  </Card>
</Columns>
