Skip to main content

RAG MCP server: ChromaDB + sentence-transformers, exposes ingest/search/list/delete tools.

Project description

Agent_rag

Agent_rag is a RAG (Retrieval-Augmented Generation) MCP (Model Context Protocol) Server. It uses ChromaDB and sentence-transformers locally to provide a vector store for your intelligent agents.

This server exposes several tools for the orchestrator (Agent_head) or any other MCP client to call:

  • rag_ingest: Ingest documents, directories, or raw text into a collection.
  • rag_search: Semantic search against the ingested knowledge base.
  • rag_list_collections: List all active collections.
  • rag_delete_collection: Delete a specific collection.

Features

  • Local Embeddings: Uses sentence-transformers (default: all-MiniLM-L6-v2) locally, meaning no API keys or external services are required for embedding generation.
  • FastMCP Built-in: Asynchronous and thread-safe tool execution using FastMCP.
  • Easy Configuration: Configurable via config.yaml to set your desired chunk size, collection names, and embedding models.

Installation & Usage

Agent_rag is packaged and distributed via standard Python mechanisms. You can run it effortlessly using uv without needing to clone the repository or manually manage virtual environments.

Running with uvx

You can run the MCP server directly. uvx will automatically download and run the latest version of the agent-rag-mcp CLI:

uvx agent-rag-mcp

Transport Modes By default, the server runs in stdio transport mode (designed to be spawned as a subprocess by MCP clients like Agent_head).

To run it over HTTP using Server-Sent Events (SSE):

uvx agent-rag-mcp --transport sse --port 8002 --host 0.0.0.0

Specifying a Test Registry (If using TestPyPI)

If you published the package to: TestPyPI instead of the main PyPI, run it via

uvx --extra-index-url https://test.pypi.org/simple/ --index-strategy unsafe-best-match agent-rag-mcp@latest

Integrating with Agent_head

To connect this RAG server to your Agent_head orchestrator, add the following configuration to your Agent_head/config.yaml:

memory:
  enabled: true
  backend: "rag"

  # Configure this if backend is set to "rag"
  rag_server:
    command: "uvx"
    args: ["agent-rag-mcp"] # Or ["--from", "/path/to/local/Agent_rag", "agent-rag-mcp"] for local development
    collection: "agent_memory"

Local Development

If you are developing this package locally:

  1. Install dependencies:
    uv sync
    
  2. Run locally:
    uv run agent-rag-mcp
    
  3. Build the package:
    uv build
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agent_rag_mcp-1.0.9.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agent_rag_mcp-1.0.9-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file agent_rag_mcp-1.0.9.tar.gz.

File metadata

  • Download URL: agent_rag_mcp-1.0.9.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for agent_rag_mcp-1.0.9.tar.gz
Algorithm Hash digest
SHA256 760d877fb4c46a7af9554d6bf04f304737df132557c1c2e5c1262cf8723fa486
MD5 5a7b176c2c020a02b0d531e00ea212a7
BLAKE2b-256 d50a2b8883f5367d1552bb803c53703f401c886e73b155fd7e0385512c7c670c

See more details on using hashes here.

File details

Details for the file agent_rag_mcp-1.0.9-py3-none-any.whl.

File metadata

  • Download URL: agent_rag_mcp-1.0.9-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for agent_rag_mcp-1.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 75511efd6fe8ec1e9e95c43043387fa36b4584e603afcb9df9973a78bf8bb90d
MD5 fafbad4ed0ccf989893ab1754a971f9a
BLAKE2b-256 18582c67cc5ea32eed3e05d5fd2fb07ccc7601645bd058889393c772b59b0f3f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page