内容
# HiRAG-MCP
Python server implementing Model Context Protocol (MCP) for [HiRAG](https://github.com/hhy-huang/HiRAG).
## Features
- Naive RAG retrieval
- HiRAG RAG retrieval
## API
### Tools
- **naive_search**
- Perform a naive search over the knowledge base.
- Inputs:
- `query`: The search query text
- `max_tokens` (optional): Optional maximum tokens for the response
- **hi_search**
- Perform a hybrid search combining both local and global knowledge over the knowledge base. (default to use)
- Inputs:
- `query`: The search query text
- `max_tokens` (optional): Optional maximum tokens for the response
## Test
### uv (recommended)
Make sure uv is installed, if not:
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```
Then create the virtual environment and install dependencies using uv as below:
```bash
uv venv
source .venv/bin/activate
uv sync
```
### Running the server
Note that we already have a `test` folder and `test.txt` file, which are the results after indexing `test.txt` with `hi_indexing_openai.py`. You can directly use the following command to run the MCP server and test the tools:
```bash
mcp dev server.py
```
You can also use `hi_indexing_openai.py` to index your own text files. Remember to adjust the `working_dir` in config.yaml accordingly.
## License
This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
连接信息
猜你喜欢
rea
用于编码代理的逆向工程:一个 CLI 和 MCP 服务器,用于检查任何应用程序,了解其功能,并按照您的方式构建它们。
everything-claude-code
完整的 Claude Code 配置集合 - agents、skills、hooks、commands、rules、MCPs。来自 Anthropic...
Firecrawl
Firecrawl MCP Server 实现了网页抓取、爬虫和内容提取功能。
MarkItDown MCP
MarkItDown-MCP是一个轻量级服务器,用于将URI转换为Markdown。
cc-switch
跨平台的Claude Code、Codex和Gemini CLI一体化助手。
Agent-Reach
赋予你的AI Agent观察整个互联网的眼睛。读取并搜索...