Skip to main content
Glama

Wikipedia MCP Server

by imajumd1
demo_ckd_research.py•4.03 kB
#!/usr/bin/env python3 """ Demonstration of Wikipedia MCP Server for CKD Research This shows how Claude would use the tools to research Chronic Kidney Disease. """ import asyncio import sys import os # Add the src directory to the path sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'src')) from src.wikipedia_mcp_server.wikipedia_client import WikipediaClient async def demo_ckd_research(): """Demonstrate CKD research workflow using Wikipedia MCP tools.""" print("šŸ”¬ Wikipedia MCP Server - CKD Research Demonstration") print("=" * 60) print("Simulating how Claude would research Chronic Kidney Disease") print() async with WikipediaClient() as client: try: # Step 1: Search for CKD-related articles print("šŸ” Step 1: Searching for CKD articles...") search_result = await client.search_wikipedia("chronic kidney disease", limit=5) print(f"Found {len(search_result.results)} articles about CKD:") for i, result in enumerate(search_result.results, 1): print(f"{i}. {result.title}") print(f" {result.snippet[:150]}...") print() # Step 2: Get summary of main CKD article print("šŸ“‹ Step 2: Getting CKD summary...") summary = await client.get_summary("Chronic kidney disease") print(f"Summary of '{summary.title}':") print(f"{summary.summary[:500]}...") print() print("Key Facts:") for i, fact in enumerate(summary.key_facts[:3], 1): print(f"{i}. {fact}") print() # Step 3: Find related articles print("šŸ”— Step 3: Finding related CKD topics...") related = await client.find_related("Chronic kidney disease", limit=5) print(f"Related articles to explore:") for i, article in enumerate(related.related, 1): print(f"{i}. {article.title} ({article.relation_type})") print() # Step 4: Get detailed info on a specific aspect print("šŸ“– Step 4: Getting detailed info on dialysis...") dialysis_summary = await client.get_summary("Dialysis") print(f"Dialysis Overview:") print(f"{dialysis_summary.summary[:400]}...") print() # Step 5: Search for recent research topics print("🧬 Step 5: Searching for CKD research topics...") research_search = await client.search_wikipedia("chronic kidney disease treatment research", limit=3) print("Potential research areas:") for i, result in enumerate(research_search.results, 1): print(f"{i}. {result.title}") print(f" {result.snippet[:100]}...") print() print("šŸŽÆ Research Summary") print("=" * 40) print("This demonstrates how the Wikipedia MCP server would help Claude research CKD:") print("āœ… Discovery: Found multiple CKD-related articles") print("āœ… Overview: Got comprehensive CKD summary with key facts") print("āœ… Context: Identified related topics like dialysis, treatments") print("āœ… Deep dive: Retrieved detailed information on specific aspects") print("āœ… Current topics: Found articles on recent research and treatments") print() print("šŸ”¬ With this information, Claude could provide:") print("• Comprehensive overview of CKD") print("• Latest treatment approaches mentioned in Wikipedia") print("• Related conditions and complications") print("• Links to specific research areas for further exploration") except Exception as e: print(f"āŒ Error during research: {e}") if __name__ == "__main__": asyncio.run(demo_ckd_research())

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/imajumd1/Wiki-MCP'

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