#!/usr/bin/env python3
"""
Quick test script for Ultimate MCP Server connectivity
"""
import asyncio
import json
from fastmcp import Client
async def quick_test():
"""Quick connectivity and basic functionality test."""
server_url = "http://127.0.0.1:8013/mcp"
print(f"π Testing connection to {server_url}")
try:
async with Client(server_url) as client:
print("β
Connected successfully!")
# Test 1: Echo
echo_result = await client.call_tool("echo", {"message": "Quick test"})
print(f"π’ Echo: {echo_result[0].text}")
# Test 2: Provider status
provider_result = await client.call_tool("get_provider_status", {})
provider_data = json.loads(provider_result[0].text)
available_providers = [
name
for name, status in provider_data.get("providers", {}).items()
if status.get("available")
]
print(f"π Available providers: {', '.join(available_providers)}")
# Test 3: Tool count
tools = await client.list_tools()
print(f"π οΈ Available tools: {len(tools)}")
# Test 4: Resources
resources = await client.list_resources()
print(f"π Available resources: {len(resources)}")
print("π All tests passed!")
except Exception as e:
print(f"β Test failed: {e}")
if __name__ == "__main__":
asyncio.run(quick_test())