Skip to main content
Glama

Document Retrieval MCP Server

run_tests.shโ€ข2.32 kB
#!/bin/bash # Test runner script for Document Retrieval MCP Server set -e # Exit on any error echo "๐Ÿงช Document Retrieval MCP Server - Test Runner" echo "==============================================" # Check if virtual environment exists if [ ! -d "venv" ]; then echo "๐Ÿ“ฆ Creating virtual environment..." python3 -m venv venv fi # Activate virtual environment echo "๐Ÿ”Œ Activating virtual environment..." source venv/bin/activate # Install dependencies echo "๐Ÿ“ฅ Installing dependencies..." pip install -r requirements.txt pip install -r tests/requirements-test.txt # Set up test environment echo "โš™๏ธ Setting up test environment..." if [ ! -f ".env.test" ]; then cp .env.example .env.test echo "๐Ÿ“ Created .env.test - please configure test environment variables" fi # Run linting (optional but recommended) echo "๐Ÿ” Running code quality checks..." if command -v flake8 &> /dev/null; then flake8 src/ --max-line-length=120 --ignore=E203,W503 || echo "โš ๏ธ Linting warnings found" fi # Run unit tests echo "๐Ÿƒ Running unit tests..." pytest tests/unit/ -v --cov=src --cov-report=term-missing --cov-report=html:htmlcov/unit # Run integration tests echo "๐Ÿ”— Running integration tests..." pytest tests/integration/ -v --tb=short # Run performance tests (optional - can be slow) if [ "$1" = "--with-performance" ]; then echo "โšก Running performance tests..." pytest tests/unit/test_performance.py -v -m performance fi # Generate comprehensive coverage report echo "๐Ÿ“Š Generating coverage report..." pytest tests/ --cov=src --cov-report=html:htmlcov --cov-report=xml:coverage.xml --cov-fail-under=90 # Run test client if server is available echo "๐Ÿ–ฅ๏ธ Testing MCP client functionality..." if [ "$1" = "--with-client" ]; then echo "Starting test client..." cd test-client python test_client.py python ../src/server.py & CLIENT_PID=$! sleep 2 kill $CLIENT_PID 2>/dev/null || true cd .. fi echo "" echo "โœ… All tests completed!" echo "๐Ÿ“Š Coverage report: file://$(pwd)/htmlcov/index.html" echo "๐Ÿ“‹ Test results summary:" echo " - Unit tests: tests/unit/" echo " - Integration tests: tests/integration/" echo " - Coverage: $(pwd)/htmlcov/index.html" echo "" echo "๐ŸŽ‰ Testing complete! Check the reports for detailed results."

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/Pramod-Potti-Krishnan/retriever_mcp'

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