> For the complete documentation index, see [llms.txt](https://docs.infoway.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.infoway.io/en-docs/sdk-and-tools/mcp-server.md).

# MCP Server

### Overview

Infoway MCP Server is a [Model Context Protocol](https://modelcontextprotocol.io/) server for financial data, enabling Claude Desktop, Cursor, and other AI assistants to query real-time financial data directly in conversations.

| Item      | Details                                                                             |
| --------- | ----------------------------------------------------------------------------------- |
| PyPI      | [`infoway-mcp-server`](https://pypi.org/project/infoway-mcp-server/)                |
| ClawHub   | [`infoway-financial-data`](https://clawhub.ai/infoway-api/infoway-financial-data)   |
| Python    | 3.10+                                                                               |
| Transport | stdio                                                                               |
| Tools     | 17                                                                                  |
| GitHub    | [infoway-api/infoway-mcp-server](https://github.com/infoway-api/infoway-mcp-server) |

### Features

* **17 financial data tools** covering real-time quotes, K-line charts, market overview, sector analysis, and stock fundamentals
* **Multi-market support**: US, HK, CN, SG, JP, IN equities + crypto + forex
* **Zero configuration**: just add your API key and start asking questions
* Works with Claude Desktop, Cursor, and any MCP-compatible client

### Installation

```bash
# Using uvx (recommended)
uvx infoway-mcp-server

# Using pip
pip install infoway-mcp-server
```

### Configuration

#### Claude Desktop

Add the following to your Claude Desktop configuration file:

* macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
* Windows: `%APPDATA%\Claude\claude_desktop_config.json`

```json
{
  "mcpServers": {
    "infoway": {
      "command": "uvx",
      "args": ["infoway-mcp-server"],
      "env": {
        "INFOWAY_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}
```

#### Cursor

Add to your Cursor MCP settings (`.cursor/mcp.json`):

```json
{
  "mcpServers": {
    "infoway": {
      "command": "uvx",
      "args": ["infoway-mcp-server"],
      "env": {
        "INFOWAY_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}
```

#### Claude Code

Add to your Claude Code settings (`.claude/settings.json`):

```json
{
  "mcpServers": {
    "infoway": {
      "command": "uvx",
      "args": ["infoway-mcp-server"],
      "env": {
        "INFOWAY_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}
```

### Available Tools

#### Real-Time Market Data (3)

| Tool                 | Description                                                                   |
| -------------------- | ----------------------------------------------------------------------------- |
| `get_realtime_trade` | Get real-time trade data (price, volume, change) for stocks, crypto, or forex |
| `get_market_depth`   | Get order book / bid-ask depth for given symbols                              |
| `get_kline`          | Get candlestick / K-line (OHLCV) data with 12 intervals from 1min to yearly   |

#### Market Overview (4)

| Tool                     | Description                                                            |
| ------------------------ | ---------------------------------------------------------------------- |
| `get_market_temperature` | Market sentiment and heat indicators (0-100)                           |
| `get_market_breadth`     | Advance / decline distribution statistics                              |
| `get_global_indexes`     | Real-time data for major global indexes (Dow, S\&P, Nasdaq, HSI, etc.) |
| `get_leading_industries` | Top-performing industry sectors ranked by performance                  |

#### Sector / Plate Analysis (4)

| Tool                | Description                                          |
| ------------------- | ---------------------------------------------------- |
| `get_industry_list` | Full list of industry sectors with performance data  |
| `get_concept_list`  | Thematic / concept sectors (AI, EV, Metaverse, etc.) |
| `get_plate_members` | All stocks within a specific sector / plate          |
| `get_plate_heatmap` | Sector heatmap data for market visualization         |

#### Stock Fundamentals (5)

| Tool                   | Description                                                       |
| ---------------------- | ----------------------------------------------------------------- |
| `get_company_overview` | Company profile, CEO, headquarters, key metrics                   |
| `get_stock_valuation`  | Valuation ratios: P/E, P/B, EV/EBITDA, dividend yield, market cap |
| `get_stock_ratings`    | Analyst consensus: buy/sell/hold counts, target price             |
| `get_stock_panorama`   | Comprehensive stock summary with key financial data               |
| `get_stock_drivers`    | Key price drivers and catalysts affecting the stock               |

#### Utilities (1)

| Tool             | Description                                                              |
| ---------------- | ------------------------------------------------------------------------ |
| `search_symbols` | Search and list available trading symbols, optionally filtered by market |

### Supported Symbol Formats

| Market       | Format      | Example     |
| ------------ | ----------- | ----------- |
| US Stocks    | `{code}.US` | `AAPL.US`   |
| HK Stocks    | `{code}.HK` | `700.HK`    |
| China (SSE)  | `{code}.SH` | `600519.SH` |
| China (SZSE) | `{code}.SZ` | `000001.SZ` |
| Crypto       | `{pair}`    | `BTCUSDT`   |
| Forex        | `{pair}`    | `USDJPY`    |

### Example Conversations

> **"What's the current price of Apple and Tesla?"** Claude will use `get_realtime_trade` with codes `AAPL.US,TSLA.US`

> **"Show me the daily K-line for Bitcoin over the last 30 days"** Claude will use `get_kline` with codes `BTCUSDT`, market\_type `crypto`, kline\_type 8, count 30

> **"How is the US market doing today? Which sectors are leading?"** Claude will use `get_market_temperature` and `get_leading_industries` for market `US`

> **"Give me a full analysis of Tencent"** Claude will combine `get_company_overview`, `get_stock_valuation`, `get_stock_ratings`, and `get_stock_drivers` for `700.HK`

> **"Compare the valuation of NVIDIA vs AMD"** Claude will call `get_stock_valuation` for both `NVDA.US` and `AMD.US`

***
