semvec/pypi-packages huggingface dataset:
mcp-rag-fastmcp 0.3.17
Add your description here
Requires Python: >=3.13

[![Add to Cursor](https://fastmcp.me/badges/cursor_dark.svg)](https://fastmcp.me/MCP/Details/1347/rag)
[![Add to VS Code](https://fastmcp.me/badges/vscode_dark.svg)](https://fastmcp.me/MCP/Details/1347/rag)
[![Add to Claude](https://fastmcp.me/badges/claude_dark.svg)](https://fastmcp.me/MCP/Details/1347/rag)
[![Add to ChatGPT](https://fastmcp.me/badges/chatgpt_dark.svg)](https://fastmcp.me/MCP/Details/1347/rag)
[![Add to Codex](https://fastmcp.me/badges/codex_dark.svg)](https://fastmcp.me/MCP/Details/1347/rag)
[![Add to Gemini](https://fastmcp.me/badges/gemini_dark.svg)](https://fastmcp.me/MCP/Details/1347/rag)

# MCP RAG 工具集

基于模型上下文协议（MCP）的智能知识库系统，提供文档处理、知识问答和向量库管理功能。

> 支持使用豆包与OpenAI

## ✨ 主要特性

- **🧠 智能知识库**：基于向量检索的 RAG 系统，支持语义搜索和智能问答
- **📄 多格式文档处理**：支持超过 25 种文档格式，包括 PDF、DOCX、PPTX、XLSX、图片、邮件等
- **🌐 直观 Web 界面**：Bento 风格布局，分类展示所有工具功能
- **🤖 多模型支持**：兼容 OpenAI、豆包、Ollama 等主流 AI 模型
- **🔍 高级过滤搜索**：支持按文件类型、内容结构等条件进行精确检索
- **📊 统计分析**：提供知识库统计、嵌入缓存分析等数据洞察
- **⚡ 本地化处理**：支持本地模型推理，保护数据隐私
- **🔧 向量库管理**：提供缓存清理、数据库优化等维护功能

## 安装

```bash
# 安装工具
uv tool install mcp_rag

# 升级工具
uv tool install mcp_rag --upgrade

# 卸载工具
uv tool uninstall mcp_rag
```

## 使用

### 启动 MCP 服务器

```bash
mcp_rag server
```

### 启动 Web 界面

```bash
mcp_rag web
```

Web 界面提供直观的 Bento 布局，支持以下工具分类：

- **📥 添加内容**：添加文本和文档到知识库
- **❓ 智能问答**：基于知识库进行问答和检索
- **📊 数据统计**：查看知识库和系统统计信息
- **⚙️ 向量库管理**：优化和维护向量数据库

## 配置

在项目根目录创建 `.env` 文件进行配置：

```env
# OpenAI 配置
OPENAI_API_KEY=
OPENAI_API_BASE=https://api.openai.com/v1
OPENAI_MODEL=gpt-4o-mini
OPENAI_TEMPERATURE=0
OPENAI_EMBEDDING_MODEL=text-embedding-3-large

# 豆包 配置
# OPENAI_API_KEY=
# OPENAI_API_BASE=https://ark.cn-beijing.volces.com/api/v3
# OPENAI_MODEL=doubao-1-5-pro-32k-250115
# OPENAI_TEMPERATURE=0
# OPENAI_EMBEDDING_MODEL=doubao-embedding-text-240715
```

#### mcp客户端配置（豆包为例）

```json
{
    "mcpServers": {
        "rag": {
            "command": "uv",
            "args": [
                "run",
                "mcp-rag",
                "serve"
            ],
            "env": {
                "PYTHONUNBUFFERED": "1",

                "OPENAI_API_KEY": "key",
                "OPENAI_API_BASE": "https://ark.cn-beijing.volces.com/api/v3",
                "OPENAI_MODEL": "doubao-1-5-pro-32k-250115",
                "OPENAI_TEMPERATURE": "0",

                "OPENAI_EMBEDDING_MODEL": "doubao-embedding-text-240715",
            }
        }
    }
}
```

## 可用工具

### 添加内容
- `learn_text(text, source_name)` - 添加文本到知识库
- `learn_document(file_path)` - 处理并添加文档到知识库

### 智能问答
- `ask_rag(query)` - 基于知识库回答问题
- `ask_rag_filtered(query, file_type, min_tables, min_titles, processing_method)` - 带过滤条件的智能检索

## 支持格式

支持超过 25 种文档格式，包括 PDF、DOCX、PPTX、XLSX、图片、邮件等。
exfinance 0.1.1
A Python package for downloading financial data from ex2archive
Requires Python: <4.0,>=3.11
Keywords: finance, data, exness, trading

# exfinance

[![PyPI version](https://badge.fury.io/py/exfinance.svg)](https://badge.fury.io/py/exfinance)
[![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

A Python package to automate downloading high-quality tick data from Exness data archives (ex2archive).

## Features
- List all available trading pairs
- Download historical tick data for any pair and date range
- Save data as CSV or load directly as pandas DataFrame
- Configurable data source URL

## Installation

Install from PyPI:
```bash
pip install exfinance
```

Or using Poetry:
```bash
poetry add exfinance
```

### Development Installation
```bash
git clone https://github.com/alihaskar/efinance.git
cd efinance
poetry install
```

## Usage
```python
from exfinance import Exness
exness = Exness()
pairs = exness.get_available_pairs()
data = exness.download('EURUSD', '2023-01-01', '2023-03-01')
```

## Downloader Optimizations
- Downloads are now parallelized for faster multi-month fetches (uses ThreadPoolExecutor).
- CSVs are read directly from zip files in memory if you don't specify a save path (no disk I/O).
- Error handling is granular: network, extraction, and parsing errors are logged separately.
- Date range validation: start date must not be after end date; monthly frequency uses last day of month.
- Logging is always configured for consistent output.

## Linting
This project uses [ruff](https://github.com/astral-sh/ruff) for linting:
```bash
poetry run ruff check .
```

## License
MIT
usss-dbcache 0.1.1
Cache Manger: cache parquet compressed database table as longblob in database cache table 
Requires Python: >=3.11

# dbcache
Cache a large table: select into a DataFrame, to_parquet(... compression='gzip") into a buffer, insert into cache table as a longblob

Use as a library and/or a standalone program.

For options:
dbcache.py --help

See docs: [Dbcache2025](https://docs.google.com/document/d/1QMFd4NwRwndlj4ySmeSX0noZ2Okf55HakDzMwWP3B_E/edit?usp=drive_link)