Wukan1986

A Python-based MCP server for querying financial tables via Playwright with HTTP and stdio endpoints.
  • python

0

GitHub Stars

python

Language

6 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs

You can query financial data tables from multiple sources using an MCP-enabled crawler that runs in a browser-backed environment. It supports automated data extraction and large language model interactions, so you can fetch up-to-date tables and chat with an LLM to get insights. This server provides both a local (stdio) mode and a remote HTTP endpoint for integration with MCP clients.

How to use

Install and run the MCP-enabled server locally, then connect your MCP client to either the local stdio server or the HTTP endpoint. You can query multiple data sources such as TongHuaShun, TDX, and East Money, and you can also perform LLM-based conversations through a supported provider.

Key usage flows you can perform:

  • Query financial tables from different sites with automatic adaptation for site-specific table structures.
  • Execute simple prompts to fetch performance data, market summaries, or sector/block information.
  • Use the built-in chat capability to obtain human-like answers from a selected provider.

How to install

Prerequisites: Python and a Chrome-based browser. You will also need an MCP client to connect to this server.

Install the MCP-querier package from PyPI and ensure you have a compatible Python environment.

{
  "mcpServers": {
    "mcp_query_table": {
      "timeout": 300,
      "command": "D:\\Users\\Kan\\miniconda3\\envs\\py312\\python.exe",
      "args": [
        "-m",
        "mcp_query_table",
        "--format",
        "markdown",
        "--endpoint",
        "http://127.0.0.1:9222",
        "--executable_path",
        "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe"
      ]
    }
  }
}

Alternatively, you can start an MCP service using the SSE transport after launching the server, then connect to the provided SSE URL.

python -m mcp_query_table --format markdown --transport sse --port 8000 --endpoint http://127.0.0.1:9222

Additional sections

Configuration and usage details are designed to be practical and straightforward. The following MCP server configurations are provided for integration with your MCP client.

Troubleshooting and notes

  • Use a Chrome-based browser to ensure compatibility with dynamic financial tables. If you must use Edge, close all Edge processes outside the browser used by the tool to avoid conflicts.

  • Ensure you are logged into any sites that require authentication before querying. The tool does not perform automatic login.

  • Different sites have different table structures and may require adapter tuning to maintain consistent results.

MCP last-mile notes

The system uses Playwright to simulate browser interactions and capture either direct HTML table data or intercepted JSON responses. It aims to be flexible, with the option to adapt to site layout changes as needed.

Example usage through MCP client

{
  "mcpServers": {
    "mcp_query_table": {
      "timeout": 300,
      "url": "http://127.0.0.1:8000/sse"
    }
  },
  "envVars": []
}

Available tools

query

Fetches data from financial table sources using the MCP server, supporting multiple sites and different query types.

chat

Interacts with a large language model provider to obtain human-like responses from user questions.

Site

Enumeration of data sources like THS, TDX, and East Money used for queries.

QueryType

Specifies the type of data to retrieve, such as ETF, Fund, Index, Board, etc.

Provider

LLM provider option for chat-based responses.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational