A FastMCP-based RAG server for dynamic document ingestion
Project description
RAG Server
A FastMCP-based Retrieval-Augmented Generation server for dynamically ingesting public documents and querying them on-the-fly. This server implements the Model Context Protocol (MCP) to enable seamless integration between AI models and external data sources.
Features
- Document ingestion from public URLs (PDF, DOCX, DOC)
- Hybrid vector search using both OpenAI and Google Gemini embeddings
- Session-based context management via MCP
- Automatic fallback and retry mechanisms for embedding generation
- Support for chunking and overlapping text segments
Installation
uv pip install -e .
Tools
The server exposes the following MCP tools defined in src/rag_server/server.py:
ingest_urls
Description: Ingest a list of public URLs (PDF, DOCX, DOC) into an ephemeral session. Returns a session_id for querying. You can pass an existing session_id to ingest into a specific session.
Signature: ingest_urls(urls: list[str], session_id: Optional[str] = None) -> str
urls: List of public document URLs to ingest.session_id(optional): Existing session identifier.
query_knowledge
Description: Query the ingested documents in the given session using RAG. Returns a generated answer.
Signature: query_knowledge(session_id: str, question: str) -> str
session_id: Session identifier where documents were ingested.question: The question to query against ingested documents.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rag_server-0.0.2.tar.gz.
File metadata
- Download URL: rag_server-0.0.2.tar.gz
- Upload date:
- Size: 97.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df3524e384ad94c44c352e4e9c79da380a5601a28a580ff264897bcfffe71f2f
|
|
| MD5 |
69ca66a8621564abb2caa2db116327c2
|
|
| BLAKE2b-256 |
fd0a4a4a249c8dd51fe34a83f9c62c52051ba1df006a172e4ac0e29a2785bf3a
|
File details
Details for the file rag_server-0.0.2-py3-none-any.whl.
File metadata
- Download URL: rag_server-0.0.2-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e0bee822e886da2b144824c07ebee909610f72f6fc9ad599a99c58442808a1f
|
|
| MD5 |
1d60eaa12eec5e7ff22218427f721f07
|
|
| BLAKE2b-256 |
29e98dff97b16c03e611a57d1333fc4fb2fc477c5879684a29e681015fc257b0
|