Skip to main content
Glama

Smart Code Search MCP Server

test_mcp_visibility.pyโ€ข5.83 kB
#!/usr/bin/env python3 """ Test script to simulate what Claude Desktop sees through MCP Shows the comparison between before and after documentation indexing """ import sys import os from pathlib import Path sys.path.insert(0, str(Path(__file__).parent.parent)) from src.core.clean_search import CleanSmartCodeSearch import json def simulate_mcp_queries(): """Simulate typical queries Claude Desktop might make""" print("๐Ÿค– CLAUDE DESKTOP MCP SERVER VISIBILITY TEST") print("=" * 70) search = CleanSmartCodeSearch(project_root=".") # Simulate various types of queries Claude might make test_scenarios = [ { "scenario": "User asks: 'How do I install this project?'", "query": "installation setup install requirements", "expected": "Should find README.md and INSTALLATION.md" }, { "scenario": "User asks: 'What tools does this MCP server provide?'", "query": "MCP tools API available commands", "expected": "Should find API.md and server.py tool definitions" }, { "scenario": "User asks: 'How can I contribute to this project?'", "query": "contributing guidelines pull request", "expected": "Should find CONTRIBUTING.md and PR template" }, { "scenario": "User asks: 'Is there a security policy?'", "query": "security vulnerability report CVE", "expected": "Should find SECURITY.md" }, { "scenario": "User asks: 'How does the voice assistant work?'", "query": "voice assistant speech recognition elevenlabs", "expected": "Should find voice-assistant/README.md and related files" }, { "scenario": "User asks: 'What's the project architecture?'", "query": "architecture design system components", "expected": "Should find ARCHITECTURE.md" }, { "scenario": "User asks: 'Show me the search implementation'", "query": "search function semantic embedding", "expected": "Should find clean_search.py and search methods" }, { "scenario": "User asks: 'What configuration options are available?'", "query": "configuration settings environment variables", "expected": "Should find .env.example and config files" } ] print("\n๐Ÿ“‹ SIMULATED CLAUDE DESKTOP QUERIES\n") for i, test in enumerate(test_scenarios, 1): print(f"Scenario {i}: {test['scenario']}") print(f"Query: '{test['query']}'") print(f"Expected: {test['expected']}") results = search.search(test['query'], limit=5) if results: print(f"โœ… Found {len(results)} results:") for j, result in enumerate(results[:3], 1): file_name = Path(result['file_path']).name score = result.get('score', 0) print(f" {j}. {result['name']:<30} in {file_name:<25} (score: {score:.3f})") else: print("โŒ No results found!") print("-" * 70) # Summary comparison print("\n๐Ÿ“Š VISIBILITY COMPARISON") print("=" * 70) # Count what's visible doc_queries = [ ("Documentation files", "README CONTRIBUTING LICENSE SECURITY CHANGELOG"), ("Configuration files", "json yaml config settings"), ("API documentation", "API tools MCP commands"), ("Installation guides", "installation setup requirements"), ("Code files", "class function search analyze") ] print(f"{'Category':<25} | {'Results Found':<15} | {'Status'}") print("-" * 70) for category, query in doc_queries: results = search.search(query, limit=10) doc_results = [r for r in results if any( ext in r['file_path'] for ext in ['.md', '.json', '.yaml', '.yml', 'LICENSE', 'SECURITY'] )] code_results = [r for r in results if '.py' in r['file_path']] status = "โœ… Full" if doc_results else "โš ๏ธ Code only" if code_results else "โŒ None" print(f"{category:<25} | Docs: {len(doc_results):<3} Code: {len(code_results):<3} | {status}") print("\n" + "=" * 70) print("๐Ÿ’ก ANALYSIS FOR CLAUDE DESKTOP") print("-" * 70) # Check documentation coverage doc_count = len(search.search("README CONTRIBUTING SECURITY API documentation", limit=20)) if doc_count > 10: print("โœ… EXCELLENT: Full documentation is indexed and searchable") print(" Claude can now provide comprehensive answers about:") print(" โ€ข Installation and setup procedures") print(" โ€ข API documentation and tool usage") print(" โ€ข Contributing guidelines and workflows") print(" โ€ข Security policies and best practices") print(" โ€ข Project architecture and design") elif doc_count > 5: print("โš ๏ธ PARTIAL: Some documentation is indexed") print(" Claude has limited visibility into project documentation") else: print("โŒ LIMITED: Mostly code-only visibility") print(" Claude cannot answer questions about installation, setup, or usage") print("\n๐ŸŽฏ CAPABILITIES UNLOCKED:") print(" โ€ข Can guide users through installation") print(" โ€ข Can explain all 30+ MCP tools with examples") print(" โ€ข Can help with contribution workflows") print(" โ€ข Can reference security guidelines") print(" โ€ข Can describe system architecture") print("\nโœจ The MCP server now provides full project context to Claude Desktop!") if __name__ == "__main__": simulate_mcp_queries()

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/stevenjjobson/scs-mcp'

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