Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions server/mcp_server_hqd/.env_example
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# HQD MCP Remote endpoint
HQD_MCP_ENDPOINT=https://sd6k08f59gqcea6qe13vg.apigateway-cn-beijing.volceapi.com/mcp

# Auth token for remote HQD MCP endpoint
HQD_AUTH_TOKEN=

# Server settings
PORT=8000
8 changes: 8 additions & 0 deletions server/mcp_server_hqd/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
__pycache__/
*.py[oc]
build/
dist/
wheels/
*.egg-info
.venv
.env
1 change: 1 addition & 0 deletions server/mcp_server_hqd/.python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.10
116 changes: 116 additions & 0 deletions server/mcp_server_hqd/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# HQD Multi-Source Search MCP Server

## Version Information

v0.1

## Product Description

### Short Description

Query enterprise data from HQD (High-Quality Dataset) multi-source search service, covering basic info, risk, operations, IP, and litigation data.

### Long Description

HQD Multi-Source Search MCP Server is a thin proxy that connects to the remote HQD MCP service deployed on Volcengine. It provides unified access to 5 enterprise data sources through a two-phase interaction pattern: metadata discovery (`describe_datasource`) followed by data retrieval (`query_datasource`). All queries are forwarded to the remote endpoint — no local data processing is performed.

## Category

Data Intelligence

## Tags

Enterprise Data, Multi-Source Search, HQD

## Tools

This MCP Server product provides the following Tools (capabilities):

### Tool 1: describe_datasource

Get metadata for data sources including dimensions, metrics, and filters. Agents should call this first to understand available data structures before querying.

### Tool 2: query_datasource

Query data from a specific datasource with filtering, aggregation, and pagination. Supports filter operators: `eq`, `like`, `in`, `not_in`, `between`, `range`, `keyword`.

## Compatible Platforms

- Python

## Authentication Method

Bearer Token

### Obtaining Auth Token

Contact the HQD service administrator to obtain an authentication token.

### Environment Variable Configuration

| Variable Name | Value |
| ---------- | ---------- |
| `HQD_AUTH_TOKEN` | Auth token for the remote HQD MCP endpoint |
| `HQD_MCP_ENDPOINT` | Remote HQD MCP endpoint (optional, has default) |

## Python MCP Server

### Dependencies

The device running MCP server needs to install the following dependencies:

- [Python](https://www.python.org/downloads/) 3.10 or higher.
- [`uv`](https://docs.astral.sh/uv/) & [`uvx`](https://docs.astral.sh/uv/guides/tools/).

### Deployment and Configuration

```json
{
"mcpServers": {
"mcp-server-hqd": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/volcengine/mcp-server#subdirectory=server/mcp_server_hqd",
"mcp-server-hqd"
],
"env": {
"HQD_AUTH_TOKEN": "Your HQD Auth Token"
}
}
}
}
```

> Note: Please replace `Your HQD Auth Token` above with the authentication token provided by the HQD service administrator.

## Using Clients

The following clients are supported for interacting with MCP Server. For specific configurations, please refer to the client documentation:

- Cursor
- [Trae](https://www.trae.com.cn/)
- Claude Desktop
- Ark

Supports [Cline](https://cline.bot/) plugin

## Available Datasources

| ID | Name |
|----|------|
| `enterprise_basic_wide` | Enterprise Basic Information |
| `enterprise_risk_wide` | Enterprise Risk Information |
| `enterprise_operation_wide` | Enterprise Operations Information |
| `enterprise_ip_wide` | Enterprise Intellectual Property |
| `enterprise_litigation` | Enterprise Litigation Information |

## Conversation Initiation Example

- List all available data sources.
- Query the basic information of the enterprise named "ByteDance".
- Search for enterprises with registered capital over 10 million in Beijing.

## License

[MIT](../../LICENSE)
116 changes: 116 additions & 0 deletions server/mcp_server_hqd/README_zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# 高质量数据集多源搜索 MCP Server

## 版本信息

v0.1

## 产品描述

### 短描述

查询 HQD(高质量数据集)多源搜索服务中的企业数据,涵盖基本信息、风险、经营、知识产权和诉讼数据。

### 长描述

HQD 多源搜索 MCP Server 是一个轻量代理,连接部署在火山引擎上的远端 HQD MCP 服务。通过两阶段交互模式提供对 5 个企业数据源的统一访问:先通过 `describe_datasource` 发现元数据,再通过 `query_datasource` 检索数据。所有查询均转发到远端服务,本地不进行数据处理。

## 分类

数据智能

## 标签

企业数据、多源搜索、HQD

## Tools

本 MCP Server 产品提供以下 Tools (工具/能力):

### Tool 1: describe_datasource

获取数据源的可查询元数据信息,包括维度(dimensions)、指标(metrics)和过滤条件(filters)。Agent 应先调用此工具了解数据结构,再进行查询。

### Tool 2: query_datasource

查询指定数据源的实际数据,支持过滤、聚合和分页。支持的过滤操作符:`eq`(精确)、`like`(模糊)、`in`(批量)、`not_in`(排除)、`between`(范围)、`range`(数值范围)、`keyword`(全文搜索)。

## 可适配平台

- Python

## 鉴权方式

Bearer Token

### 获取 Auth Token

请联系 HQD 服务管理员获取认证令牌。

### 环境变量配置

| 变量名 | 值 |
| ---------- | ---------- |
| `HQD_AUTH_TOKEN` | 远端 HQD MCP 服务的认证令牌 |
| `HQD_MCP_ENDPOINT` | 远端 HQD MCP 端点地址(可选,有默认值) |

## Python 版 MCP server

### 依赖项

运行 MCP server 的设备需要安装以下依赖项。

- [Python](https://www.python.org/downloads/) 3.10 或更高版本。
- [`uv`](https://docs.astral.sh/uv/) & [`uvx`](https://docs.astral.sh/uv/guides/tools/)。

### 部署与配置

```json
{
"mcpServers": {
"mcp-server-hqd": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/volcengine/mcp-server#subdirectory=server/mcp_server_hqd",
"mcp-server-hqd"
],
"env": {
"HQD_AUTH_TOKEN": "Your HQD Auth Token"
}
}
}
}
```

> 注:请将上方 `Your HQD Auth Token` 替换为 HQD 服务管理员提供的认证令牌。

## 使用客户端

支持通过以下客户端与 MCP Server 交互,具体配置可查阅该客户端文档。

- Cursor
- [Trae](https://www.trae.com.cn/)
- Claude Desktop
- 方舟

支持 [Cline](https://cline.bot/) 插件。

## 可用数据源

| ID | 名称 |
|----|------|
| `enterprise_basic_wide` | 企业基本信息宽表 |
| `enterprise_risk_wide` | 企业风险信息宽表 |
| `enterprise_operation_wide` | 企业经营信息宽表 |
| `enterprise_ip_wide` | 企业知识产权宽表 |
| `enterprise_litigation` | 企业诉讼信息 |

## 对话发起示例

- 列出所有可用的数据源。
- 查询名为"字节跳动"的企业基本信息。
- 搜索北京市注册资本超过1000万的企业。

## 许可

[MIT](../../LICENSE)
19 changes: 19 additions & 0 deletions server/mcp_server_hqd/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[project]
name = "mcp-server-hqd"
version = "0.1.0"
description = "MCP server for HQD Multi-Source Enterprise Data Search"
readme = "README.md"
requires-python = ">=3.10"
license = {text = "MIT"}
dependencies = [
"mcp[cli]>=1.5.0",
"requests>=2.31.0",
"python-dotenv>=1.0.1",
]

[project.scripts]
mcp-server-hqd = "mcp_server_hqd.server:main"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
Empty file.
45 changes: 45 additions & 0 deletions server/mcp_server_hqd/src/mcp_server_hqd/config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
"""Configuration for HQD MCP Server (remote proxy mode)."""

import os
import logging
from dataclasses import dataclass

from dotenv import load_dotenv

logger = logging.getLogger(__name__)

load_dotenv()


@dataclass
class HqdConfig:
"""Configuration for HQD MCP proxy server.

Environment variables:
HQD_MCP_ENDPOINT: Remote HQD MCP server endpoint (streamable-http)
HQD_AUTH_TOKEN: Auth token for remote endpoint (sent as Authorization header)
PORT: Local server port (default: 8000)
"""

endpoint: str
auth_token: str
port: int


def load_config() -> HqdConfig:
"""Load configuration from environment variables."""
endpoint = os.getenv(
"HQD_MCP_ENDPOINT",
"https://sd6k08f59gqcea6qe13vg.apigateway-cn-beijing.volceapi.com/mcp",
)
if not endpoint:
raise ValueError("Missing required environment variable: HQD_MCP_ENDPOINT")

return HqdConfig(
endpoint=endpoint,
auth_token=os.getenv("HQD_AUTH_TOKEN", ""),
port=int(os.getenv("PORT", "8000")),
)


config = load_config()
Loading