akshare_mcp_server
MCP server from ttjslbz001/akshare_mcp_server
claude mcp add --transport stdio ttjslbz001-akshare_mcp_server uv --directory /path/to/akshare_mcp_server run akshare-mcp \ --env AKSHARE_API_KEY="<your_api_key_if_needed>"
How to use
This MCP server exposes AKShare-powered financial data querying capabilities via the MCP protocol and is designed to integrate with Claude Desktop. It supports a range of data queries including stock, fund, bond, futures, forex, and macroeconomic data, enabling you to fetch structured results through Claude’s tools. After starting the server and configuring Claude Desktop to connect to the MCP endpoint, select the AKShare MCP tool from the available tools and provide the required parameters for each specific data request. You can extend the server by adding new tools following the project’s development guide, which updates the server’s enum, imports, and request handlers to expose additional AKShare functions.
To use Claude Desktop integration, ensure your Claude configuration points to the MCP server using the uv command described in the installation notes. You may need to provide an API key or environment variable (AKSHARE_API_KEY) if your AKShare usage requires authentication. Once connected, you can query predefined data types (stock, fund, macro, etc.) and receive results in a structured JSON format suitable for downstream analysis and visualization.
How to install
Prerequisites:
- Python 3.8+ installed
- Git installed
- uv (Atom?), or simply use uv as the execution tool per the documentation
Installation steps:
- Clone the repository
# Clone the repository
git clone https://github.com/yourusername/akshare_mcp_server.git
cd akshare_mcp_server
- Create and activate a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies (via uv)
uv pip install -e .
- Run the server locally (example)
# Activate the virtual environment if not already active
source venv/bin/activate # On Windows: venv\Scripts\activate
# Run the server (adjust any entry points if needed)
python run_server.py
- Docker option (optional)
# Build the Docker image
docker build -t akshare-mcp-server .
# Run the Docker container
docker run -p 8000:8000 akshare-mcp-server
- Optional Claude Desktop integration (see how_to_use for details)
Additional notes
Tips and common considerations:
- If AKShare requires an API key, set AKSHARE_API_KEY in your environment (or as shown in the Claude Desktop integration example).
- When adding new tools, follow the development section in the repository to extend the AKShare API surface, update enums, and wire new handlers.
- Ensure your Python environment has network access to fetch data from AKShare data sources.
- For local development, using a virtual environment is recommended to avoid dependency conflicts.
- If you encounter permission or path issues in Claude Desktop, verify that the --directory path in the uv command points to the actual repository location and that the server executable name matches your setup.
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