MCP Hub
Back to servers

@openfinclaw/cli

Cross-platform financial tools for AI agents — MCP server + CLI

npm679/wk
Updated
Apr 15, 2026

Quick Install

npx -y @openfinclaw/cli

English | 中文

OpenFinClaw

Cross-platform financial tools for AI agents

npm License: MIT

One package. 20+ agent platforms. Zero lock-in.

Get your API Key | Documentation | Supported Platforms


What is OpenFinClaw?

OpenFinClaw is a universal financial toolkit that works with any AI agent platform via MCP (Model Context Protocol). It provides market data and strategy management — accessible from Claude Code, Hermes, Cursor, VS Code Copilot, and 20+ other platforms.

Key Features

CategoryToolsDescription
Market Datafin_price fin_kline fin_crypto fin_compare fin_slim_searchReal-time prices, OHLCV candlesticks, crypto/DeFi data, multi-asset comparison, symbol search
Strategy Managementskill_publish skill_validate skill_fork skill_leaderboard skill_get_info skill_list_local skill_publish_verifyPublish strategies to Hub, validate FEP v2.0 packages, fork public strategies, query leaderboards

Quick Start

1. Interactive Setup (Recommended)

npx @openfinclaw/cli init

The wizard will:

  • Ask for your API key
  • Let you choose which tool groups to enable
  • Pre-select platforms when either common install markers match (app bundles, user data dirs, CLI on PATH) or the expected MCP config path already exists — these are not the same as “every app you have installed”
  • Write MCP config to each selected platform
  • Save ~/.openfinclaw/config.json (API key only) so terminal CLI works without export (Unix: file mode 600)

CLI vs MCP: Agent platforms load the API key from their MCP env block. That does not change your shell profile. A shell OPENFINCLAW_API_KEY is still visible to any process you start in that terminal—this is normal. Resolution order for openfinclaw / serve is: --api-keyOPENFINCLAW_API_KEY~/.openfinclaw/config.json.

2. Manual Configuration

Add to your agent platform's MCP config:

{
  "mcpServers": {
    "openfinclaw": {
      "command": "npx",
      "args": ["@openfinclaw/cli", "serve"],
      "env": {
        "OPENFINCLAW_API_KEY": "fch_your_key_here"
      }
    }
  }
}

3. CLI Mode (Human Use)

# Option A: use key from init (writes ~/.openfinclaw/config.json)
npx @openfinclaw/cli init

# Option B: set environment variable for this session
export OPENFINCLAW_API_KEY=fch_your_key_here

# Option C: pass API key for a single command (optional)
npx @openfinclaw/cli compare AAPL,MSFT --api-key fch_your_key_here

# Query prices
npx @openfinclaw/cli price AAPL
npx @openfinclaw/cli price BTC/USDT

# Get K-line data
npx @openfinclaw/cli kline 600519.SH --limit 30

# Compare assets
npx @openfinclaw/cli compare AAPL,GOOGL,MSFT,AMZN

# Search symbols
npx @openfinclaw/cli search "tesla"

# Diagnose configuration
npx @openfinclaw/cli doctor

Supported Platforms

OpenFinClaw works with any MCP-compatible agent platform:

CategoryPlatforms
ChatClaude Desktop, Claude.ai, ChatGPT, Chatbox, LM Studio
IDEsClaude Code, VS Code (Copilot), Cursor, Windsurf, JetBrains Junie, Zed, Cline, Continue.dev
CLI AgentsCodex (OpenAI), OpenCode, Amazon Q CLI
FrameworksHermes Agent, BeeAI, Swarms
AI AgentsOpenClaw, NanoClaw
Otherv0 (Vercel), Postman, Roo Code, Amp (Sourcegraph)

Platform Config Examples

Claude Code~/.claude/settings.json
{
  "mcpServers": {
    "openfinclaw": {
      "command": "npx",
      "args": ["@openfinclaw/cli", "serve", "--tools=datahub,strategy"],
      "env": { "OPENFINCLAW_API_KEY": "fch_xxx" }
    }
  }
}
Cursor.cursor/mcp.json
{
  "mcpServers": {
    "openfinclaw": {
      "command": "npx",
      "args": ["@openfinclaw/cli", "serve", "--tools=datahub,strategy"],
      "env": { "OPENFINCLAW_API_KEY": "fch_xxx" }
    }
  }
}
VS Code (Copilot).vscode/mcp.json
{
  "servers": {
    "openfinclaw": {
      "command": "npx",
      "args": ["@openfinclaw/cli", "serve", "--tools=datahub,strategy"],
      "env": { "OPENFINCLAW_API_KEY": "fch_xxx" }
    }
  }
}
Hermes Agent~/.hermes/config.yaml
mcp_servers:
  openfinclaw:
    command: "npx"
    args: ["@openfinclaw/cli", "serve", "--tools=datahub,strategy"]
    env:
      OPENFINCLAW_API_KEY: "fch_xxx"
OpenClaw

Add OpenFinClaw to your MCP config (e.g. ~/.openclaw/mcp.json):

{
  "mcpServers": {
    "openfinclaw": {
      "command": "npx",
      "args": ["@openfinclaw/cli", "serve"],
      "env": { "OPENFINCLAW_API_KEY": "fch_xxx" }
    }
  }
}

Tool Groups & Context Optimization

Load only the tools you need to minimize token usage:

# Market data only (~700 tokens)
npx @openfinclaw/cli serve --tools=datahub

# Strategy management only (~1,000 tokens)
npx @openfinclaw/cli serve --tools=strategy

# Multiple groups
npx @openfinclaw/cli serve --tools=datahub,strategy

# All tools (default, ~1,700 tokens)
npx @openfinclaw/cli serve
GroupToolsTokens
datahubfin_price, fin_kline, fin_crypto, fin_compare, fin_slim_search~700
strategyskill_publish, skill_validate, skill_fork, skill_leaderboard, skill_get_info, skill_list_local, skill_publish_verify~1,000

Architecture

┌─────────────────────────────────┐
│       @openfinclaw/core         │  Pure business logic
│  (zero platform dependencies)   │  API clients, types, schemas
└──────────────┬──────────────────┘
               │
       ┌───────┼───────┐
       ▼       ▼       ▼
   ┌───────┐ ┌─────┐ ┌──────┐
   │  MCP  │ │ CLI │ │ Init │
   │Server │ │Mode │ │Wizard│
   └───┬───┘ └──┬──┘ └──┬───┘
       │        │       │
       ▼        ▼       ▼
   20+ Agent  Terminal  Auto-config
   Platforms   Users    Platforms

The project is a monorepo with two packages:

  • @openfinclaw/core — Platform-independent business logic (API clients, types, tool schemas)
  • @openfinclaw/cli — MCP Server + CLI + interactive setup wizard

Environment Variables

VariableRequiredDescriptionDefault
OPENFINCLAW_API_KEYOne of key sourcesAPI key for Hub and DataHub (fch_ prefix). Ignored if --api-key is set; otherwise falls back to ~/.openfinclaw/config.json after init.
OPENFINCLAW_CONFIG_PATHNoOverride path to JSON config { "apiKey": "..." } (tests / custom layout)~/.openfinclaw/config.json
HUB_API_URLNoHub API URLhttps://hub.openfinclaw.ai
DATAHUB_GATEWAY_URLNoDataHub Gateway URLhttps://datahub.openfinclaw.ai
REQUEST_TIMEOUT_MSNoHTTP request timeout (ms)60000

Get your API key at hub.openfinclaw.ai.


Development

# Clone and install
git clone https://github.com/mirror29/openfinclaw-cli.git
cd openfinclaw-cli
pnpm install

# Build all packages
pnpm build

# Run CLI locally
OPENFINCLAW_API_KEY=fch_xxx node packages/cli/dist/index.js price AAPL

# Run MCP server locally
OPENFINCLAW_API_KEY=fch_xxx node packages/cli/dist/index.js serve

License

MIT

Reviews

No reviews yet

Sign in to write a review