mcp-groundx-rag-server

Jeevanpradhan571/mcp-groundx-rag-server

3.2

If you are the rightful owner of mcp-groundx-rag-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The MCP-GroundX RAG Integration server is designed to facilitate AI-powered document search by integrating with the GroundX RAG platform, enabling seamless retrieval of information from document collections.

Tools
  1. search_doc_for_rag_context

    Accepts query strings and returns relevant document excerpts from the GroundX database.

MCP-GroundX RAG Integration: AI-Powered Document Search Server

A Model Context Protocol (MCP) server that integrates with GroundX RAG platform to enable AI assistants to search and retrieve information from document collections.

šŸš€ Features

  • RAG Integration: Seamless integration with GroundX's document search capabilities
  • MCP Protocol: Standard protocol for AI tool integration
  • Semantic Search: Advanced document retrieval using vector embeddings
  • Real-time Queries: Fast, responsive document search
  • Secure API Management: Environment-based configuration

šŸ› ļø Technologies Used

  • Python 3 - Core programming language
  • FastMCP - MCP server framework
  • GroundX SDK - Document search and RAG platform
  • python-dotenv - Environment variable management

šŸ“‹ Prerequisites

  • Python 3.7+
  • GroundX account and API key
  • Git

šŸ”§ Installation

  1. Clone the repository

    git clone <your-repo-url>
    cd MCP
    
  2. Install dependencies

    pip install mcp-server-fastmcp groundx python-dotenv
    
  3. Set up environment variables

    cp env.example .env
    

    Edit .env file and add your GroundX API key:

    GROUNDX_API_KEY=your_groundx_api_key_here
    

šŸš€ Usage

  1. Start the MCP server

    python3 server.py
    
  2. Connect with MCP clients The server provides a tool called search_doc_for_rag_context that accepts query strings and returns relevant document excerpts.

šŸ“ Project Structure

MCP/
ā”œā”€ā”€ server.py          # Main MCP server implementation
ā”œā”€ā”€ .env               # Environment variables (not in repo)
ā”œā”€ā”€ env.example        # Example environment file
ā”œā”€ā”€ .gitignore         # Git ignore rules
ā”œā”€ā”€ requirements.txt   # Python dependencies
└── README.md          # This file

šŸ”§ Configuration

Environment Variables

  • GROUNDX_API_KEY: Your GroundX API key (required)

GroundX Database

The server is configured to search GroundX database ID 19859. To use a different database:

  1. Update the id parameter in server.py:
    response = client.search.content(
        id=YOUR_DATABASE_ID,  # Change this
        query=query,
        n=10,
    )
    

šŸ› ļø API Reference

MCP Tool: search_doc_for_rag_context

Parameters:

  • query (string): Search query for document retrieval

Returns:

  • string: Relevant document excerpts from GroundX database

Example:

# Query for aircraft specifications
result = search_doc_for_rag_context("MIG 29 aircraft dimensions")

šŸ”’ Security

  • API keys are stored in environment variables (not in code)
  • .env file is excluded from version control
  • Use env.example as a template for configuration

šŸ¤ Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

šŸ“„ License

This project is licensed under the MIT License - see the file for details.

šŸ™ Acknowledgments

šŸ“ž Support

For issues and questions: