Skip to main content
Glama

FinRAG-MCP

FinRAG-MCP is a Role-Based Access Control (RBAC) Retrieval-Augmented Generation (RAG) system, integrated with the Model Context Protocol (MCP).
It lets you query company documents (Engineering, Finance, HR, Marketing, General) securely — each role only sees what it’s allowed to.

✅ Works with Claude Desktop (MCP tools)
✅ Optional Streamlit UI + FastAPI gateway
✅ Uses Qdrant (local) for vector search
✅ Documents enriched with metadata + citations


🚀 Why this project

  • Secure answers → Employees, Managers, and C-Level see different data (RBAC).

  • Trusted output → Every response includes sources and file chunks.

  • Flexible → Claude MCP integration + standalone UI.

  • Practical → Handles Markdown, CSV, reports, handbooks, financial summaries.


Related MCP server: Company Brain MCP

📂 Project Structure

FinRAG-MCP

FinRAG-MCP is a Role-Based Access Control (RBAC) Retrieval-Augmented Generation (RAG) system, integrated with the Model Context Protocol (MCP).
It lets you query company documents (Engineering, Finance, HR, Marketing, General) securely — each role only sees what it’s allowed to.

✅ Works with Claude Desktop (MCP tools)
✅ Optional Streamlit UI + FastAPI gateway
✅ Uses Qdrant (local) for vector search
✅ Documents enriched with metadata + citations


🚀 Why this project

  • Secure answers → Employees, Managers, and C-Level see different data (RBAC).

  • Trusted output → Every response includes sources and file chunks.

  • Flexible → Claude MCP integration + standalone UI.

  • Practical → Handles Markdown, CSV, reports, handbooks, financial summaries.


📂 Project Structure


⚙️ Setup

``bash

Clone repo

git clone https://github.com/YOUR_GITHUB/finrag-mcp.git cd finrag-mcp

Create venv with uv

uv venv .venv source .venv/bin/activate uv sync

Add secrets

cat > env/.env << 'EOF' OPENAI_API_KEY=sk-REPLACE_ME OPENAI_MODEL=gpt-4o-mini EMBED_MODEL=text-embedding-3-large QDRANT_LOCAL_PATH=.qdrant_local QDRANT_COLLECTION_PREFIX=finrag FINRAG_ROLE=EMPLOYEE EOF

Ingest docs

uv run python -m ingest.run_ingest --data-root ./data

Run Options

  1. Claude MCP (Recommended) Open Claude Desktop → Settings → Developer → Local MCP servers Add: Command: .../finrag-mcp/.venv/bin/python Args: -m mcp_server.server Env: from .env Claude can now call tools: set_role("FINANCE") search("Q4 2024 revenue drivers", top_k=5)

Start gateway

uv run uvicorn gateway.app:app --port 8000

Start UI

uv run streamlit run ui/app.py --server.port 8501

Example Queries Employee: “What does the handbook say about leave approval?” Engineering: “List services in the architecture doc.” Finance: “Summarize Q4 revenue drivers.” HR: “What’s the rule for sick leave >2 days?” Marketing: “Which 2024 campaigns had the best ROI?”

Available Tools

4 tools
list_filesA
List files under data/<domain>, RBAC-enforced.
Returns relative paths from repo root.

Inputs: domain (required). Returns: result

read_fileC

Read a text-like file relative to repo root, RBAC-enforced by folder domain.

Inputs: rel_path (required), max_chars. Returns: result

set_roleB

Set the active role for this MCP session. Returns the domains the role can access.

Inputs: role (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool has a clear, distinct purpose: list_files for listing, read_file for reading content, search for vector search, and set_role for role management. No overlap.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun snake_case pattern (list_files, read_file, search, set_role), making predictable and easy to understand.

    Tool Count4/5

    With 4 tools covering file listing, reading, search, and role setting, the count is appropriate for a focused RAG server. Slightly more tools (e.g., for data management) could be justified, but current scope is reasonable.

    Completeness3/5

    Covers core retrieval operations (list, read, search) and role management, but lacks data ingestion, deletion, or role listing/management beyond setting. Notable gap for a full RAG workflow.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      An enterprise-grade MCP gateway and security router that gives AI agents secure, observable access to internal corporate knowledge through hybrid vector+BM25 retrieval, RBAC, and prompt injection protection.
      MIT
    • F
      license
      Not graded
      quality
      C
      maintenance
      A local AI assistant that answers questions across a company's internal knowledge using MCP, providing controlled access to internal documents with role-based permissions and citations.
      -
    • F
      license
      Not graded
      quality
      B
      maintenance
      Enables querying corporate knowledge such as HR policies, vendor contracts, and support FAQs, with every answer grounded in an exact source and retrieval quality and hallucination rate explicitly measured.
      -