Package Exports
- @openfinclaw/cli
- @openfinclaw/cli/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@openfinclaw/cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@openfinclaw/cli
Cross-platform financial tools for AI agents — MCP server + CLI
One package. 20+ agent platforms. Zero lock-in.
What is it?
A universal financial toolkit that works with any AI agent platform via MCP (Model Context Protocol). Query market data, manage trading strategies, run remote AI research — accessible from Claude Code, Claude Desktop, Cursor, VS Code Copilot, Hermes, and 20+ other platforms. Also runs as a standalone terminal CLI.
Tool groups
| Group | Tools | Tokens | Purpose |
|---|---|---|---|
datahub |
fin_price · fin_kline · fin_crypto · fin_compare · fin_slim_search |
~700 | Real-time prices, OHLCV, crypto/DeFi, multi-asset compare, symbol search |
strategy |
skill_publish · skill_validate · skill_fork · skill_leaderboard · skill_get_info · skill_list_local · skill_publish_verify |
~1,000 | Publish / fork / validate strategy packages, query Hub leaderboards |
deepagent |
fin_deepagent_* (14 tools) |
~1,400 | Remote AI agent: deep research, backtests, strategy package generation |
Load only what you need with --tools=datahub,strategy,deepagent (any subset).
Quick Start
1. Interactive setup (recommended)
npx @openfinclaw/cli initThe wizard will:
- Ask for your Hub API Key (
fch_..., required) - Optionally ask for your DeepAgent API Key (only if you enable the
deepagenttool group) - Let you pick tool groups
- Auto-detect installed platforms (by app bundles, user data dirs, CLI on
PATH, or existing MCP config) - Write MCP config to each selected platform
- Save keys to
~/.openfinclaw/config.json(chmod 600 on Unix) so the terminal CLI works withoutexport
2. Manual MCP configuration
Drop this into your agent platform's MCP config file (path varies per platform — see below):
{
"mcpServers": {
"openfinclaw": {
"command": "npx",
"args": ["@openfinclaw/cli", "serve"],
"env": {
"OPENFINCLAW_API_KEY": "<your-hub-key>",
"OPENFINCLAW_DEEPAGENT_API_KEY": "<your-deepagent-key>"
}
}
}
}Omit OPENFINCLAW_DEEPAGENT_API_KEY if you don't use the deepagent tool group.
3. Terminal CLI
# Prices and K-lines
npx @openfinclaw/cli price AAPL
npx @openfinclaw/cli price BTC/USDT
npx @openfinclaw/cli kline 600519.SH --limit 30
npx @openfinclaw/cli compare AAPL,GOOGL,MSFT
npx @openfinclaw/cli search tesla
# Strategy management
npx @openfinclaw/cli leaderboard --limit 10
npx @openfinclaw/cli strategy-info <uuid>
npx @openfinclaw/cli fork <uuid>
npx @openfinclaw/cli validate ./my-strategy
npx @openfinclaw/cli publish ./my-strategy.zip
# DeepAgent — real token-by-token streaming in terminal
npx @openfinclaw/cli deepagent research "Analyze BTC trend over last 30 days"
npx @openfinclaw/cli deepagent skills
npx @openfinclaw/cli deepagent packages
npx @openfinclaw/cli deepagent download <package_id>
# Diagnostics
npx @openfinclaw/cli doctorSupported Platforms
| Category | Platforms |
|---|---|
| Chat | Claude Desktop, ChatGPT, Chatbox, LM Studio |
| IDEs | Claude Code, VS Code (Copilot), Cursor, Windsurf, JetBrains Junie, Zed, Cline, Continue.dev, Roo Code |
| CLI Agents | Codex (OpenAI), OpenCode, Amazon Q CLI |
| Frameworks | Hermes Agent, BeeAI, Swarms |
| AI Agents | OpenClaw, NanoClaw |
| Other | v0 (Vercel), Postman, Amp (Sourcegraph) |
Platform config snippets
Claude Code — ~/.claude/settings.json
{
"mcpServers": {
"openfinclaw": {
"command": "npx",
"args": ["@openfinclaw/cli", "serve"],
"env": { "OPENFINCLAW_API_KEY": "<your-hub-key>" }
}
}
}Cursor — .cursor/mcp.json
{
"mcpServers": {
"openfinclaw": {
"command": "npx",
"args": ["@openfinclaw/cli", "serve"],
"env": { "OPENFINCLAW_API_KEY": "<your-hub-key>" }
}
}
}VS Code (Copilot) — .vscode/mcp.json
{
"servers": {
"openfinclaw": {
"command": "npx",
"args": ["@openfinclaw/cli", "serve"],
"env": { "OPENFINCLAW_API_KEY": "<your-hub-key>" }
}
}
}Hermes Agent — ~/.hermes/config.yaml
mcp_servers:
openfinclaw:
command: "npx"
args: ["@openfinclaw/cli", "serve"]
env:
OPENFINCLAW_API_KEY: "<your-hub-key>"
OPENFINCLAW_DEEPAGENT_API_KEY: "<your-deepagent-key>"OpenCode — ~/.config/opencode/opencode.json
{
"mcp": {
"openfinclaw": {
"type": "local",
"command": ["npx", "@openfinclaw/cli", "serve"],
"environment": { "OPENFINCLAW_API_KEY": "<your-hub-key>" },
"enabled": true
}
}
}Configuration
API Keys (two independent keys)
| Key | Env var | Used by |
|---|---|---|
Hub / DataHub (fch_...) |
OPENFINCLAW_API_KEY |
datahub + strategy groups |
| DeepAgent | OPENFINCLAW_DEEPAGENT_API_KEY |
deepagent group only (optional) |
Resolution order for each key (highest first):
- CLI flag:
--api-key <key>/--deepagent-api-key <key> - Environment variable
~/.openfinclaw/config.json(written byopenfinclaw init)
Get keys at hub.openfinclaw.ai.
Environment variables
| Variable | Description | Default |
|---|---|---|
OPENFINCLAW_API_KEY |
Hub API key | (required for Hub / DataHub calls) |
OPENFINCLAW_DEEPAGENT_API_KEY |
DeepAgent API key | (required for authenticated deepagent tools) |
OPENFINCLAW_CONFIG_PATH |
Override config file path | ~/.openfinclaw/config.json |
HUB_API_URL |
Hub base URL | https://hub.openfinclaw.ai |
DATAHUB_GATEWAY_URL |
DataHub gateway URL | https://datahub.openfinclaw.ai |
DEEPAGENT_API_URL |
DeepAgent base URL | https://api.openfinclaw.ai/agent |
REQUEST_TIMEOUT_MS |
HTTP timeout (ms) | 60000 |
DEEPAGENT_SSE_TIMEOUT_MS |
SSE stream timeout (ms) | 900000 (15 min) |
Streaming & long-running tools
DeepAgent research runs can take 3–10 minutes. Two access patterns:
- Terminal CLI (
openfinclaw deepagent research "..."): true token-by-token streaming directly to stdout - MCP clients: the
researchworkflow is split into three calls —fin_deepagent_research_submit(returns ataskIdimmediately),fin_deepagent_research_poll(every 30–60 s for progress),fin_deepagent_research_finalize(fetch full result). The agent drives this loop itself — works consistently across Claude Desktop, Cursor, Hermes, Windsurf, and other MCP clients.
Related
- @openfinclaw/core — Platform-independent library core. Use directly only if you are building a custom MCP wrapper.
- GitHub — source, issues, Chinese README.
License
MIT