Skip to main content
Glama

AKShare MCP Server

by ttjslbz001

AKShare MCP 서버

AKShare 라이브러리를 사용하여 재무 데이터 분석 기능을 제공하는 MCP(Model Context Protocol) 서버입니다.

특징

  • AKShare를 통해 중국 및 글로벌 금융 시장 데이터에 접근하세요
  • MCP 프로토콜을 통한 Claude Desktop과 통합
  • 다양한 재무 데이터 쿼리 및 분석 지원

설치

uv 사용(권장)

지엑스피1

pip 사용하기

# 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 pip install -e .

용법

서버 실행

# Activate the virtual environment source venv/bin/activate # On Windows: venv\Scripts\activate # Run the server python run_server.py

Claude Desktop과 통합

  1. Claude Desktop 구성에 다음 구성을 추가하세요.
"mcpServers": { "akshare-mcp": { "command": "uv", "args": [ "--directory", "/path/to/akshare_mcp_server", "run", "akshare-mcp" ], "env": { "AKSHARE_API_KEY": "<your_api_key_if_needed>" } } }
  1. Claude Desktop을 다시 시작하세요
  2. 사용 가능한 도구에서 AKShare MCP 서버를 선택하세요

사용 가능한 도구

AKShare MCP 서버는 다음과 같은 도구를 제공합니다.

  • 주식 데이터 쿼리
  • 펀드 데이터 쿼리
  • 채권 데이터 쿼리
  • 선물 데이터 쿼리
  • 외환 데이터 쿼리
  • 거시경제 데이터 쿼리
  • 그리고 더 많은 것...

새 도구 추가

MCP 서버에 새 도구를 추가하려면 다음 단계를 따르세요.

  1. src/mcp_server_akshare/api.py 에 새로운 API 함수를 추가합니다 .
    async def fetch_new_data_function(param1: str, param2: str = "default") -> List[Dict[str, Any]]: """ Fetch new data type. Args: param1: Description of param1 param2: Description of param2 """ try: df = ak.akshare_function_name(param1=param1, param2=param2) return dataframe_to_dict(df) except Exception as e: logger.error(f"Error fetching new data: {e}") raise
  2. src/mcp_server_akshare/server.py 의 열거형에 새 도구를 추가합니다 .
    class AKShareTools(str, Enum): # Existing tools... NEW_TOOL_NAME = "new_tool_name"
  3. src/mcp_server_akshare/server.py 에 새 함수를 가져옵니다 .
    from .api import ( # Existing imports... fetch_new_data_function, )
  4. handle_list_tools() 함수에 도구 정의를 추가합니다 .
    types.Tool( name=AKShareTools.NEW_TOOL_NAME.value, description="Description of the new tool", inputSchema={ "type": "object", "properties": { "param1": {"type": "string", "description": "Description of param1"}, "param2": {"type": "string", "description": "Description of param2"}, }, "required": ["param1"], # List required parameters }, ),
  5. handle_call_tool() 함수에 도구 핸들러를 추가합니다 .
    case AKShareTools.NEW_TOOL_NAME.value: param1 = arguments.get("param1") if not param1: raise ValueError("Missing required argument: param1") param2 = arguments.get("param2", "default") result = await fetch_new_data_function( param1=param1, param2=param2, )
  6. 서버를 실행하고 새 도구에 요청을 보내 새 도구를 테스트합니다 .

개발

# Install development dependencies uv pip install -e ".[dev]" # Run tests pytest

도커

Docker를 사용하여 서버를 실행할 수도 있습니다.

# Build the Docker image docker build -t akshare-mcp-server . # Run the Docker container docker run -p 8000:8000 akshare-mcp-server

특허

MIT

-
security - not tested
F
license - not found
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Claude Desktop이 AKShare 라이브러리를 통해 중국 및 글로벌 금융 시장 데이터에 접근하여 분석할 수 있도록 하는 모델 컨텍스트 프로토콜 서버입니다.

  1. 특징
    1. 설치
      1. uv 사용(권장)
      2. pip 사용하기
    2. 용법
      1. 서버 실행
      2. Claude Desktop과 통합
    3. 사용 가능한 도구
      1. 새 도구 추가
        1. 개발
          1. 도커
            1. 특허

              Related MCP Servers

              • A
                security
                F
                license
                A
                quality
                A Model Context Protocol server that provides tools to search and retrieve economic data series from the Federal Reserve Economic Data (FRED) API.
                Last updated -
                2
                3
                TypeScript
              • -
                security
                F
                license
                -
                quality
                A Model Context Protocol server that interfaces with Alpaca trading API, allowing users to manage portfolios, place trades, and access market data through natural language interactions.
                Last updated -
                Python
              • -
                security
                A
                license
                -
                quality
                A Model Context Protocol server that enables AI assistants like Claude to programmatically access financial data from Financial Modeling Prep API, including company profiles, financial statements, metrics, SEC filings, and market data.
                Last updated -
                5
                Python
                MIT License
              • -
                security
                F
                license
                -
                quality
                A Multi-Call Protocol server providing comprehensive access to Chinese stock market data through a unified API, leveraging AKShare to fetch real-time and historical data from various Chinese exchanges.
                Last updated -
                2
                Python
                • Linux

              View all related MCP servers

              MCP directory API

              We provide all the information about MCP servers via our MCP API.

              curl -X GET 'https://glama.ai/api/mcp/v1/servers/ttjslbz001/akshare_mcp_server'

              If you have feedback or need assistance with the MCP directory API, please join our Discord server