Metadata-Version: 2.4
Name: ht32-wiki-mcp
Version: 0.1.0
Summary: HT32 Wiki MCP Server - 为 AI Agent 提供 HT32 MCU 选型与知识检索
License-Expression: MIT
Keywords: holtek,ht32,mcp,mcu,wiki
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Embedded Systems
Requires-Python: >=3.11
Requires-Dist: fastmcp>=0.5.0
Description-Content-Type: text/markdown

# HT32 Wiki MCP Server

为 AI Agent 提供 HT32 MCU 选型与知识检索能力的 MCP Server。

## 功能

- `search_knowledge(query)` — 全文搜索 wiki 知识库（芯片页、外设页、概念页、Datasheet）
- `get_chip_info(model)` — 获取芯片系列详情
- `get_peripheral_info(name)` — 获取外设详情
- `compare_chips(models)` — 对比多个芯片型号
- `list_chips()` / `list_peripherals()` — 列出芯片/外设清单
- `get_datasheet(series)` — 获取 Datasheet 全文

## 使用方法

### 环境变量

| 变量 | 默认值 | 说明 |
|------|--------|------|
| `WIKI_ROOT` | 当前目录 | wiki 仓库根目录（含 entities/concepts/md_datasheets） |
| `MCP_TRANSPORT` | `stdio` | `stdio` / `sse` / `streamable-http` |
| `MCP_HOST` | `0.0.0.0` | HTTP 模式监听地址 |
| `MCP_PORT` | `8100` | HTTP 模式监听端口 |

### stdio 模式（供 supergateway/1Panel 包装为 SSE）

```bash
uvx ht32-wiki-mcp
```

### Streamable HTTP 模式

```bash
MCP_TRANSPORT=streamable-http uvx ht32-wiki-mcp
```

## 开发

```bash
uv sync --frozen
uv run python -m ht32_wiki_mcp
```
