# 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`

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.infoway.io/en-docs/sdk-and-tools/mcp-server.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
