semvec/pypi-packages huggingface dataset:
mcp-server-rapid-rag 0.1.0
MCP Server for rapid-rag - Local RAG with semantic search and LLM queries
License: MIT
Requires Python: >=3.10
Keywords: chromadb, mcp, ollama, rag, retrieval, semantic-search

# mcp-server-rapid-rag

MCP Server for **rapid-rag** - Local RAG with semantic search and LLM queries.

Search your documents with AI, no cloud needed! Works with Ollama for local LLM inference.

## Installation

```bash
pip install mcp-server-rapid-rag
```

## Configuration

Add to your Claude Desktop config (`~/.config/claude/claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "rapid-rag": {
      "command": "mcp-server-rapid-rag"
    }
  }
}
```

Or with uvx:

```json
{
  "mcpServers": {
    "rapid-rag": {
      "command": "uvx",
      "args": ["mcp-server-rapid-rag"]
    }
  }
}
```

## Tools

### `rag_add`
Add files or directories to the RAG collection. Supports .txt, .md, .pdf.

```
"Add my docs folder to RAG: ~/Documents/notes"
```

### `rag_add_text`
Add raw text directly to the collection.

```
"Store this meeting notes in RAG: [text content]"
```

### `rag_search`
Semantic search - find the most relevant documents.

```
"Search my documents for: Python async patterns"
```

### `rag_query`
Full RAG pipeline - search documents and get an AI-generated answer.

```
"Based on my documents, how do I configure logging?"
```

### `rag_info`
Get collection statistics.

```
"Show me the RAG collection info"
```

### `rag_list`
List all available collections.

```
"List my RAG collections"
```

### `rag_clear`
Clear a collection (requires confirmation).

```
"Clear the 'old_project' RAG collection"
```

## Example Usage

Ask Claude:

> "Add all the markdown files from ~/projects/docs to my RAG"

Claude will:
1. Index all .md files in the directory
2. Split them into chunks with embeddings
3. Store them in ChromaDB locally

Then ask:

> "Based on my docs, how do I set up authentication?"

Claude will:
1. Search the indexed documents
2. Pass relevant chunks to Ollama
3. Generate an answer with source citations

## Requirements

- **rapid-rag**: Core RAG library with ChromaDB
- **Ollama** (optional): For `rag_query` - local LLM inference

### Install Ollama

```bash
# macOS/Linux
curl -fsSL https://ollama.ai/install.sh | sh
ollama pull qwen2.5:7b
```

## Collections

Documents are organized into collections. Each collection has:
- Separate vector database
- Persistent storage in `./rapid_rag_data/{collection}/`
- Own embedding cache

Default collection is "default", but you can create multiple:

```
"Add ~/work/project-a to the 'project-a' collection"
"Search 'project-a' for: API endpoints"
```

## Links

- [rapid-rag on PyPI](https://pypi.org/project/rapid-rag/)
- [Humotica](https://humotica.com)
- [ChromaDB](https://www.trychroma.com/)
- [Ollama](https://ollama.ai/)

## License

MIT
agentid-sdk 0.1.7
Enterprise Python SDK for AI guardrails, PII protection, and telemetry logging.
License: MIT
Requires Python: >=3.9

# AgentID Python SDK

Lightweight Python client for the AgentID security platform.

- `guard` -> POST `/guard` (blocking / awaitable, **fail-closed** on errors)
- `log` -> POST `/ingest` (fire-and-forget telemetry)
- OpenAI/LangChain wrappers automatically apply `transformed_input` from Guard (if returned).

Default `base_url`: `https://app.getagentid.com/api/v1`

## Install

```bash
pip install agentid-sdk
```

## Optional: Local-First PII Masking (Reversible)

```bash
pip install "agentid-sdk[pii]"
```

## Optional: Enhanced Injection Security Stack

```bash
pip install "agentid-sdk[security]"
```

## Sync Example

```python
import time
from agentid import AgentID
from openai import OpenAI

agent = AgentID(api_key="sk_live_...", pii_masking=True)
openai = agent.wrap_openai(
    OpenAI(api_key="..."),
    system_id="...",
    user_id="system-auto-summary",  # optional service/user identity for audit
)

# Guard + logging happens automatically for chat.completions.create
start = time.perf_counter()
resp = openai.chat.completions.create(
    model="gpt-4o-mini",
    messages=[
        {"role": "system", "content": "You are helpful."},
        {"role": "user", "content": "User prompt"},
    ],
)
latency_ms = int((time.perf_counter() - start) * 1000)

print(resp.choices[0].message.content, latency_ms)
```

## Async Example

```python
import asyncio
from agentid import AsyncAgentID
from openai import AsyncOpenAI

async def main():
    async with AsyncAgentID(api_key="sk_live_...") as agent:
        openai = agent.wrap_openai(
            AsyncOpenAI(api_key="..."),
            system_id="...",
            user_id="system-auto-summary",  # optional service/user identity for audit
        )
        resp = await openai.chat.completions.create(
            model="gpt-4o-mini",
            messages=[{"role": "user", "content": "User prompt"}],
        )
        print(resp.choices[0].message.content)

asyncio.run(main())
```

## Security Notes

- Never print or log your API key.
- AgentID prioritizes security. If the gateway is unreachable, the SDK fails closed to prevent unmonitored PII leaks.

## LangChain (Python) Callback

```python
from agentid import AgentID, AgentIDCallbackHandler

agent = AgentID(api_key="sk_live_...")
handler = AgentIDCallbackHandler(agent, system_id="...")

# Then pass `handler` into LangChain callbacks (exact wiring depends on your chain/LLM):
# callbacks=[handler]
```