FNewsCrawler
一个专门为大模型设计的财经信息MCP(Model Context Protocol)服务,通过高效的爬虫技术从各大财经网站(同花顺、东方财富等)获取实时资讯,为AI模型提供准确、及时的财经数据支持。
claude mcp add --transport stdio noimank-fnewscrawler python main.py \ --env MCP_SERVER_TYPE="streamableHttp"
How to use
FNewsCrawler is a FastAPI-based MCP service that aggregates real-time financial news and data from multiple sources. It implements MCP-compatible endpoints to expose tools for querying and processing financial information, including a general get_tool interface and a flexible AkShare integration endpoint. Clients can interact with the MCP server via HTTP to call specific tools (for example, stock data queries, news retrieval, and other AkShare-backed functions) and receive structured JSON results. The server also provides a web-based MCP tooling interface for enabling/disabling tools and monitoring usage, making it suitable for large models that need contextual financial data on demand.
To use it, first ensure the service is running and reachable at the configured address (default http://localhost:8480/mcp/mcp-server and API endpoints under /api/mcp). You can call a specific tool via the get endpoint, for example: GET http://localhost:8480/api/mcp/call_tool/{tool_name}?{params}, or use the AkShare bridge to invoke arbitrary AkShare functions through GET requests like: GET http://localhost:8480/api/mcp/call_akshare/{fun_name}?{params}. The documented examples show how to fetch industry funds flow, stock data, or news, and how to tailor results with parameters such as return_type, limit, filter_condition, and sort_by. The server also supports passing a list of URLs for batch news crawling and can return results in JSON or Markdown formats depending on the requested return_type.
How to install
Prerequisites:
- Python 3.8 or higher
- Redis server running locally or accessible
- Chrome/Chromium browser for headless crawling (as required by certain crawlers)
Installation steps:
-
Clone the repository: git clone https://github.com/noimank/FNewsCrawler.git cd FNewsCrawler
-
(Optional) Create and activate a virtual environment: python -m venv venv source venv/bin/activate # On Windows use: venv\Scripts\activate
-
Install Python dependencies (adjust if a requirements.txt is not present): pip install -r requirements.txt
If there is no requirements file, install common dependencies such as FastAPI, uvicorn, httpx, redis, etc.
-
Configure environment:
- Create .env and populate necessary variables (see the project’s .env.example): cp .env.example .env
- Ensure Redis is reachable (host/port as required by your setup)
-
Run the MCP server:
- Typical run (as used in the project docs): python main.py
- Alternative Docker-based deployment can be used as described in the Docker deployment section of the docs.
-
Verify the server is up:
- Open http://localhost:8480/monitor or http://localhost:8480/mcp to check status
- Call an API endpoint e.g. http://localhost:8480/api/mcp/call_tool/get_industry_stock_funds_flow_tool?industry_name=银行 to test functionality
Additional notes
Notes and tips:
- The MCP server supports both SSE and HTTP-based access; you can switch modes using the MCP_SERVER_TYPE environment variable.
- If you run locally, ensure Redis is started before launching the MCP service, as many features depend on Redis for state persistence.
- Some tools may require additional configuration or network access to external data sources (AkShare, news sources, etc.).
- When using the AkShare endpoints, parameters should avoid enclosing quotes unless required by the API (see the API docs in the README for examples).
- For production, consider running behind a reverse proxy and enabling health checks. Monitor endpoints at /monitor and /logs for troubleshooting.
- If you switch to the Docker deployment, follow the Docker deployment guide found in the project’s docs or docker/README.md for complete options and environment variable configurations.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP