Skip to main content

RAG MCP Server with calculator, trigonometric, and stock quote tools

Project description

RAG MCP

The RAG system is particularly well-designed, using sentence transformers to build rich contextual embeddings and performing semantic search to find the most relevant tools for each query. This makes the system much more robust than traditional keyword-based approaches.

What is MCP

MCP stands for Model Context protocol, it helps provide contexts to LLM model for tool-use.

MCP Arch

Architecture Diagram

MCP with RAG

RAG MCP Arch

The Mermaid diagram illustrates:

  • 7 Distinct Layers with color coding for easy understanding
  • Complete Data Flow from user input through RAG processing to tool execution
  • Decision Tree Logic showing how queries are routed through different parsing modes
  • RAG Integration highlighting how semantic search enhances tool selection
  • Multi-LLM Support showing integration with Google, OpenAI, and Anthropic
  • MCP Server Integration with tool discovery and execution
  • Data Persistence including SQLite storage and caching mechanisms

Key Features

RAG MCP UI

  1. Intelligent Tool Selection using RAG to find relevant tools dynamically
  2. Flexible Parsing Strategy with fallback mechanisms (RAG → LLM → Rule-based)
  3. Comprehensive Logging for debugging and performance analysis
  4. Caching Strategy for efficient server discovery
  5. Multi-Provider LLM Support for flexibility and redundancy

Setup

# create a virtual environment
conda create -n mcp
conda activate mcp

# obtain source code
git clone https://github.com/digital-duck/st_rag_mcp.git
cd st_rag_mcp
pip install -r requirements.txt

# open 1st terminal
cd src
python mcp_server.py

# in 2nd terminal
conda activate mcp
cd src
streamlit run mcp_client.py

Demo Video

References

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

iflow_mcp_digital_duck_st_rag_mcp-0.1.1.tar.gz (21.3 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file iflow_mcp_digital_duck_st_rag_mcp-0.1.1.tar.gz.

File metadata

  • Download URL: iflow_mcp_digital_duck_st_rag_mcp-0.1.1.tar.gz
  • Upload date:
  • Size: 21.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_digital_duck_st_rag_mcp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c5a5c08cf7a685ae5bc5cad971db077855c3796ebee915cb910014a28db89960
MD5 2018defa214a5a75f67a6786581a0209
BLAKE2b-256 0558fce36ee580c1425020d361ea480f739e3bb50b87f756ca8a990c8528bb7d

See more details on using hashes here.

File details

Details for the file iflow_mcp_digital_duck_st_rag_mcp-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: iflow_mcp_digital_duck_st_rag_mcp-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 22.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_digital_duck_st_rag_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0828dcc360ba3e83a467457a30469368dbecfeb85ecb9217239c3dfb3b734cf0
MD5 545f1950b8dc1168d3de07a3856ac6e0
BLAKE2b-256 8f4806d55054bb7d974f9120ec9e9d094a8ba28673ff5f07bb7d946cd1b21239

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