Cuebook MCP Server
Provides market intelligence including asset search, market state, cues, events, and paper trading via the Model Context Protocol.
README
<p align="center"> <a href="https://cuebook.xyz"> <img src="https://raw.githubusercontent.com/cuebook-public/cuebook-cli/main/assets/cuebook-cli-logo.png" width="200" alt="Cuebook CLI" /> </a> </p>
<h1 align="center">Cuebook CLI — market intelligence for humans and AI agents</h1>
<p align="center"> The official command-line interface for Cuebook. Bring sourced Cues, market context, catalysts, and safe paper-trading workflows into Codex, Claude Code, OpenClaw, scripts, or any terminal. </p>
<p align="center"> <a href="https://github.com/cuebook-public/cuebook-cli/releases/latest"> <img alt="Latest release" src="https://img.shields.io/github/v/release/cuebook-public/cuebook-cli?style=flat-square&color=F5C400" /> </a> <a href="https://github.com/cuebook-public/cuebook-cli/actions/workflows/ci.yml"> <img alt="CI status" src="https://img.shields.io/github/actions/workflow/status/cuebook-public/cuebook-cli/ci.yml?branch=main&style=flat-square&label=CI" /> </a> <img alt="Node.js 20 or newer" src="https://img.shields.io/badge/Node.js-%E2%89%A520-339933?style=flat-square&logo=nodedotjs&logoColor=white" /> <img alt="MCP over Streamable HTTP" src="https://img.shields.io/badge/MCP-Streamable_HTTP-F5C400?style=flat-square" /> <a href="LICENSE"> <img alt="MIT License" src="https://img.shields.io/badge/License-MIT-111111?style=flat-square" /> </a> </p>
<p align="center"> <a href="#quick-start">Quick Start</a> · <a href="#why-cuebook-cli">Why Cuebook CLI</a> · <a href="#commands">Commands</a> · <a href="#agent-workflows">Agent Workflows</a> · <a href="#write-safety">Write Safety</a> · <a href="#authentication">Authentication</a> · <a href="#troubleshooting">Troubleshooting</a> </p>
Overview
Every trade starts with a cue. cuebook (alias: cbk) makes Cuebook
available wherever you already work: a terminal, a script, or an AI coding
agent.
Use focused commands for everyday tasks, or discover and call the full Tool surface at runtime:
- resolve assets and inspect market state;
- read sourced Cues, themes, events, filings, and disclosures;
- explore reasoning graphs, positioning, calendars, and prediction markets;
- inspect a virtual portfolio and preview paper orders;
- return deterministic JSON for agents and automation.
No exchange API keys. No wallet credentials. No real-money execution.
Quick Start
Requirements
- Node.js 20 or newer
- A Cuebook account
Install
git clone https://github.com/cuebook-public/cuebook-cli.git
cd cuebook-cli
npm ci
npm run build
npm link
This installs both cuebook and the shorter cbk alias.
Connect your account
cuebook auth login
Your browser opens Cuebook. Review the request and approve it to connect the CLI.
Make your first calls
cuebook tools list
cuebook assets search bitcoin
cuebook market state btc
cuebook cues latest --asset btc
Why Cuebook CLI
| What an agent needs | How Cuebook CLI answers it |
|---|---|
| A surface it can learn at runtime | cuebook tools list returns the current Tool catalog |
| Commands it can compose without guessing | Focused verbs cover assets, market state, Cues, diagnostics, and paper trading |
| Output it can parse reliably | Global --json returns structured results and errors |
| Secure account access | OAuth 2.1, PKCE, and explicit browser approval |
| Safe behavior around new capabilities | Known reads run normally; writes and unknown Tools require --confirm |
| Network resilience without duplicate actions | Transient reads can retry; write calls never retry automatically |
The result is a small, self-describing command surface that works equally well for a person at the keyboard and an agent operating through a shell.
Commands
Command reference
| Command | Purpose |
|---|---|
cuebook auth login |
Connect the CLI to your Cuebook account |
cuebook auth status |
Check the current connection |
cuebook auth logout |
Remove local OAuth credentials |
cuebook connections |
Manage connected Agents |
cuebook tools list |
Discover available Tools |
cuebook assets search <query> |
Find an asset and its canonical ticker |
cuebook market state <tickers...> |
Read the latest market snapshot |
cuebook cues latest |
Read the newest Cues |
cuebook cues latest --asset <ticker> |
Read Cues for one asset |
cuebook paper portfolio |
Inspect your virtual portfolio |
cuebook paper preview <ticker> ... |
Preview a paper order |
cuebook call <tool> |
Call any available Tool |
cuebook doctor |
Diagnose authentication and connectivity |
Everyday examples
# Resolve an asset, then inspect its market state
cuebook assets search bitcoin
cuebook market state btc
# Read current market narratives
cuebook cues latest
cuebook cues latest --asset nvda --limit 5
# Preview a simulated order — nothing is placed
cuebook paper preview btc --side buy --notional-usd 100
# Read historical candles
cuebook call get_candles \
--input '{"ticker":"btc","interval":"1d"}'
# Read arguments from a JSON file
cuebook call get_reasoning_graph --file request.json
What you can explore
| Area | Capabilities |
|---|---|
| Assets and market | Asset search, market snapshots, historical candles |
| Cues and reasoning | Asset Cues, global timeline, themes, details, reasoning graphs |
| Events and research | Events, market briefings, news clusters, search, filings, disclosures |
| Positioning and catalysts | Positioning, market calendar, prediction markets, settlements |
| Paper trading | Virtual portfolio, order preview, paper orders, position closing, order history |
The available surface can evolve. cuebook tools list always shows the
current Tool names, descriptions, inputs, and safety classification.
Agent Workflows
Use the global --json flag whenever another program will consume the result:
cuebook --json assets search NVDA
cuebook --json cues latest --asset nvda
cuebook --json market state btc | jq -r '.data.quotes[0].price'
Output contract
| Exit code | Meaning |
|---|---|
0 |
Command completed successfully |
1 |
The command failed |
2 |
Authorization or explicit write confirmation is required |
JSON errors use a stable envelope:
{
"error": {
"message": "Cuebook authorization is required.",
"hint": "Run: cuebook auth login"
}
}
Generic Tool calls
cuebook call is the escape hatch for capabilities that do not yet have a
focused command:
cuebook call <tool> --input '{"key":"value"}'
cuebook call <tool> --file request.json
An agent can start with cuebook tools list, select a Tool, assemble its
arguments, and call it without relying on a hard-coded catalog.
Write Safety
Cuebook CLI fails closed around writes:
- Known read operations run normally.
- A write-capable or newly introduced Tool requires
--confirm. - Confirmed writes are sent once and never retried automatically.
- Paper-trading actions use virtual funds only.
# Blocked: explicit confirmation is missing
cuebook call place_paper_order --file order.json
# Sends one simulated paper order after review
cuebook call place_paper_order --file order.json --confirm
Confirmation is an additional client-side guard. Cuebook still applies the permissions, limits, idempotency rules, and validation required for each Tool.
Cuebook CLI cannot place real trades, transfer money, access an exchange account, or request exchange and wallet secrets.
Authentication
cuebook auth login uses OAuth 2.1 with PKCE and opens Cuebook in your
browser. Access is granted only after you approve the connection.
- Credentials are stored in an owner-only local file (
0600on Unix-like systems). - Set
CUEBOOK_CONFIG_DIRto choose a different credential directory. - Set
CUEBOOK_ACCESS_TOKENfor externally managed automation; the CLI never writes that value to disk. - Each authorized CLI uses one Agent connection.
- A Cuebook account can keep up to three active Agent connections.
Disconnect and release a slot
cuebook connections
Choose Disconnect next to the connection you no longer use. Local logout removes credentials from the current machine; disconnecting in Cuebook also releases the Agent slot.
Configuration
| Variable | Purpose |
|---|---|
CUEBOOK_MCP_URL |
Use a different MCP endpoint |
CUEBOOK_ACCESS_TOKEN |
Use an externally managed Bearer Token |
CUEBOOK_CONFIG_DIR |
Choose the local credential directory |
CUEBOOK_DEBUG=1 |
Print stack traces for CLI errors |
The default endpoint is https://cuebook.xyz/mcp.
Troubleshooting
Start with:
cuebook doctor
| Symptom | Resolution |
|---|---|
Cuebook authorization is required |
Run cuebook auth login and approve the request |
| Connection limit reached | Run cuebook connections and disconnect an unused Agent |
| OAuth callback port is busy | Run cuebook auth login --callback-port 53683 |
Persistent fetch failed |
Check TLS, proxy, VPN, and network access, then run cuebook doctor |
| Local logout did not free a slot | Disconnect the connection from cuebook connections |
cuebook doctor never prints OAuth tokens.
Development
npm ci
npm run check
The quality gate runs Biome, TypeScript checks, automated tests, a production build, a CLI smoke test, and an npm package dry run. CI covers Node.js 20, 22, and 24.
Read CONTRIBUTING.md before opening a pull request and SECURITY.md before reporting a vulnerability.
License and Disclaimer
Cuebook CLI is available under the MIT License.
Cuebook provides market information, structured reasoning, and simulated tools. It does not provide investment advice. A Cue is not a recommendation to trade, and every decision remains yours.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。