fiinquant-mcp

fiinquant-mcp

A resilient MCP server wrapping FiinQuant/FiinQuantX Python SDK for Claude Desktop and Cursor, providing market data, fundamental analysis, screening, and technical indicators via stdio with timeouts, error envelopes, and free-tier guards.

Category
访问服务器

README

fiinquant-mcp (personal)

Personal resilient MCP server wrapping the FiinQuant / FiinQuantX Python SDK for Claude Desktop / Cursor (stdio).

Not an official FiinGroup/FiinQuant product. Tool surface aligned with official FiinQuant MCP domain tools, with timeout / error envelope / size budget so agent hosts do not hang.

Version: 0.2.1 (P0 + P1 + free-tier guards)

Quick start (uvx)

Requires uv.

{
  "mcpServers": {
    "fiinquant": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/luongndcoder/fiinquant-python-mcp",
        "fiinquant-mcp"
      ],
      "env": {
        "FIINQUANT_USERNAME": "your_user",
        "FIINQUANT_PASSWORD": "your_pass"
      }
    }
  }
}

Live data needs the private SDK wheel:

"args": [
  "--from", "git+https://github.com/luongndcoder/fiinquant-python-mcp",
  "--with", "/ABS/PATH/to/FiinQuantX.whl",
  "fiinquant-mcp"
]

See config/mcp.example.json and config/mcp.with-sdk.example.json.

Tools (P0 + P1)

Domain Tools
Health fq_ping, fq_session_status, fq_list_ops
Market fq_get_price_history, fq_get_stock_prices, fq_get_market_statistics, fq_get_market_breadth, fq_get_index_constituents, fq_get_money_flow_contribution, fq_get_realtime_bid_ask
Universe fq_list_tickers, fq_ticker_info, fq_get_basic_info, fq_get_icb_industries
Fundamental fq_get_financial_ratios, fq_get_financial_statements, fq_get_valuation_timeseries, fq_get_equity_snapshot
Screen / TA fq_screen_stocks, fq_get_technical_indicators, fq_detect_pattern, fq_get_rrg_analysis, fq_get_rebalance, fq_run_custom_analysis
Meta fq_search_methods, fq_call_method

~26 tools total. Names use fq_ prefix; semantics match official FiinQuant MCP domain tools.

Examples

fq_get_stock_prices tickers=FPT,VNM latest=true
fq_get_financial_ratios tickers=FPT years=2023,2024
fq_get_financial_statements tickers=FPT statement=income_statement
fq_screen_stocks filters=[{"indicator":"roe","operator":"gt","value":20}] limit=30
fq_get_technical_indicators tickers=VNM indicators=[{"name":"rsi","window":14}]
fq_get_index_constituents index=VN30

Responses:

{"ok": true, "data": ..., "meta": {"truncated": false, "row_count": 10}}
{"ok": false, "code": "TIMEOUT|AUTH|SDK_ERROR|VALIDATION|INTERNAL", "message": "...", "hint": "..."}

Architecture

Cursor / Claude Desktop
        │ stdio
        ▼
  uvx → fiinquant-mcp (FastMCP tools)
        │
        ▼
  FiinQuantGateway (session, timeout, re-auth, size budget)
        │
        ▼
  ops.py aliases → FiinQuantX / fiinquant SDK methods

If your SDK method names differ, edit src/fiinquant_mcp/ops.py or run:

python scripts/inventory_fiinquant_sdk.py

Free plan limits (default)

MCP defaults match FiinQuant Trải nghiệm / Miễn phí so agent tools don't burn quota:

Limit Free tier
Connections 1 (single Gateway session)
Requests / month 100,000 (account-side)
Requests / minute 90 (enforced locally)
Requests / second 80 (enforced locally)
Realtime tickers / call ≤ 33
History depth ≤ 1 month (~31 days)
Timeframes 1m, 5m, 15m, 1h, 4h (+ Daily for EOD)

Over-limit calls return JSON VALIDATION or RATE_LIMIT with a hint — process stays up.

Upgrade? set FIINQUANT_PLAN=paid (or raise the override envs). Disable guards: FIINQUANT_ENFORCE_PLAN_LIMITS=false.

Environment

Variable Default Meaning
FIINQUANT_USERNAME SDK username
FIINQUANT_PASSWORD SDK password
FIINQUANT_PLAN free free | paid — picks default caps
FIINQUANT_ENFORCE_PLAN_LIMITS true Local rate/history/ticker guards
FIINQUANT_MAX_HISTORY_DAYS 31 (free) Max startend span
FIINQUANT_MAX_REALTIME_TICKERS 33 (free) Cap per realtime-ish call
FIINQUANT_REQUESTS_PER_MINUTE 90 Local RPM guard
FIINQUANT_REQUESTS_PER_SECOND 80 Local RPS guard
FIINQUANT_TIMEOUT_S 30 Hard timeout per call
FIINQUANT_MAX_ROWS 500 Max table rows
FIINQUANT_MAX_CHARS 80000 Max response chars
FIINQUANT_LOG_LEVEL INFO stderr logs

Develop

git clone https://github.com/luongndcoder/fiinquant-python-mcp.git
cd fiinquant-python-mcp
uv sync --extra dev
uv run pytest -v
uvx --from . fiinquant-mcp

License

MIT for this wrapper only. FiinQuant SDK and market data remain under FiinQuant terms.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选