AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified MIT Self-run

Finai Research

mcp-csmar432-finai-research · by csmar432

Evidence-first AI workflow for economic and financial research: literature → identification → data → econometrics → verifiable LaTeX. 43 data sources, 58 method modules, 18 AI skills, 30 journal templates.

— No reviews yet
0 installs
10 views
0.0% view→install

Install

$ agentstack add mcp-csmar432-finai-research

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • ✓ Prompt-injection patterns
  • ✓ Secret / credential exfiltration
  • ✓ Dangerous shell & filesystem operations
  • ✓ Untrusted network calls
  • ✓ Known-malicious package signatures

What it can access

  • ✓ Network access No
  • ✓ Filesystem access No
  • ● Shell / process execution Used
  • ● Environment & secrets Used
  • ✓ Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-csmar432-finai-research)

Reliability & compatibility

✓ Security review passed
0 installs to date
— no reviews yet
● 18d ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Finai Research? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

论文-研报工作流 · FinAI Research Workflow

> 研究主题一句话 → 收到可核验的 LaTeX 草稿。 > Describe your research topic → receive a verifiable LaTeX draft.

[](https://github.com/csmar432/finai-research) [](https://opensource.org/licenses/MIT) [](https://github.com/csmar432/finai-research/releases) [](https://pypi.org/project/finai-research-workflow/) [](https://pypistats.org/packages/finai-research-workflow) [](https://github.com/csmar432/finai-research/actions) [](https://codecov.io/gh/csmar432/finai-research) [](https://doi.org/10.5281/zenodo.21262689) [](https://github.com/csmar432/finai-research/discussions) [](https://codespaces.new/csmar432/finai-research)


Quick Start (30 秒上手)

# ── 推荐方式:PyPI wheel 安装(首次约 60s)────────────────────────────
# Debian/Ubuntu:先创建虚拟环境,避免与系统 Python 冲突
python3 -m venv .venv && source .venv/bin/activate
pip install "finai-research-workflow[extras]"

# 配置 LLM(DeepSeek 直连,免费)
export DEEPSEEK_API_KEY=sk-xxxx

# 启动流水线(wheel 安装后的写作入口;加 --use-hitl 启用阶段门控)
finai-pipeline --topic "Carbon trading and green innovation" --use-hitl
# 或
python -m finai.pipeline --topic "碳排放权交易与企业绿色创新" --use-hitl

# ── 源码安装(推荐贡献者 / 想改代码的用户)────────────────────────────
git clone https://github.com/csmar432/finai-research.git && cd finai-research
pip install -e ".[extras]"
cp .env.example .env.local   # 编辑 .env.local:DEEPSEEK_API_KEY=sk-...
# 新用户:先澄清(不自动开跑)→ 再写作;或澄清时加 --continue
python scripts/start_research.py --topic "Carbon trading and green innovation"
python scripts/agent_pipeline.py --topic "Carbon trading and green innovation" --use-hitl

# ── Debian/Ubuntu apt 系统 Python ─────────────────────────────────────
# apt 的 Python 被系统管理,直接 pip install 会触发 PEP 668 冲突。
# 解法:使用虚拟环境(见上方),或加 --break-system-packages
pip install --break-system-packages "finai-research-workflow[extras]"

> 重要提示:缺少 DEEPSEEK_API_KEY 时,finai-pipeline 默认以退出码 4 > 退出(严格模式),并打印明确指引。可以用 finai-doctor 诊断配置来源。

> PyPI: finai-research-workflow · 0.3.0 · MIT > · 默认安装 pip install finai-research-workflow 不含 fastapi/streamlit(避免 PyJWT/apt 冲突) > · Web 套件:pip install 'finai-research-workflow[web]' > DOI: 10.5281/zenodo.21262689

Quick Demo

This guided interface walkthrough shows the supported agent hosts, research-brief checkpoint, separate writing and empirical tracks, fail-closed data routing, and verifiable delivery package. It is intentionally not presented as a live research run and contains no mock coefficients, citations, or statistical claims. Regenerate it deterministically with python scripts/demo/gen_quick_demo.py; see [.github/demo/README.md](.github/demo/README.md) for the visual contract.

一次输入 → 8 阶段流水线:想法生成 → 文献综述 → 新颖性验证 → 实证设计 → 数据获取 → 分析 → 论文写作 → 对抗性 Review。每阶段需研究者确认。


3 个核心能力

| | | |---|---| | 43 个 MCP 数据源 | A 股财务 / 美股 / 宏观(FRED/IMF/世界银行) / 学术论文(OpenAlex/ArXiv),28 个无需 API Key | | 58 个计量模块 | 覆盖标准 DID / 交错 DID(CS/SunAb/Borusyak) / IV / RDD / 合成控制 / 面板 GMM,JF/JFE 级别稳健性检验 | | 30 种期刊模板 | JF / JFE / RFS / 经济研究 / 金融研究 / 管理世界,中英日德四国语言 |

> ⚠️ AI 生成的因果识别策略、统计结果和引用必须由研究者独立核实后方可投稿。 > ⚠️ Mock / synthetic data 默认禁用,只有用户明确授权后才能启用,且输出必须带有 ⚠️ MOCK DATA 标识。


完整文档: [使用指南.md](使用指南.md) · [CLAUDE.md](CLAUDE.md) · 运行 python scripts/setup_wizard.py --guided


Why FinAI Research Workflow?

  • Built for economists, not generic AI demos — every default is calibrated for the Journal of Finance / 经济研究 standard (DID with heterogeneous treatment effects, cluster-robust SEs at the firm level, 19 robustness checks, parallel-trend plots).
  • 43 MCP server directories — covers A-share financials, US equities, global macro (FRED/World Bank/IMF/OECD/BEA), and 400M+ academic papers (OpenAlex). The registry contains 28 no-key, 12 API-key, 0 stub, and 3 opt-in legal-risk directories; classification is maintained by scripts/count_assets.py.
  • 58 econometric method modules, not just OLS — standard DID, event study, Bacon decomposition, heterogeneous-treatment diagnostics, synthetic control, instrumental variables (optional linearmodels), panel GMM, RDD, mediation, and more. Methods that require an external backend fail visibly when it is unavailable; see CLAUDE.md for dependency notes.
  • 30 journal templates, English/Chinese/Japanese/German — JF, JFE, RFS, JAE, Econometrica, 经济研究, 金融研究, 管理世界, 会计研究, 中国工业经济.
  • 18 specialised AI skills (Claude Code / Cursor / GitHub Copilot) — idea discovery, literature review, novelty check, experiment design, data acquisition, paper drafting, figure generation, LaTeX compilation, review loops.
  • Human-in-the-loop, never autonomous fabrication — every stage requires explicit checkpoint approval; data sources are verified before use; no synthetic data without user consent.

Why Not Just Use ChatGPT?

FinAI is purpose-built for economic & financial research. Here is what it does that general LLMs cannot:

| Capability | ChatGPT / Claude (General) | FinAI (Specialized) | |---|---|---| | A-share financial data | Manual download, error-prone | ✅ 43 MCP servers auto-fetch | | DID with 19 robustness checks | Generic response | ✅ Cluster-robust SEs, Bacon decomposition, event studies | | JF / 经济研究 LaTeX templates | Manual formatting | ✅ 30 journal templates, one command | | Causal identification strategy | Generic suggestions | ✅ Econometrics expert knowledge embedded | | Literature review with provenance | Copy-paste citations | ✅ Source tracking, citation verification | | Multi-stage pipeline with checkpoints | One-off answers | ✅ 8-stage pipeline with human approval |

> [!TIP] > Start now with zero setup: Open in GitHub Codespaces. No local install required.

> For Chinese users: The most comprehensive guide is [使用指南.md](使用指南.md) — a complete 13-chapter manual covering installation, workflows, data sources, econometric methods, paper writing, and FAQ.


Who Is This For?

| Audience | Use Case | |----------|----------| | PhD students / researchers | Design empirical studies, run econometric analysis, generate LaTeX manuscripts for JF/JFE/RFS/经济研究/金融研究 | | Finance professors | Automate literature reviews, track policy experiments, benchmark against published papers | | Graduate students | Learn econometric methods (DID/IV/RDD) with automated validation and robustness checks | | Quantitative analysts | Access A-share data, run factor analysis, generate institutional-grade research reports | | AI/ML researchers | Explore LLM applications in financial research automation, provenance tracking, HITL design |

> Not sure? If you've ever spent days downloading data, running regressions, formatting LaTeX tables, or searching for related work — this tool is for you.


MCP Server Profile: Pick What Fits You

register_mcp_servers.py supports 4 user-type profiles — pick the one matching your hardware and use case:

| Profile | Servers | Startup | Memory | Best For | |---------|---------|---------|--------|----------| | minimal | 5 | ~1s | ~30 MB | 演示/教学 (Demo / Teaching) — low-end laptops | | academic | 18 | ~4s | ~100 MB | 学生/个人研究者 (Student / Individual) — no institution account | | quant | 30 | ~8s | ~180 MB | 机构/量化 (Quant / Institution) — has Tushare/Wind/CSMAR | | full | 43 | ~12s | ~220 MB | 重度用户 (Power User) — all data sources, RAM ≥ 16 GB |

# 1) Dry-run first (推荐先看)
python scripts/register_mcp_servers.py --profile academic --prune --dry-run

# 2) Actually apply
python scripts/register_mcp_servers.py --profile academic --prune

# 3) List current registration
python scripts/register_mcp_servers.py --list

See [config/mcpprofiles.json](config/mcpprofiles.json) for full server lists and the [使用指南.md](使用指南.md#2-安装配置) chapter on installation for step-by-step.

> Default behavior: without --profile, all 43 MCP servers are registered (matches full profile). Use --prune to remove out-of-profile servers.


Cross-Platform Installation

The project supports macOS, Linux, and Windows with platform-specific entry points:

| OS | Entry Script | Prerequisites | |----|-------------|---------------| | macOS (12+) | ./run.sh | Python 3.10+ (Homebrew recommended) | | Linux (Ubuntu 20.04+, Debian 11+, Fedora 35+) | ./run.sh | sudo apt install python3.10 python3-venv (or distro equivalent) | | Windows (10/11) | run.bat | Python 3.10+ (python.org) — check "Add to PATH" in installer |

Choose Your Path

This project supports two entry points — pick the one that matches your workflow:

Path A: AI Agent (Recommended)

The AI agent handles the full pipeline end-to-end. No need to remember commands.

# 1) Install once
./run.sh                    # macOS / Linux
run.bat                     # Windows

# 2) Health check
python scripts/health_check.py

# 3) Start an AI Agent (Claude Code / Cursor / Codex) and describe your research:
# "帮我研究关税政策对A股出口型企业创新的影响,设计一篇发表在经济研究的实证论文"

The AI agent automatically calls all 8 pipeline stages, MCP data sources, and LaTeX generators. Each stage requires your checkpoint approval before proceeding.

Path B: CLI (Script-Level Control)

Run individual scripts directly for fine-grained control:

# Writing track
python scripts/agent_pipeline.py --topic "Carbon trading and green innovation" --use-hitl

# Empirical track (production modern DID)
python -m scripts.research_framework.enhanced_pipeline --topic "Carbon trading and green innovation"

# Empirical demo TWFE smoke only
python scripts/research_framework/pipeline.py --mode full --topic "Carbon trading and green innovation"

# Demo: institutional-grade financial report
python scripts/demo_research_report.py --stock 000001.SZ

# MCP tool discovery
python scripts/core/mcp_tool_market.py --search "gdp" --report

# Journal template generation
python scripts/journal_template.py --list
python scripts/journal_template.py --generate JFE output/paper.tex

Platform-Specific Notes

  • macOS: Keychain is native; keyring uses KeychainBackend automatically
  • Linux: Keyring uses SecretService (gnome-keyring). For Chinese fonts, install fonts-noto-cjk:

``bash sudo apt install fonts-noto-cjk fonts-wqy-zenhei ``

  • Windows: Keyring uses Credential Manager. Chinese fonts (SimHei, Microsoft YaHei) come pre-installed

What Works Cross-Platform

  • ✅ All scripts/*.py entry points
  • ✅ 43 MCP servers (pure Python stdlib)
  • ✅ Checkpoint (fcntl.flock falls back to no-op on Windows)
  • ✅ Unit tests (pytest --collect-only; CI matrix: Ubuntu + macOS + Windows; daemon mode uses polling loop on Windows)

Known Cross-Platform Limitations

  • ⚠️ event_monitor.py uses signal.pause() which is Unix-only; on Windows it falls back to a polling loop
  • ⚠️ keychain_setup.py is macOS-specific; for Windows/Linux, use the cross-platform keyring via scripts/keychain_manager.py
  • ⚠️ core/sandbox.py uses os.fork (Unix-only); falls back to subprocess on Windows
  • ⚠️ event_monitor.py --daemon uses os.fork; on Windows the daemon exits with a friendly "use --interval 300 instead" message at startup (T2 audit 2026-07-12)
  • ✅ Skills sync: knowledge/skills/, .claude/skills/, and .github/skills/ are kept in sync via python scripts/sync_skills.py (no symlinks, Windows-safe). Run after editing any skill doc.
  • ✅ Codex support: AGENTS.md at root + .agents/skills//SKILL.md per skill (frontmatter with name and description). Both synced by sync_skills.py.

Show Me What It Does

Describe your research in plain Chinese — the agent handles the rest:

帮我研究关税政策对A股出口型企业创新的影响,设计一篇发表在经济研究的实证论文

What the agent produces automatically:

| Stage | Output | |-------|--------| | Research Design | DID/IV/RDD identification strategy + data sourcing plan | | Empirical Analysis | 58 econometric modules, automated robustness tests (19 types) | | Paper Draft | LaTeX manuscript in journal format (JF/JFE/RFS/经济研究/金融研究/管理世界) | | Review Loop | AI-assisted adversarial review with researcher verification required |

> Footnote on numbers: The table above describes the core pipeline output stages. Idea generation, novelty verification, and literature review are separate stages that run before or in parallel. MCP server counts include 43 registered servers; some require institutional/paid accounts (Tushare Pro, Wind, CSMAR, CEIC) while others work without API keys (yfinance, akshare, World Bank, IMF, OECD, FRED, ArXiv, NBER, OpenAlex). See dependency notes in CLAUDE.md.

Architecture overview:

Governed dual-track architecture: one research brief feeds a writing track and a separate empirical track; human checkpoints, provenance, and explicit gap files connect both tracks to the final research package.

> Note: Demo assets are in .github/demo/ and docs/assets/. The project is actively maintained.


Contributor Setup

Source checkout

# 1. Clone the repository
git clone https://github.com/csmar432/finai-research.git
cd finai-research

# 2. Install the package with all common optional integrations
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[extras]"
# extras includes Tushare, akshare, yfinance, MCP, dashboard, and document-processing packages.

# Optional: install econometrics packages (linearmodels, pandas-datareader, pandasql, honestdid)
pip install -e ".[econometrics]"

# 3. Configure API key (at least one required)
cp .env.example .env
# Edit .env and add: DEEPSEEK_API_KEY=sk-your-key
# Other supported: ANTHROPIC_API_KEY, OPENAI_API_KEY

# 4. Clarify the topic first (recommended)
python scripts/start_research.py --topic "碳排放权交易对企业绿色创新的影响"

# Then run the governed writing track
python scripts/agent_pipeline.py --topic "碳排放权交易对企业绿色创新的影响" --use-hitl

# Run real empirics as a separate hand-off
python -m scripts.research_framework.enhanced_pipeline --topic "碳排放权交易对企业绿色创新的影响" --explore

Key numbers (auto-generated by scripts/count_assets.py):

| Metric | Count | |--------|------:| | MCP server directories | 43 (28 free, 12 API-key, 0 stub, 3 opt-in) | | Econometric method modules | 58 | | Journal templates | 30 | | AI Skills | 18 | | Research directions | 45 registered | | Test files / test functions | 674 / 12,783 | | research_framework modules with tests | 56/58 |

> Run python scripts/count_assets.py to regenerate these numbers. They are checked into README as a snapshot of the latest count; CI is the source of truth.


MCP Tools Overview

> 43 servers total: 28 work without API keys, 12 require API keys, 3 are opt-in legal-risk. See [MCP Tool Marketplace](docs/tutorials/04-mcp-marketplace.md) for the complete catalog. > > | Badge | Meaning | > |-------|---------| > | 💰 Paid | Requires institutional/paid account (Tushare Pro / Wind / CSMAR / CEIC) | > | ⚠️ Limited | Free tier available but rate-limited or requires registration | > | ✅ Free | No account required — works out of the box |

| MCP Server | Function | Cost | Free Tier | |-----------|----------|------|---------| | user-tushare | A-share data (quotes, financials, margin) | 💰 Paid | akshare alternative | | user-yfinance | US stock, ETF, options, financials | ✅ Free | Full | | user-sec-edgar | SEC 10-K/10-Q/8-K filings | ✅ Free | Full | | user-financial | China macro (GDP/CPI/M2) | ✅ Free | Full | | user-eodhd | US yield curve, economic calendar | ⚠️ Limited | Registration required | | user-fed-data | Federal Reserve, FOMC, Beige Book | ✅ Free | Full | | user-wb-data | World Bank Data API | ✅ Free | Full | | user-imf-data | IMF World Economic Outlook | ✅ Free | Full | | user-oecd-data | OECD Economic Data | ✅ Free | Full | | user-bea-data | Bureau of Economic Analysis (US GDP) | ✅ Free | Full |

…

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.