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: nacre

📂 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.
ParametersJSON Schema
NameRequiredDescriptionDefault
domainYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses RBAC enforcement (access control) and the return format (relative paths from repo root). No annotations are provided, so the description carries the full burden, and it adds meaningful behavioral context beyond the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, zero wasted words. The first sentence captures the core action and access model, the second explains the output. Information is front-loaded and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the low complexity (1 required parameter with enum, output schema exists) and sibling tools, the description covers the essential behavior: what it lists, where, and what returns. Minor gaps like recursion depth or sorting are not critical for this tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description must compensate. It explains that the 'domain' parameter corresponds to a subdirectory under 'data/', which adds meaning beyond the enum list in the schema. This helps the agent understand the parameter's role.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'List files under data/<domain>' which is a specific verb and resource. It distinguishes from sibling tools like read_file (reads a single file) and search (queries content) by focusing on listing files within a domain directory.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives. It does not state prerequisites, when not to use, or mention any filtering capabilities. The description implies usage for listing files in a domain but lacks context for decision-making.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

read_fileC

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

ParametersJSON Schema
NameRequiredDescriptionDefault
rel_pathYes
max_charsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description must carry behavioral disclosure. It mentions RBAC enforcement but lacks details on error handling (e.g., file not found), encoding, behavior for binary files, or truncation with max_chars. The term 'text-like' is vague.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single short sentence, but it omits essential details. Conciseness should not come at the cost of completeness; under-specification reduces utility.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations, incomplete parameter documentation, and no output schema info, the description does not adequately cover the tool's usage, behavior, or return values. Siblings exist but no guidance.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description should compensate. It does not explain the meaning of rel_path (that it's relative to repo root) or max_chars (truncation limit). The path scope is hinted but not explicitly tied to the parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Read'), the resource ('text-like file'), and the scope ('relative to repo root'). It distinguishes from siblings: list_files lists files, search searches, set_role sets role, so the purpose is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool is for reading file contents but does not explicitly state when to use it vs. siblings like list_files or search. No guidance on when not to use or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

set_roleB

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

ParametersJSON Schema
NameRequiredDescriptionDefault
roleYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must fully disclose behavior. It mentions that domains are returned, but does not explain side effects like overriding previous role, reversibility, or impact on other operations. This is insufficient for a state-modifying tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with no filler. The description is front-loaded and every word adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple with one parameter and an output schema (implied by context). The description covers the return value, but lacks details about parameter values and any usage context. It is minimally adequate for a straightforward tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, meaning the description must compensate. However, the description does not mention the 'role' parameter at all, nor its enum values or purpose. It only says 'Set the active role' without linking to the parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states that the tool sets the active role for the MCP session and returns accessible domains. It uses a specific verb and resource, and distinguishes from sibling tools like list_files, read_file, and search.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives. The description implies it is for changing the session role, but does not mention prerequisites, exclusions, or when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.5/5.0
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
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    maintenance
    Provides a self-hosted knowledge index with document-level permissions, enabling AI agents to retrieve exactly the documents they are authorized to see via MCP. Supports OAuth 2.1, custom embedding models, and runs inside your network.
    41
    Apache 2.0
  • A
    license
    Not graded
    quality
    B
    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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Nithishkaranam2002/Finrag--mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server