Finance MCP
Finance MCP is an intelligent agent toolkit and MCP server for financial research that integrates multiple data sources and tools for comprehensive analysis of Chinese A-share stocks.
Core Capabilities:
Stock Market Analysis: Analyze historical A-share price/volume data, trends, and technical indicators (MACD) using Tushare; extract and identify financial entities (stocks, bonds, funds, ETFs, cryptocurrencies) from natural language and retrieve their codes
Web Data Collection: Scrape web content from URLs using Crawl4AI; perform internet searches via DashScope, Tavily, or mock search backends
Code & Command Execution: Execute arbitrary Python code for custom analysis and calculations; run shell commands for file operations and scripts
ReAct Agent: AI agent that combines multiple tools through reasoning and tool chaining to answer complex financial research questions
TongHuaShun Integration: Access comprehensive Chinese stock data through 13 specialized tools covering company profiles, shareholder data, operational analysis, equity structure, financial reports, earnings forecasts, news, concepts, dividends, major positions, company events, and industry comparisons
External MCP Services: Connect to Tongyi Search and BochaAI Search for expanded searching capabilities
Technical Features:
Flexible Deployment: Multiple transport modes (stdio, SSE, HTTP RESTful API with streaming) for local and remote access
Zero-Code Configuration: Create research flows through YAML files with 20+ pre-configured scenarios
Modular Architecture: Enable/disable functional modules as needed with smart multi-level caching to improve efficiency and reduce API costs
MCP Protocol Support: Compatible with Claude Desktop and other MCP clients
Provides deep research capabilities through LangChain-based operators for conducting financial research workflows.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Finance MCP analyze recent financial performance of Apple Inc. (AAPL)"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Finance-MCP
📖 Project Overview
Finance MCP is an intelligent agent toolkit and MCP server designed for financial research scenarios. Built on the FlowLLM framework, it integrates components such as Crawl4AI, Tushare, Tavily/DashScope search, and more, helping you quickly build professional financial research agent systems.
💡 Why Choose Finance MCP?
✅ Zero-Code Configuration: Combine operators through YAML configuration files without writing service code
✅ Out-of-the-Box: Pre-configured 20+ financial research-related flows covering common research scenarios
✅ Multi-Protocol Support: Supports both MCP (stdio/SSE/HTTP) and HTTP RESTful API
✅ Smart Caching: Built-in multi-level caching mechanism to improve efficiency and reduce costs
✅ Modular Design: Each functional module is independently configurable, supporting enable/disable as needed
Related MCP server: Harness Research MCP
📰 Latest Updates
[2025-12] 🎉 Released finance-mcp v0.1.x
🚀 Quick Start
Installation
Install Finance MCP using pip:
pip install finance-mcpOr using uv:
uv pip install finance-mcpStdio Mode
This mode runs Finance MCP directly through uvx, communicating via standard input/output. Ideal for local MCP clients.
{
"mcpServers": {
"finance-mcp": {
"command": "uvx",
"args": [
"finance-mcp",
"config=default,ths",
"mcp.transport=stdio",
"llm.default.model_name=qwen3-30b-a3b-thinking-2507",
"disabled_flows='[\"tavily_search\",\"mock_search\",\"react_agent\"]'"
],
"env": {
"FLOW_LLM_API_KEY": "xxx",
"FLOW_LLM_BASE_URL": "https://dashscope.aliyuncs.com/compatible-mode/v1",
"DASHSCOPE_API_KEY": "xxx",
"TUSHARE_API_TOKEN": "xxx",
"TAVILY_API_KEY": "xxx",
"BAILIAN_MCP_API_KEY": "xxx"
}
}
}
}Service Mode (HTTP/SSE Server)
This mode starts Finance MCP as a standalone HTTP/SSE server that can be accessed remotely.
Step 1: Configure Environment Variables
Copy example.env to .env and fill in your API keys:
cp example.env .env
# Edit .env and fill in your API keysStep 2: Start the Server
Start the Finance MCP server with SSE transport:
finance-mcp \
config=default,ths \
mcp.transport=sse \
mcp.host=0.0.0.0 \
mcp.port=8001 \
llm.default.model_name=qwen3-30b-a3b-thinking-2507 \
disabled_flows='["tavily_search","mock_search","react_agent"]'The service will be available at: http://0.0.0.0:8001/sse
Step 3: Connect from MCP Client
Add this configuration to your MCP client to connect to the remote SSE server:
{
"mcpServers": {
"finance-mcp": {
"type": "sse",
"url": "http://0.0.0.0:8001/sse"
}
}
}Step 4: Using with FastMCP Client
When running in Service Mode, you can also use the FastMCP Python client to directly access the server:
import asyncio
from fastmcp import Client
async def main():
async with Client("http://0.0.0.0:8001/sse") as client:
for tool in client.list_tools():
print(tool)
result = await client.call_tool(
name="dashscope_search",
arguments={"query": "Recent news about Zijin Mining"}
)
print(result)
asyncio.run(main())One-Command Test
python test_op/test_project_sse.pyThis will start the server, connect via FastMCP client, and test all available tools automatically.
🚀 MCP Tools
Default Tools
Tool Name | Description | Dependencies | Input Parameters |
history_calculate | Price-volume analysis based on Tushare A-share historical data |
|
|
crawl_url | Scrape and parse web content |
|
|
extract_entities_code | Identify financial entities from text and complete stock codes (currently uses dashscope_search, replaceable) |
|
|
execute_code | Execute arbitrary Python code | - |
|
execute_shell | Execute shell commands | - |
|
dashscope_search | Web search based on DashScope |
|
|
tavily_search | Web search based on Tavily |
|
|
mock_search | Mock search for LLM simulation | - |
|
react_agent | ReAct agent combining multiple tools for answering complex questions | - |
|
TongHuaShun Tools
Note: These tools are implemented via crawl4ai. High concurrency may result in IP blocking.
Tool Name | Description | Dependencies | Input Parameters |
crawl_ths_company | Get company profile information by A-share stock code, including details, executive introductions, issuance-related info, subsidiaries, etc., and return query-relevant information |
|
|
crawl_ths_holder | Get shareholder research information by A-share stock code, including shareholder count, top 10 circulating shareholders, top 10 shareholders, bondholders, controlling hierarchy, etc. |
|
|
crawl_ths_operate | Get operational analysis information by A-share stock code, including main business introduction, operational data, main business composition, customers & suppliers, business review, product prices, etc. |
|
|
crawl_ths_equity | Get equity structure information by A-share stock code, including unlock schedule, total equity composition, A-share structure chart, historical equity changes, etc. |
|
|
crawl_ths_capital | Get capital operation information by A-share stock code, including funding sources, project investments, M&A, equity investments, IPO participation, equity transfers, pledge/unfreeze, etc. |
|
|
crawl_ths_worth | Get earnings forecast information by A-share stock code, including performance forecasts, detailed forecast tables, research report ratings, etc. |
|
|
crawl_ths_news | Get news and announcements by A-share stock code, including news-price correlation, announcement lists, hot news, research report lists, etc. |
|
|
crawl_ths_concept | Get concept and theme information by A-share stock code, including regular concepts, other concepts, theme highlights, concept comparison, etc. |
|
|
crawl_ths_position | Get major position information by A-share stock code, including institutional holdings summary, holding details, takeover situations, IPO allocation institutions, etc. |
|
|
crawl_ths_finance | Get financial analysis information by A-share stock code, including financial diagnosis, financial indicators, indicator change explanations, asset-liability composition, financial reports, DuPont analysis, etc. |
|
|
crawl_ths_bonus | Get dividend and financing information by A-share stock code, including dividend diagnosis, dividend history, additional issuance allocation details, additional issuance overview, rights issue overview, etc. |
|
|
crawl_ths_event | Get company events by A-share stock code, including executive shareholding changes, shareholder shareholding changes, guarantee details, violations, institutional research, investor interactions, etc. |
|
|
crawl_ths_field | Get industry comparison information by A-share stock code, including industry position, industry news, etc. |
|
|
External MCP Services
Note: External MCP services are called via SSE (Server-Sent Events). You need to configure the
BAILIAN_MCP_API_KEYenvironment variable in.env.
Service Name | Description | Dependencies | Input Parameters |
tongyi_search | WebSearch service based on DashScope |
|
|
bochaai_search | BochaAI search service based on DashScope |
|
|
Server Configuration Parameters
Parameter | Description | Example |
| Configuration files to load (comma-separated). Available: |
|
| Transport mode: |
|
| Host address (for sse/http transports only) |
|
| Port number (for sse/http transports only) |
|
| Default LLM model name (overrides config file) |
|
| JSON array of flow names to disable. Tip: Disable flows if you don't have the required API keys (e.g., |
|
For the full set of available options and defaults, refer to default.yaml.
Environment Variables
Variable | Required | Description |
| ✅ Yes | API key for OpenAI-compatible LLM service |
| ✅ Yes | Base URL for OpenAI-compatible LLM service |
| ⚠️ Optional | For DashScope search and entity extraction |
| ⚠️ Optional | For historical data analysis |
| ⚠️ Optional | For Tavily web search |
| ⚠️ Optional | For external MCP services |
HTTP RESTful API with Streaming Support
Finance MCP also supports HTTP RESTful API mode with streaming capabilities. This allows you to access flows directly via HTTP endpoints, not just through MCP protocol.
Step 1: Start HTTP Server
Start the Finance MCP server with HTTP backend:
finance-mcp \
config=default,stream_agent \
backend=http \
http.host=0.0.0.0 \
http.port=8002 \
llm.default.model_name=qwen3-30b-a3b-thinking-2507Step 2: Make Streaming HTTP Requests
All flows configured with stream: true will be exposed as streaming HTTP endpoints. Responses are streamed in real-time using Server-Sent Events (SSE) format.
Example: Request streaming deep research (inspired by open_deep_research):
curl -X POST http://0.0.0.0:8002/langchain_deep_research \
-H "Content-Type: application/json" \
-d '{"query": "I want to learn about Kweichow Moutai stock"}'The response will be streamed in real-time, showing:
Thinking process and reasoning
Tool calls and intermediate results
Final comprehensive answer
Note: By default, this uses DashScope search, but you can replace it with other search backends (e.g., Tavily) by modifying the stream_agent.yaml configuration.
🤝 Contributing
We welcome contributions! To get started:
Install the package in development mode:
pip install -e .Install pre-commit hooks:
pip install pre-commit
pre-commit run --all-filesSubmit a pull request with your changes.
⚖️ License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
📈 Star History
Available Tools
9 toolscrawl_urlC
Web content parsing tool: retrieves and formats web page content based on the provided URL.
Inputs: url (required).
dashscope_searchA
Use search keywords to retrieve relevant information from the internet. If you have multiple keywords, please call this tool separately for each one.
Inputs: query (required).
execute_codeC
Execute python code can be used in scenarios such as analysis or calculation, and the final result can be printed using the print function.
Inputs: code (required).
execute_shellB
A tool capable of executing shell commands can use pwd to check the current location, cd to navigate to a new directory, ls to view the contents of a directory, and execute scripts.
Note that the starting directory is always the same each time the tool is invoked. If you need to perform multiple operations within a specific directory, you must include the full path in each command, for example: cd aa/bb && bash xxx.
Inputs: command (required).
extract_entities_codeC
Extract financial entities from the query, including types such as "stock", "bond", "fund", "cryptocurrency", "index", "commodity", "etf", etc. For entities like stocks or ETF funds, search for their corresponding codes. Finally, return the financial entities appearing in the query, including their types and codes.
Inputs: query (required).
history_calculateA
对于给定的A股股票代码(其他市场的股票请不要使用此工具),有现成的历史股价数据,其数据结构如下:
名称 类型 描述
ts_code str 股票代码
trade_date str 交易日期
open float 开盘价
high float 最高价
low float 最低价
close float 收盘价
pre_close float 昨收价
change float 涨跌额
pct_chg float 涨跌幅
vol float 成交量 (手)
amount float 成交额 (千元)你需要输入你想分析的股票代码以及你的问题。该工具将为你生成并执行相应的代码,并返回结果。 注意:
你无需编写任何代码——只需直接提问即可,例如:“过去一周涨了多少,有没有出现顶背离?”、“近期市场趋势如何?”、“MACD是否形成了金叉?”。
该工具只能基于上述数据结构中的数据回答问题,请勿提出需要超出该数据范围信息的问题。
Inputs: code (required), query (required).
mock_searchB
Use search keywords to retrieve relevant information from the internet. If you have multiple keywords, please call this tool separately for each one.
Inputs: query (required).
react_agentD
A React agent that answers user queries.
Inputs: query (required).
tavily_searchC
Use search keywords to retrieve relevant information from the internet.
Inputs: query (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Multiple tools have overlapping or unclear purposes. dashscope_search, mock_search, and tavily_search all appear to perform internet searches with similar descriptions, creating significant ambiguity. Additionally, execute_code and execute_shell both handle code execution but in different environments, which could confuse agents about when to use each. The finance-specific tools (extract_entities_code, history_calculate) are more distinct but the overall set has poor separation.
The naming follows mixed conventions. Most tools use snake_case (crawl_url, dashscope_search, execute_code, etc.), which is good, but there's inconsistency in verb usage and structure. Some names describe actions (crawl_url, execute_code), others describe functions (extract_entities_code, history_calculate), and react_agent uses a different pattern entirely. While readable, there's no consistent verb_noun pattern throughout the set.
With 9 tools, the count is reasonable for a finance server that appears to combine web research, code execution, and financial analysis. However, the presence of three nearly identical search tools (dashscope_search, mock_search, tavily_search) suggests some redundancy that inflates the count unnecessarily. The scope feels slightly bloated rather than tightly focused.
For a 'Finance MCP', the tool surface has significant gaps. While it includes some financial entity extraction and A-share stock analysis, there's no coverage of core financial operations like portfolio management, transaction execution, market data retrieval beyond specific stocks, or integration with financial APIs. The tools are more generic (web crawling, code execution, search) than finance-specific, leaving the domain poorly served despite the server name.
Maintenance
Related MCP Connectors
Investment research superagent: podcasts, SEC filings, and no-code research pipelines.
Research layer for AI agents: stock theses, filing Q&A with page cites, monitoring. Research-only.
Grounded financial research for agents: filings, transcripts, news across US and Asia markets.
Evidence-backed capital-change intelligence and sourced financial data for AI agents
Related MCP Servers
- AlicenseBqualityDmaintenanceProvides comprehensive financial research tools including A-share stock analysis, web scraping, entity extraction, and multi-source search capabilities for building intelligent financial research agents.427Apache 2.0
- AlicenseAqualityDmaintenanceEnables AI agents to perform professional-grade deep research by aggregating real-time data from multiple sources, evaluating source credibility, and generating comprehensive reports.311Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to perform grounded equity research by analyzing tickers from SEC filings and market data, producing citation-guarded memos with pre-computed fundamentals.MIT
- AlicenseNot gradedqualityBmaintenanceFinancial data and research MCP for AI agents: filings with full-text and fact search, statements as reported, earnings, insider and institutional ownership, corporate events, executives, analyst data, company discovery and research signals for US, China and Japan equities. Every figure traced to its filing. Browser sign-in.10MIT