Skip to main content
Glama

DP-MCP Server

by devraj21
show_ai_capabilities.py4.07 kB
#!/usr/bin/env python3 """ Show AI capabilities available in DP-MCP server. """ import sys import os sys.path.append('src') from dp_mcp.ai.ai_tools import initialize_ai_tools from dp_mcp.ai.data_privacy import DataPrivacyManager, PrivacyLevel def show_capabilities(): """Show available AI capabilities.""" print("🤖 DP-MCP AI Capabilities Overview") print("="*50) # 1. Initialize AI tools print("1️⃣ Initializing AI Tools...") ai_tools = initialize_ai_tools("demo") if ai_tools: print("✅ AI tools successfully initialized") status = ai_tools.get_ai_status() print(f" Environment: {status.get('environment')}") print(f" Available models: {status.get('available_models')}") print(f" Privacy level: {status.get('privacy_level')}") else: print("❌ AI tools not available") return # 2. Show privacy capabilities print("\n2️⃣ Privacy Protection Capabilities:") privacy_mgr = DataPrivacyManager(PrivacyLevel.BASIC) sample_text = "Contact john.doe@example.com or call 555-123-4567 for support" sanitized = privacy_mgr.sanitize_text(sample_text) print(f" Original: {sample_text}") print(f" Sanitized: {sanitized}") # 3. Available AI MCP Tools print("\n3️⃣ Available AI MCP Tools:") tools = [ ("ask_natural_language_query", "Convert natural language questions to SQL and execute with AI analysis"), ("explain_query_with_ai", "Execute SQL queries and get AI-powered explanations of results"), ("get_ai_data_insights", "Generate AI suggestions for database analysis and optimization"), ("analyze_table_patterns", "AI analysis of data patterns, quality issues, and anomalies"), ("generate_ai_data_report", "Create comprehensive AI-powered data analysis reports"), ("get_ai_system_status", "Get current AI system status and configuration details") ] for tool_name, description in tools: print(f" • {tool_name}") print(f" {description}") # 4. Supported AI Models print("\n4️⃣ Supported AI Model Types:") models = [ ("Claude (Anthropic)", "claude-3-sonnet, claude-3-haiku", "Cloud API"), ("OpenAI GPT", "gpt-4, gpt-3.5-turbo", "Cloud API"), ("Local Ollama", "llama2, codellama, mistral", "Local processing"), ("Mock Models", "demo-safe, demo-local", "Testing/demo") ] for provider, model_list, type_desc in models: print(f" • {provider}: {model_list} ({type_desc})") # 5. Privacy Levels print("\n5️⃣ Privacy Protection Levels:") levels = [ ("NONE", "No filtering - for public data only"), ("BASIC", "Remove obvious PII (emails, phones, SSNs)"), ("MODERATE", "Mask patterns, limit data size, basic sanitization"), ("STRICT", "Schema-only mode, heavy data sanitization"), ("PARANOID", "No actual data sent to AI models") ] for level, description in levels: print(f" • {level}: {description}") # 6. Usage Examples print("\n6️⃣ Example Usage (via MCP protocol):") examples = [ '"How many active users do we have?"', '"What are the top selling products this month?"', '"Show me users with the highest activity levels"', '"Analyze patterns in the orders table"', '"Generate a monthly sales report"' ] for example in examples: print(f" • ask_natural_language_query({example})") print("\n🚀 Next Steps:") print("1. Server is already running with demo AI models") print("2. Use MCP protocol to call AI tools from your application") print("3. For production: Add API keys to .env.ai or install Ollama") print("4. Restart server with --ai-env production for full capabilities") print(f"\n🌐 Server URL: http://127.0.0.1:8888/mcp/") print("✅ AI-enhanced MCP server is ready for use!") if __name__ == "__main__": show_capabilities()

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/devraj21/dp-mcp'

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